Topic
  • 1 reply
  • Latest Post - ‏2013-02-07T03:19:39Z by SystemAdmin
GaryBromley
GaryBromley
5 Posts

Pinned topic Web Services Invoke Service has missing SOAPENV prefix

‏2012-02-07T00:49:18Z |
Dear Guru's,

I have created a simple scenario to receive an HTTP request, READ the XML and then invoke a Web Service (SAP Business One DI Service).
My problem is the resultant outbound SOAP payload does NOT have a namespace prefix associated with it. An example of the message (traced with Wireshark, notice the missing SOAP-ENV from the SOAP elements: Envelope & Body):

POST /B1WS/Service.asmx HTTP/1.1 User-Agent: WebSphere CastIron Client SOAPAction: 
"LoginService/Login" Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, * / *; q=.2 Content-Type: text/xml;charset=
"utf-8" Host: isdfin01.dev.mel.int Content-Length: 469   <?xml version=
"1.0" encoding=
"UTF-8"?><Envelope xmlns=
"http://schemas.xmlsoap.org/soap/envelope/"><Body><m:Login xmlns:m=
"http://www.sap.com/SBO/DIS"> <m:DatabaseServer>String</m:DatabaseServer> <m:DatabaseName>String</m:DatabaseName> <m:DatabaseType>dst_MSSQL</m:DatabaseType> <m:CompanyUsername>String</m:CompanyUsername> <m:CompanyPassword>String</m:CompanyPassword> <m:Language>ln_Hebrew</m:Language> <m:LicenseServer>String</m:LicenseServer> </m:Login></Body></Envelope>HTTP/1.1 200 OK Date: Tue, 07 Feb 2012 00:29:12 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: 

private Content-Type: text/xml;charset=
"utf-8" Content-Length: 284   <?xml version=
"1.0"?><env:Envelope xmlns:env=
"http://schemas.xmlsoap.org/soap/envelope/"><env:Body><env:Fault><env:Code><env:Value>env:Sender</env:Value></env:Code><env:Reason><env:Text xml:lang=
"en">No SOAP Envelope found</env:Text></env:Reason></env:Fault></env:Body></env:Envelope>

As you can see, the SAP B1 DI Service responds with "No SOAP Envelope found".

If I use the same WSDL file, used to create the Web Service in CI, in either soapUI or XMLSpy tools, the payload is as follows:

POST /B1WS/Service.asmx HTTP/1.1 Content-Type: text/xml; Charset=UTF-8 User-Agent: XML Spy SOAPAction: 
"LoginService/Login" Host: isdfin01.dev.mel.int Content-Length: 685 Connection: Keep-Alive Cache-Control: no-cache   <SOAP-ENV:Envelope xmlns:SOAP-ENV=
"http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC=
"http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"> .<SOAP-ENV:Body> ..<m:Login xmlns:m=
"http://www.sap.com/SBO/DIS"> ...<m:DatabaseServer>String</m:DatabaseServer> ...<m:DatabaseName>String</m:DatabaseName> ...<m:DatabaseType>dst_MSSQL</m:DatabaseType> ...<m:CompanyUsername>String</m:CompanyUsername> ...<m:CompanyPassword>String</m:CompanyPassword> ...<m:Language>ln_Hebrew</m:Language> ...<m:LicenseServer>String</m:LicenseServer> ..</m:Login> .</SOAP-ENV:Body> </SOAP-ENV:Envelope> HTTP/1.1 200 OK Date: Tue, 07 Feb 2012 00:37:23 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: 

private Content-Type: text/xml; Charset=UTF-8; charset=utf-8 Content-Length: 405   <?xml version=
"1.0"?><env:Envelope xmlns:env=
"http://schemas.xmlsoap.org/soap/envelope/"><env:Body><env:Fault><env:Code><env:Value>env:Receiver</env:Value><env:Subcode><env:Value>env:-119</env:Value></env:Subcode></env:Code><env:Reason><env:Text xml:lang=
"en">Database server type not supported</env:Text></env:Reason><env:Detail><Command>Login</Command></env:Detail></env:Fault></env:Body></env:Envelope>


The fault returned here is correct as I am using test values to illustrate the issue in the Login message.

My understanding of the SOAP Protocol 1.1 is "A SOAP application SHOULD include the proper SOAP namespace on all elements and attributes defined by SOAP in messages that it generates".

I am running Studio 6.1.0.3 and a virtual appliance at the same level, this problem exists in both.

Is there a setting somewhere which will change the behaviour of CI and generate a namespace prefix (soap, soapenv, SOAP-ENV, etc) on the SOAP elements?
Updated on 2013-02-07T03:19:39Z at 2013-02-07T03:19:39Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    238 Posts

    Re: Web Services Invoke Service has missing SOAPENV prefix

    ‏2013-02-07T03:19:39Z  
    Any response? I have the same issue.