• No replies
557 Posts

Pinned topic Creating web service client through emf project

‏2013-03-20T11:37:50Z |
I am trying to create a web service client through emf project in RAD 7.5 from a wsdl which is of style rpc/encoded.

<soap:binding style=
"rpc" transport=
""> </soap:binding>

1. I followed this infocenter tutorial however in the tutorial wsdl is of document type.
Will that make any difference in the procedure of making the client?

2.Also some of the types of messages in the wsdl are plain integer ie. there is no complex type which is defined for the request object which leads to creation of the sdo through the emf project creation wizard.
such as :

<wsdl:message name=
"customer_getSoapIn"> <wsdl:part name=
"customer_id" type=
"s:integer"> <s:documentation> customer
's id </s:documentation> </wsdl:part> </wsdl:message>   <wsdl:message name=
"customer_getSoapOut"> <wsdl:part name=
"return" type=
"tns:CustomerType"> <s:documentation> returns a customerType object </s:documentation> </wsdl:part> </wsdl:message>

How will i send such a integer in the request xml? As i can see from the tutorial some request object from SDO is passed into the request object (DataObjectInvocationServiceObjectImpl)

DocumentRoot docRoot = MemberFactory.eINSTANCE.createDocumentRoot(); docRoot.setPushUser(pushUser); DataObjectInvocationServiceObjectImpl requestDataObject = 

new DataObjectInvocationServiceObjectImpl(); requestDataObject.setDataObject(docRoot.getPushUser());   requestDataObject.setDataObject(docRoot.getPushUser()); DataObjectInvocationServiceObjectImpl responseDataObject = 

new DataObjectInvocationServiceObjectImpl(); String actionCode = 

null; InvocationService invocationService = 

new InvocationService(COMPONENT_ID, action, actionCode); invocationService.invoke(requestDataObject, responseDataObject); 

return (PushUserConfirmationType)responseDataObject.getDataObject();

3. Also there is no DocumentRoot generated from the emf project wizard . What is its role and is it really required?

4. If i want to add custom header to the soap header to pass authentication information in it instead of the header that is automatically generated how can i do that? eg i want to add such a tag in soap header :

<soapenv:Header> <ReqHeader> <app_key>username</app_key><app_secret>****</app_secret> </ReqHeader> </soapenv:Header>

5. Is it possible to send CustomerType Sdo in such a xml format in the soap request? :

<pric:customer_add soapenv:encodingStyle=
""> <data xsi:type=
"ns2:Map"> <item> <key xsi:type=
"xsd:string">first_name</key> <value xsi:type=
"xsd:string">John</value> </item> <item> <key xsi:type=
"xsd:string">last_name</key> <value xsi:type=
"xsd:string">Doe</value> </item> <item> <key xsi:type=
"xsd:string">mobile</key> <value xsi:type=
"xsd:string">04000007</value> </item> <item> <key xsi:type=
"xsd:string">email</key> <value xsi:type=
"xsd:string"></value> </item> </data>   </pric:customer_add>

How should i proceed to send such a xml ?