on 03-16-2010 7:51 PM
Hi SDN,
I am running into an issue while testing my client proxy which I set up to consume a WSDL in ABAP. I have created the proxy, and created the logical port and rfc connection through SOAMANAGER. I tested the generated RFC connection and it's testing fine. I am trying to test the proxy in Test Service Consumer (through se80), and am replacing the standard text in the message with the SOAP code below.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://api.channeladvisor.com/webservices/">
<soapenv:Header>
<web:APICredentials>
<!--Optional:-->
<web:DeveloperKey>DEVELOPERKEY</web:DeveloperKey>
<!--Optional:-->
<web:Password>PASSWORD</web:Password>
</web:APICredentials>
</soapenv:Header>
<soapenv:Body>
<web:Ping/>
</soapenv:Body>
</soapenv:Envelope>
When I check the well-formedness, it's fine. When I execute it, it comes up with the following error.
System expected the element
'Ping'
, Byte-Offset in XML: 131 , ST:
/1SAI/TAS1B86CF1D6339F13DB805, Line: 67
I checked the SOAP with soapUI using the same code as above and it returned ok.
Does anyone know what I'm doing wrong?
Thanks,
Jameel
The example at [http://developer.channeladvisor.com/display/cadn/Ping+Examples] looks like
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<APICredentials xmlns="http://api.channeladvisor.com/webservices/">
<DeveloperKey>string</DeveloperKey>
<Password>string</Password>
</APICredentials>
</soap:Header>
<soap:Body>
<Ping xmlns="http://api.channeladvisor.com/webservices/" />
</soap:Body>
</soap:Envelope>
... are you able to adapt the "body" of your message to look more like this and try again? What does the simple transformation mentioned (/1SAI/TAS1B86CF1D6339F13DB805) look like in transaction STRANS?
Jonathan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jonathan,
Thank you for your reply. I wasn't aware that /1SAI/TAS1B86CF1D6339F13DB805 was a transformation name, and that I could check it in STRANS. Here is the code from that transformation:
[!--
name /1SAI/TAS1B86CF1D6339F13DB805
object CLAS
obj_name ZCAOSCO_SHIPPING_SERVICE_SOAP
method PING
--]
[?sap.transform simple?]
[tt:transform version="1.0" xmlns:tt="http://www.sap.com/transformation-templates" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sapgdt="http://sap.com/xi/SAPGlobal/GDT" xmlns:ddic="http://www.sap.com/abapxml/types/dictionary" xmlns:p&]
rx="urn:sap.com:proxy:HD6:/1SAI/TAS1B86CF1D6339F13DB805:700:2008/06/25" xmlns:n0="http://api.channeladvisor.com/webservices/"]
[tt:root name="INPUT" type="ddic:ZCAOSPING_SOAP_IN"/]
[tt:variable name="_C_NIL" val="''"/]
[tt:template name="INPUT.ZCAOSPING_SOAP_IN"]
[tt:context]
[tt:root name="ROOT" type="ddic:ZCAOSPING_SOAP_IN"/]
[tt:variable name="_C_NIL" val="''"/]
[/tt:context]
[tt:ref name="ROOT"]
[tt:apply name="ZCAOSPING_SOAP_IN_ATTR"]
[tt:with-root name="ROOT"/]
[/tt:apply]
[tt:deserialize]
[tt:assign to-var="_C_NIL" val="''"/]
[tt:apply name="XSI_NIL_READ"]
[tt:with-parameter name="CTRL" var="_C_NIL"/]
[/tt:apply]
[/tt:deserialize]
[/tt:ref]
[/tt:template]
[tt:template name="XSI_NIL_READ"]
[tt:context]
[tt:parameter name="CTRL" kind="in/out"/]
[/tt:context]
[tt:d-cond]
[tt:attribute name="xsi:nil"]
[tt:switch]
[tt:cond]
[tt:text]true[/tt:text]
[tt:assign to-var="CTRL" val="'2'"/]
[/tt:cond]
[tt:cond]
[tt:text]false[/tt:text]
[/tt:cond]
[tt:cond]
[tt:text]1[/tt:text]
[tt:assign to-var="CTRL" val="'2'"/]
[/tt:cond]
[tt:cond]
[tt:text]0[/tt:text]
[/tt:cond]
[/tt:switch]
[/tt:attribute]
[/tt:d-cond]
[/tt:template]
[tt:template name="ZCAOSPING_SOAP_IN_ATTR"]
[tt:context]
[tt:root name="ROOT" type="ddic:ZCAOSPING_SOAP_IN"/]
[tt:variable name="_C_NIL" val="''"/]
[/tt:context]
[tt:ref name="ROOT"/]
[/tt:template]
[tt:template]
[tt:clear ref="INPUT"/]
[tt:namespace name="n0"/]
[n0:Ping tt:extensible="deep"]
[tt:namespace name="prx"/]
[tt:apply name="INPUT.ZCAOSPING_SOAP_IN"]
[tt:with-root name="ROOT" ref="INPUT"/]
[/tt:apply]
[/n0:Ping]
[/tt:template]
[/tt:transform]
I replaced < with [ and > with ] above to try and help it post correctly, doesn't seem to help.
At line 67 (from the error message), it looks like it is looking for "n0". When I initially went into test, SAP generated the following as the message:
<n0:Ping xmlns:n0="http://api.channeladvisor.com/webservices/" xmlns:prx="urn:sap.com:proxy:HD6:/1SAI/TAS1B86CF1D6339F13DB805:700:2008/06/25" />
It has the "n0" that the transformation seems to be looking for, but when I test with that, it says:
SoapFaultCode:1 Server was unable to process
request. Unable to parse the request. Please
validate your SOAP XML.
I tried with the code from the channelAdvisor page (before I posted actually), and it came up with the same error.
I'm pretty new to SOAP, XML, and Webservices in general with SAP so I might be missing something simple.
Any help is appreciated.
Thanks,
Jameel
Edited by: JameelM on Mar 17, 2010 4:28 PM
Hi,
In my opinion <soapenv:Header> is not supported by SAP webservice infrastructure. goto wsdl of proxy and see if you can see <soapenv:Header>
there, i trust you won't find it there.
SAP SOAP runtime create its own header and to change/add something in header you need to some tricks (i don't remember exact name of class-method).
Regards,
gourav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.