on 06-16-2006 11:11 AM
Hi all,
I'm trying to connect and old 4.5b system to XI SP16 to make it receive information from external Web Services.
My scenario is made up of a sender RFC adapter and a SOAP receiver which is sending the message to the Google web service (http://api.google.com/GoogleSearch.wsdl) and then awaiting a response from it.
I'm stuck with this error: "No Deserializer found to deserialize a ':key'". The problem is that XI is sending this kind of message:
<m:doGoogleSearch xmlns:m="urn:GoogleSearch" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<key>mykey</key>
<q>testing</q>
<start>0</start>
<maxResults>1</maxResults>
<filter>true</filter>
<restrict>String</restrict>
<safeSearch>true</safeSearch>
<lr>String</lr>
<ie>String</ie>
<oe>String</oe>
</m:doGoogleSearch>
while Google is expecting this:
<m:doGoogleSearch xmlns:m="urn:GoogleSearch" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<key xsi:type="xsd:string">mykey</key>
<q xsi:type="xsd:string">testing</q>
<start xsi:type="xsd:int">0</start>
<maxResults xsi:type="xsd:int">1</maxResults>
<filter xsi:type="xsd:boolean">true</filter>
<restrict xsi:type="xsd:string">String</restrict>
<safeSearch xsi:type="xsd:boolean">true</safeSearch>
<lr xsi:type="xsd:string">String</lr>
<ie xsi:type="xsd:string">String</ie>
<oe xsi:type="xsd:string">String</oe>
</m:doGoogleSearch>
with explicitly declared xsi:type.
I've tested both messages with XMLSpy and the first one is always returning the same error.
Is there a way to make XI send an XML message with written xsi:type?
Many thanks in advance!
Max
Hi Massimiliano,
Did you follow the steps that I provide on earlier post?
When I told create your own data types It means using the usual data types in XI in graphical mode. But first you need to know what is the compatible element for xsi:type.
Go to http://service.sap.com/xi > Media Library > Documentation and there you will find this xls document -> SAP XI 3.0 (SP11) - Supported XML Schema and WSDL (EN) in this document you have all the compatible elements of wsdl for XI.
After that you are able to do your soap request data type and put it with inbound interface to call Google webservice.
Do something identical with data type generated by WSDL (the external definition that you have imported) and change the xsi:type to the correspondent element compatible with WSDL rpc-based.
You also can do it with XSLT mapping if you want. The mapping that you want is easy to do in XSLT and it is a good idea start learn a bit of XSLT. Check this weblog: /people/r.eijpe/blog/2005/11/04/using-abap-xslt-extensions-for-xi-mapping
Hope it helps,
Ricardo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ricardo!
I followed your suggestion to create a simple XSLT mapping program (in the ABAP stack) and I added it to the Interface Mapping in the Integration Repository. The result is exactly the soap message that the Google web-service is expecting.
I'm attaching the XSLT code below in case somebody has the same problem... thanks again for your hint!!
Regards!
Max
<xsl:transform version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sap="http://www.sap.com/sapxsl"
>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<ns1:doGoogleSearch xmlns:ns1="urn:GoogleSearch" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<key xsi:type="xsd:string"> <xsl:value-of select= "//key"/> </key>
<q xsi:type="xsd:string"> <xsl:value-of select= "//q"/> </q>
<start xsi:type="xsd:int"> <xsl:value-of select= "//start"/> </start>
<maxResults xsi:type="xsd:int"> <xsl:value-of select= "//maxResults"/> </maxResults>
<filter xsi:type="xsd:boolean"> <xsl:value-of select= "//filter"/> </filter>
<restrict xsi:type="xsd:string"> <xsl:value-of select= "//restrict"/> </restrict>
<safeSearch xsi:type="xsd:boolean"> <xsl:value-of select= "//safeSearch"/> </safeSearch>
<lr xsi:type="xsd:string"> <xsl:value-of select= "//lr"/> </lr>
<ie xsi:type="xsd:string"> <xsl:value-of select= "//ie"/> </ie>
<oe xsi:type="xsd:string"> <xsl:value-of select= "//oe"/> </oe>
</ns1:doGoogleSearch>
</xsl:template>
</xsl:transform>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i didnt go through that thread but , i have issue earlier with webservices using RPC format , as i see xi more in to Doc format of WSDL ,
IF YOU DIRECTLY CALL THE URL : I.E. http://api.google.com/search/beta2
You will see it as a soap rpc router.
check inthis perspective also
Vara
[PLEASE REWARD FOR POSTING]
User | Count |
---|---|
88 | |
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.