cancel
Showing results for 
Search instead for 
Did you mean: 

SAP MII 14.0 ODATA Service

Former Member
0 Kudos

Hi,

I have been trying to run the ODATA service. But I keep getting back

Cannot process an HTTP request to servlet [OData] in
[XMII] web application.
[EXCEPTION]

com.sap.engine.services.servlets_jsp.server.exceptions.ServletNotFoundException:
Requested resource [OData] is not found.

AND

404 Requested resource [OData] is not found.

Here are the urls

"server://XMII/IlluminatorOData/$metadata?$format=json&QueryTemplate="&Transaction.QueryTemplate

Is there something special I need to do in the configuration of MII or Netweaver?

MII version 14.0.0 Build(802) SAP Netweaver 7.3

Thanks,

Robert Stull

Accepted Solutions (1)

Accepted Solutions (1)

former_member211944
Active Participant
0 Kudos

Hi Robert,

Use the following URL for getting the data of query:

<protocol>://<server>:<port>/XMII/IlluminatorOData/QueryTemplate?QueryTemplate=<Query Template Path>&$format=json

Use the Follwoing URL For meta data of service:

<protocol>://<server>:<port>/XMII/IlluminatorOData/$metadata

Regards,

Rohit Negi.

Former Member
0 Kudos

Rohit,

That did not work. Looking at the help documentation for 14.0.0 vs 14.0.2, 14.0.2 has help section Services for information on the OData service and 14.0.0 does not. So I am assuming that 14.0.0 does not have the OData service?

Thanks,

Robert

0 Kudos

Robert,

Please upgrade to SP2 which is the GA release version of MII; your version is the pre Ramp-Up Customer Validation version.  There were numerous fixes that were done specifically for the Microsoft Office 365 integration.  Also, the URL has been updated to this:

http://help.sap.com/saphelp_mii140sp02/helpdata/en/44/2e1d2d42994aef85ef91e58db8c7c9/content.htm

Specifically this table:
















Rowset Entities


<protocol>:<server>:<port>/XMII/IlluminatorOData/Rowset(‘<QueryTemplateName>’)/Rowset


http://myServer:10000/XMII/IlluminatorOData/Rowsets(‘MyProject/MyFolder/MyQuery’)/Rowset


Message Entities


<protocol>:<server>:<port>/XMII/IlluminatorOData/Rowset(‘<QueryTemplateName>’)/Messages


http://myServer:10000/XMII/IlluminatorOData/Rowsets(‘MyProject/MyFolder/MyQuery’)/Message


Column Entities


<protocol>:<server>:<port>/XMII/IlluminatorOData/Rowset(‘QueryTemplate=’<QueryTemplateName>’RowsetId='<rowsetId>')/Column


http://myServer:10000/XMII/IlluminatorOData/Rowset(QueryTemplate=‘MyProject/MyFolder/MyQuery’,Rowset...


where RowsetId is the Id of the rowset for which the column
entities are displayed.


Row Entities


<protocol>:<server>:<port>/XMII/IlluminatorOData/Rowset('QueryTemplate=‘<QueryTemplateName>',RowsetId='<rowsetId>')/Row


http://myServer:10000/XMII/IlluminatorOData/Rowset(QueryTemplate=‘MyProject/MyFolder/MyQuery’,Rowset...


where RowsetId is the Id of the rowset for which the row
entities are displayed.

Hope this helps,
Sam

former_member211944
Active Participant
0 Kudos

Hi Robert,

Try URL with query template path without quotes.

I was getting the exception when I was using the following URL:

<protocol>://<server>:<port>/XMII/IlluminatorOData/QueryTemplate?QueryTemplate="Query Template Path"&$format=json

Also have a look at the reply Sam has given and the URL of the help documentation which Sam mentioned.

Regards,

Rohit Negi.


Former Member
0 Kudos

Rohit,

I tried that didn't work. I think Sam is right. I need to upgrade to 14.0.2. Once complete I will run again. I have tried from both a transaction http post and putting the url into the web browser. Both fail.

Thanks,

Robert

0 Kudos

Also, be sure to verify that the OData library is deployed on your server, I had to download it separately via Service Marketplace and deploy it to my NetWeaver instances.  The SCA is named something like "SAP ODATA4J+CXF-REST LIB 7.31".

If you are on NW 7.30 it's named something like "SAP ODATA4J+CXF-REST LIB 7.30"


Sam

Former Member
0 Kudos

Sam,

I could not find the download you referred to (can you provide a link). Is there a document on how to install this component?

Thanks,

Robert Stull

0 Kudos

Robert,

