on 12-22-2014 5:10 AM
How to create data model and map by seeing wsdl file in integration gateway eclispe plugin
Tags edited by: Jitendra Kansal
Try it with a new OData service implementation project:
1. Create an entity type with "MaterialNo" as primary key
2. Bind it with Data source "SOAP service" and QUERY operation
3. Response mapping
4. Request mapping> custom code
importPackage(com.sap.gateway.ip.core.customdev.logging);
importPackage(com.sap.gateway.ip.core.customdev.util);
importPackage(org.apache.olingo.odata2.api.uri);
importPackage(java.util);
importPackage(com.sap.gateway.core.ip.component.commons);
importPackage(com.sap.gateway.ip.core.customdev.api);
var response=new LinkedHashMap();
message.setHeader("Authorization", "enter base64format of username and password");
map = new LinkedHashMap();
map.put("SalesOrg", "IND1");
partneHashMap = new LinkedHashMap();
partneHashMap.put("ItMate", map);
message.setBody(partneHashMap);
Note: You can convert username and password credentials info into Base64 using REST Client>header.
Regards,
JK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Midhun and Jitendra
I tried all the mappings. Here in soap UI the request is expecting <ItMate> as input with out this input we don't get any result. Using custom javascript also tried but failed to get results. How can we draw an entity type and mappings by seeing soap result.
Regards
Praveen
Hi Praveen,
You can either pass the ltMate from the custom script as a hard coded value or you can keep pass it while making request like http://smpserver:8080/gateway/odata/sap/ArticleService;v=1/ArticleSet('AR-00001') by defining a Read operation. ex.
Regards, Midhun
SAP Customer Experience Group - CEG
I tried all the mappings. Here in soap UI the request is expecting <ItMate> as input with out this input we don't get any result. Using custom javascript also tried but failed to get results. How can we draw an entity type and mappings by seeing soap result.
Can you share the custom JS code?
If your SOAP service allows, you may provision a QUERY operation with the same response mapping. You should be able to return multiple records that way.
hi jItendra,
This is my javascript
importPackage(java.util);
importPackage(org.apache.olingo.odata2.api.uri);
importPackage(org.apache.olingo.odata2.api.edm);
importPackage(com.sap.gateway.ip.core.customdev.logging);
importPackage(com.sap.gateway.ip.core.customdev.util);
importPackage(org.apache.olingo.odata2.api.uri);
var response=new LinkedHashMap();
message.setHeader("Authorization", "Basic user:pass");
map = new LinkedHashMap();
map.put("SalesOrg", "IND1");
partneHashMap = new LinkedHashMap();
partneHashMap.put("ItMate", map);
message.setBody(partneHashMap);
I am getting Error
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<message xml:lang="en">Could not send Message.</message>
</error>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Praveen,
In your Odata model I can see that you have defined SalesOrg as the primary key but in the SOAP response from SOAPUI I can see that SalesOrg is not a primary key since the value of SalesOrg(IND1) been repeated in each item. I doubt that's resulting in only one record in the response of Odata request. You should define right primary and try again.
Regards, Midhun
SAP Customer Experience Group - CEG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please share the complete info otherwise it would be very difficult to understand your issues.
Response mapping should be like below:
Which SMP 3.0 version you are working on ? like SMP 3.0 SP04 ? Make sure you do all Odata modeling in Eclipse kepler.
After deployment, what is the response of service document? Are you able to get the record for given Sales Org?
Did you test WSDL file in SOAP UI tool or Storm? Did you get more than one record? Can you share screenshot of the same?
Regards,
JK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When you test the WSDL in SOAP UI tool or in STORM (Storm - Home), how many records do you get against an operation? Can you share the steps done for Odata model creation?
Few screenshots would be helpful to understand your requirement.
Regards,
JK
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.