Just goto SAP Service Marketplace (http://service.sap.com/swdc), on the left select "Search for Software Downloads" and search for "OData"; you will find it in the list.

Sam

Former Member
0 Kudos

Found it. Thanks Sam.

Former Member
0 Kudos

Hi Sam,

http://<server>:<port>/XMII/IlluminatorOData/QueryTemplate?QueryTemplate=<Querytemp name>?Mode=GET&$format=json

http://<server>:<port>/XMII/IlluminatorOData/QueryTemplate?QueryTemplate='<Querytemp name>'?Mode=GET...

to obtain json in the web browser i tried with the above urls. Request you to verify the urls to obtain the json format in the web browser.I am using the tag query.

I tried with,mode as POST and with-out mode also. attached the error screenshot which I'm getting. Please provide your input.

-Rakesh

former_member193328
Active Participant
0 Kudos

Hi Rakesh

Remove the Mode=Get from the URL and try. Assuming that your Query Template does not require any params to be passed it should return JSON.

Check the link to see if the QT is configured to use a Mode that is supported with HTTP method GET.

OData - SAP Manufacturing Integration and Intelligence - SAP Library

Regards

Partha

Former Member
0 Kudos

I tried with-out Mode as well, then I'm getting the below as a response in the web browser.

{

"error" : {

"code" : "NotFoundException", "message" : {

"lang" : "en-US", "value" : "EdmEntitySet QueryTemplate is not found"

}

}

}

I tried all the syntax which are mentioned in the link provided by you.

Thanks,

Rakesh

0 Kudos

It's currently a bug in MII 14.0 SP4 Patch 2 with the OData service for SQL Query templates.  It does still work for PCO query templates but needs to be resolved.  Please create a ticket to raise the priority of this.

Sam

0 Kudos

We have discovered that this error only presents itself when the query template of type SQL is in mode FixedQuery.  This will work when the mode is set to Query as a temporary work around until a patch or note is released on the topic.


Sam

Former Member
0 Kudos

Yes, it's working under Query mode. Thanks for the update Sam

0 Kudos

We have discussed this internally and it turns out that there is a security related product standard that doesn’t allow any service which might change the state of the system to be called without an XSRF token.  What this means is that we cannot accept OData calls using the HTTP Get operation with the Query Templates in the Mode FixedQuery but can in the Mode of Query.

To use the Mode FixedQuery with the SQL templates you have to use the HTTP POST operation instead of HTTP Get.

Hope this helps to explain and we will update the help documentation accordingly.


Sam

Former Member
0 Kudos

I am getting same error whether it is POST or GET method. In IE browser, it is giving 404 error not even showing below error message.

{ "error" : { "code" : "NotFoundException", "message" : { "lang" : "en-US", "value" : "EdmEntitySet QueryTemplate is not found" } } }


The MII version is 14.0 SP5. IE version is 11.0. } http://server:port/XMII/IlluminatorOData/QueryTemplate?QueryTemplate=viswa/Query/getFileList&Mode=GE... http://server:port/XMII/IlluminatorOData/QueryTemplate?QueryTemplate=viswa/Query/getFileList&Mode=PO...

0 Kudos

Ok, so an error like that where it says a core definition of the document is missing isn't great to see and could perhaps be related to an outdated OData library.  I just tested this on my server and wasn't able to replicate it...what query type is the getFileList query template; sounds like an XacuteQuery.  If so is it possible that in your transaction the output xml response never gets set or the XML isn't in proper Illuminator format?  This would kill the conversion from MII Illuminator XML to OData JSON and could also cause this error.

Hope this helps,

Sam

Former Member
0 Kudos

It is SQLQuery template running in FixedQuery mode. Tried with Query mode also.

Below is the query:

select XMII_FILES.ID,XMII_FILES.MODIFIED,XMII_FILES.NAME from XMII_FILES

The ODATA library is default one which was installed as part MII 14.0 SP5. Attached is screenshot of the same.

Does the library need to be reinstalled?

0 Kudos

I just tried the same on my NW 7.4 SP08 server with the SP08 release of the OData library and it worked as expected for me.  Perhaps updating the library is the right way to go.

Sam

Former Member
0 Kudos

Sam, thanks for your quick response.

We are on NW 7.40 SP5 and the Odata library is also on SP5

On SMP the latest odata library which is available is SP08.

My question is can we upgrade the odata libraries independent of NW stack. Right now when I try to deploy the odata SP08 sca file using the some tool it is not recognizing.

Please let me know for upgrading the libraries do we need to upgrade the JAVA stack to the same level?

0 Kudos

The latest on SMP is SP08 with Patch (so I recommend the latest with Patch) and this is really a question for the NetWeaver forum; but I believe that the recommendation is to keep them all the same SP...meaning a NW platform upgrade is probably in order from SP05 to SP08.

Sam

Former Member
0 Kudos

Thanks, Sam.

Will install SP08 patch and try it.

Answers (0)