SOAP 1.2 web service fails when SOAP header has digital signatures

Hi,
When we upgraded our JAX-RPC web services from SOAP 1.1 to SOAP 1.2, they started failing with the following response.
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
<env:Upgrade>
<env:SupportedEnvelope xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"
qname="soap12:Envelope"/>
</env:Upgrade>
</env:Header>
<env:Body>
<env:Fault xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode>env:VersionMismatch</faultcode>
<faultstring>Version Mismatch</faultstring>
<faultactor>http://schemas.xmlsoap.org/soap/actor/next</faultactor>
</env:Fault>
</env:Body>
</env:Envelope>
The following two errors were in log.xml
An error occurred for port: {http://xxx.xxx.xxx/xxx/1.0/ws/TestService}TestServicePort: oracle.j2ee.ws.common.soap.fault.SOAP11VersionMismatchException: Version Mismatch.
Unable to determine operation id from SOAP Message.
We use web service handlers to add and verify digital signatures. The request message seems to be making it to the web service but is failing before reaching the web service handler which verifies the digital signature.
Everything works fine when we don't add the digital signatures. The SOAP message without the digital signature doesn't have the SOAP header. I've listed the SOAP message with the digital signature below.
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
     xmlns:ns0="http://xxx.xxx.xxx/1.4/"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <env:Header>
          <wsse:Security
               xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
               <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
                    <ds:SignedInfo>
                         <ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></ds:CanonicalizationMethod>
                         <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></ds:SignatureMethod>
                         <ds:Reference URI="#Body">
                              <ds:Transforms>
                                   <ds:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></ds:Transform>
                              </ds:Transforms>
                              <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod>
                              <ds:DigestValue>...</ds:DigestValue>
                         </ds:Reference>
                    </ds:SignedInfo>
                    <ds:SignatureValue>
                    </ds:SignatureValue>
                    <ds:KeyInfo>
                         <ds:X509Data>
                              <ds:X509Certificate>
                              </ds:X509Certificate>
                         </ds:X509Data>
                         <ds:KeyValue>
                              <ds:RSAKeyValue>
                                   <ds:Modulus>
                                   </ds:Modulus>
                                   <ds:Exponent>AQAB</ds:Exponent>
                              </ds:RSAKeyValue>
                         </ds:KeyValue>
                    </ds:KeyInfo>
               </ds:Signature>
          </wsse:Security>
     </env:Header>
     <env:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Body">
          <ns0:SearchRequestMessage
               xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:gml="http://www.opengis.net/gml"
               xmlns:xxx="http://xxx.xxx.xxxl/1.4/"
               xmlns:ns5="http://www.w3.org/1999/xlink"
               >
               <xxx:SearchCriteria itemsPerPage="10" maxTimeOut="180000" startIndex="1" startPage="1" totalResults="25">
               </xxx:SearchCriteria>
          </ns0:SearchRequestMessage>
     </env:Body>
</env:Envelope>
We are using Oracle AS 10.1.3.3.0, WSDL 1.1, and SOAP 1.2. Everything works fine with WSDL 1.1 and SOAP 1.1.

Take a look 'How to Use a Custom Serializer with Oracle Application Server Web Services' [1].
In your case, you should be looking at BeanMultiRefSerializer (org.apache.soap.encoding.soapenc), which will serialize your data using href and providing a way to deal with cycles.
All the best,
Eric
[1] http://www.oracle.com/technology/tech/webservices/htdocs/samples/serialize/index.html

Similar Messages

  • PL/SQL  Web Service fails when deployed to WebLogic server

    I have a web service generated via JDeveloper from a PL/SQL package. It runs fine both when tested in JDeveloper and when the WAR file is manually deployed to the Integrated WebLogic Server. However, when the WAR file is deployed to our actual WebLogic server, it fails. Other existing web services that were not generated with the JDeveloper wizard work correctly. I am having trouble finding any references to this type of issue to solve it. Are there any ideas what might be causing the WSDL to fail?
    References:
    * JDeveloper 11.1.1.6.
    * No proxies are involved.
    * The PLSQL package is a basic function that returns varchar2 input fed in by one parameter:
    create or replace package body pkg_ws_test as
    function test_me (p_anything_in varchar2)
    return varchar2 is
    begin
    return p_anything_in;
    end test_me;
    end pkg_ws_test;
    * Top of error stack is as follows:
    oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: WSDLException: faultCode=OTHER_ERROR: Failed to read WSDL from http://svr:8892/wsTest2-getSame-context-root/TestMePort?wsdl: HTTP connection error code is 500 at oracle.sysman.emSDK.webservices.wsdlparser.ParsedWSDLFactoryImpl.getParsedWSDL(ParsedWSDLFactoryImpl.java:157) at oracle.sysman.emSDK.webservices.wsdlparser.ParsedWSDLFactoryImpl.getParsedWSDL(ParsedWSDLFactoryImpl.java:87) at oracle.sysman.emas.model.wsmgt.WSTestModel.init(WSTestModel.java:325) at
    ...

    Hi,
    The below error trace you've provided doesn't confirm that Weblogic server has thrown the error.
    oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: WSDLException: faultCode=OTHER_ERROR: Failed to read WSDL from http://svr:8892/wsTest2-getSame-context-root/TestMePort?wsdl: HTTP connection error code is 500 at oracle.sysman.emSDK.webservices.wsdlparser.ParsedWSDLFactoryImpl.getParsedWSDL(ParsedWSDLFactoryImpl.java:157) at oracle.sysman.emSDK.webservices.wsdlparser.ParsedWSDLFactoryImpl.getParsedWSDL(ParsedWSDLFactoryImpl.java:87) at oracle.sysman.emas.model.wsmgt.WSTestModel.init(WSTestModel.java:325) at
    Please paste complete stacktrace of the error to check and also include the caused by section in the error.
    Thanks,
    Vijaya

  • Web service fails when waiting longer than a minute

    I have a web service which talks to asp.net webservice (website) . Everything works fine when data received is less. but when data is more which takes more than a minute to receive responce from server as3 throws fault code error (decoding error) . Is there any way in which I can ask the calling webservice to wait till it receives data.
    This happens only on frist request as IIS is slow in first responce . 2ND REQUEST do not have this problem as IIS caches the webservice and responce is fast.
    Any help please??

    There are 30 frames in one second of video. So you can specify down to the frame level, which is 1/30th of a second.
    Is the Duration box switching to some other time every time you type in 1:45:00?
    For instance this is a 5 second clip plus 3 frames. To get this set properly I would type in 1:45:00, then click done. I don't know if it is different under older versions of iMovie, as I'm using iMovie '11 for thisi example.

  • OWSM 10.1.3.4 and Non-SOAP XML-based web service

    Hi all,
    According to the OWSM 10.1.3.4 Administrator's Guide, "all Web services registered with an Oracle WSM Gateway are virtualized as both a SOAP and non-SOAP Web service." To access the non-SOAP (XML-only) web service, the documentation states "The non-SOAP virtualized URL can be determined from the virtualized SOAP URL by replacing the services keyword in the URL with the xml keyword."
    For example, if the SOAP virtualized endpoint is:
    http://host:port/gateway/services/SID0003001
    then, the non-SOAP XML service endpoint is:
    http://host:port/gateway/xml/SID0003001
    I have several web services registered with an OWSM gateway, running on SOA Suite 10.1.3.4, and can access those without any problem. However, when I attempt to access the "/gateway/xml" version of these services, I simply get an HTTP 200 response header with a null body.
    Does anyone have any ideas what could be causing this or what the secret is to get the non-SOAP XML service feature of OWSM to work?
    Thanks!
    --Gary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi all,
    According to the OWSM 10.1.3.4 Administrator's Guide, "all Web services registered with an Oracle WSM Gateway are virtualized as both a SOAP and non-SOAP Web service." To access the non-SOAP (XML-only) web service, the documentation states "The non-SOAP virtualized URL can be determined from the virtualized SOAP URL by replacing the services keyword in the URL with the xml keyword."
    For example, if the SOAP virtualized endpoint is:
    http://host:port/gateway/services/SID0003001
    then, the non-SOAP XML service endpoint is:
    http://host:port/gateway/xml/SID0003001
    I have several web services registered with an OWSM gateway, running on SOA Suite 10.1.3.4, and can access those without any problem. However, when I attempt to access the "/gateway/xml" version of these services, I simply get an HTTP 200 response header with a null body.
    Does anyone have any ideas what could be causing this or what the secret is to get the non-SOAP XML service feature of OWSM to work?
    Thanks!
    --Gary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Web service connection problem via web service data control (SOAP/REST)

    Hi
    I developed a simple "hello word" web service that I deployed on Integrated WLS.
    Web service works fine - I tested it from SoapUI.
    I created another application to call "hello word" using  "web service data control (SOAP/REST)" in JDeveloper.
    When I test it via "Oracle ADF Model Tester" application works as I'm expecting, but when I create JSPX page,
    drag and drop webservice method as ADF parameter form and run it receive notification (screenshot):
    "WSM-07620 : Agent cannot enforce policies due to either failure in retrieving polices or error in validations, detail= "WSM-02557 The documents required to configure the Oracle Web Services Manager runtime have not been retrieved from the Policy Manager application (wsm-pm), possibly because the application is not running or has not been deployed in the environment. The query "&(@appliesTo~="WS-CONNECTION()")(policysets:global/%)" is queued for later retrieval. "."
    What I'm doing wrong?
    Why I'm able to access web service from any other application but not from jdeveloper?
    Regards

    Hi,
    I am not sure which JDev you are using, but looks like you have some policies setup for WSDC using GPA (global policy attachment) and your policy manager(wsm-pm) is not running. Can you check if the wsm-pm application is properly deployed in your Integrated WLS. You can see this from the list of deployed apps in WLS console.
    -Vishal

  • Web Service posting via SOAP.request - Security settings prevent access...

    I'm trying to call a web service via the SOAP.request object in javascript embedded into my Interactive Form.  I've successfully done this with SAP NetWeaver 7.0 trial version however now I'm having this issue on a production setup.  The PDF generates fine and I can fill out the form and everything.  I checked the properties of both PDF documents (one that works from the trial and one that doesn't from the prod box) and they are the same, expect the one that works is PDF Version 1.6, and the one that doesn't is PDF Version 1.7.
    Here's the client-side error:
    Acrobat EScript Built-in Functions Version 8.0
    Acrobat Annotations / Collaboration Built-in Functions Version 8.0
    Acrobat Annotations / Collaboration Built-in Wizard Functions Version 8.0
    Acrobat Multimedia Version 8.0
    Acrobat SOAP 8.0
    NotAllowedError: Security settings prevent access to this property or method.
    SOAP.request:31:XFA:data[0]:mainform[0]:btnRelease[0]:click
    Here's the snippet of JavaScript code:
    var response = SOAP.request();
    Here are the security properties of the malfunctioning PDF:
    Security Method: No Security
    Can be Opened By: All versions of Acrobat
    Printing: Allowed
    Document Assembly: Not Allowed
    Content Copying: Allowed
    Content Copying for Accessibility: Allowed
    Page Extraction: Not Allowed
    Commenting: Allowed
    Filling of form fields: Allowed
    Signing: Allowed
    Creation of Template Pages: Allowed
    How do I determine what the culprit is?

    Michael,
    PDF Version 1.6 means Adobe Reader 7.0.x family and PDF version 1.7 means Adobe Reader 8.0.x or 9.0.x if I am not wrong.
    Also if you check LiveCycle Designer Help (Using LiveCycle Designer ES > Working with Data Sources > About data sources > Working with data connections) it clearly says that with LiveCycle Designer 8.0 secured web services are not supported and there are additional security settings for Reader 8.0 onwards, that may be causing the issue.
    Chintan

  • A sample web service to return SOAP fault message for application error

    Hi,
    I need to test behavior of XI, in case of application error (using <detail> tag in soap:fault) from web service in nosoap mode.
    If any one is aware of a free web service, which can raise application soap fault message, Kindly provide the details.
    Thanks in Advance,
    Rahul..

    Hi,
    What is the URL to which you are posting the SOAP message?
    Is it?
    http://<host>:<j2ee-port>/XISOAPAdapter/MessageServlet? channel=<party>:<service>:<channel>
    If yes, then like mentioned the QOS is picked from the Sender SOAP adapter.
    But, if the URL is ,
    http://<server>:<ABAP-port>/sap/xi/engine?type=entry&version=3.0&Sender.Service=<YourService>&Interface=<YourNamespace>%5E<YourInterface> 
    Then you need to give the QOS as <b>,&QualityOfService=ExactlyOnce</b> appended to the above URL.
    More, /people/stefan.grube/blog/2006/09/21/using-the-soap-inbound-channel-of-the-integration-engine
    Regards
    Bhavesh

  • Web service response contains SOAP Headers with "mustUnderstand" true

    Hi
    I have a requirement where in I have to consume a web service as adaptive web service model, and while executing the service pass a mandatory parameter to the soap header. We are able to set the mandatory parameter to the soad header. We got the code snippet to do this from a wiki link
    http://wiki.sdn.sap.com/wiki/display/WDJava/FAQ-Models-AdaptiveWebService#FAQ-Models-AdaptiveWebService-WhatarethefunctionalgapsofthecurrentAdpativeWSModelImporter%3F
    On executing the service now through web dynpro we are getting the below error
    "Web service response contains SOAP Headers with "mustUnderstand" true which are not handled by the client runtime"
    Any thoughts on how to handle this mustUnderstand attribute with some code snippet? Appreciate all help.
    Thanks,
    KN.

    Hi
    Have you found the workaround?
    Sorry for refreshing topic. Flag mustUnderstand ='1' in response is unussual thing.
    BR

  • Soap Router versus Web Service Servlet

    Hello:
    I am trying to understand the fundamental difference between a SOAP Router versus
    Web Service Servlet?. In websphere there is a concept called WSG(Web Service
    Gateway) on which we can configure an handler to intercept the incoming soap requests.
    But in weblogic I do not think we can configure any handler on Web Service Servlet.
    So I think for this very purpose you have this soap router right ?. If this is
    correct then does the soap router will forward the call to the Web Service Servlet
    which implements the soap engine.
    Please clarify,
    Thanks,
    Vijay

    Hello,
    Right, today there is not a global handler that can be configured;
    however you can do servlet filter or check out an early access SOAP
    Router[1] from Manoj.
    Could you give us a snapshot of your use case?
    Thanks,
    Bruce
    [1]
    http://manojc.com/?router/readme.html
    Vijay Cherukumudi wrote:
    >
    Hello:
    I am trying to understand the fundamental difference between a SOAP Router versus
    Web Service Servlet?. In websphere there is a concept called WSG(Web Service
    Gateway) on which we can configure an handler to intercept the incoming soap requests.
    But in weblogic I do not think we can configure any handler on Web Service Servlet.
    So I think for this very purpose you have this soap router right ?. If this is
    correct then does the soap router will forward the call to the Web Service Servlet
    which implements the soap engine.
    Please clarify,
    Thanks,
    Vijay

  • Weblogic invoking web service failed due to socket timeout

    Hi,
    I encountered an error when I invoke web service from OBIEE 11g. The web serivce resides on Websphere running on other machine.
    An error says that "Invoking web service failed due to socket timeout." and it seems that it stopped in just 40 secs.
    Is there any settings of WebLogic server to avoid this? This web service normally runs for more than 60 sec.
    I have checked several parameters by WebLogic admin console and changed those values, but I still receive same errors.
    Regards,
    Fujio Sonehara

    Hey Eason,
    As I had previously mentioned, I have checked the FE server certs and have mentioned the signing algorithm it used to sign the certs, which was sha1DSA and not sha1RSA, I even checked my CA list of issued certs and have found all certs are signed the same.
    Signature algorithm: sha1DSA
    Signature Hash Algorithm: sha1
    Public Key:  RSA (1024 bit)
    I could run request and reinstall all day long it will still get the same certs signed with the algo..
    Doing some research I attempted to see if I could change the signing cert for a specific cert template that was being used to issue the Lync FE certs... however seems that from according to
    this, that I'd have to completely rebuild my CA before I'd be able to request and issue a cert with the proper signing algorithm?!
    This
    says its possible but not supported, what do I do in this situation? Is my only option to rebuild teh entire CA and cert infrastructure?
    I noticed my CSP is set to Microsoft Base DSS Cryptographic Provider, and under the CSP folder there is no "CNGHashAlgorithm" key so I'm using a "Next Gen CSP" apparently? Is this CSP good enough to support Lync...Straight up where is
    the Lync documentation on the CA setup requirements??
    This google link doesn't tell you how you should setup a CA for Lync, what settings need to set etc..

  • Wcf Data Service fails when more than 8properties  in the 'select=' portion

    Hi:
    I am using WCF Data Service and Oracle
    EF Provider is ODAC11.2 Release 4
    Wcf Data Service fails when more than 8 properties are specified in the 'select=' portion of the URI
    here is my code
    var q = from c in this.ctx.SALESORDER_ITEM
    select new
    c.SORDERDETAILID,
    c.IID,c.DMFLAG,c.OWNERID,c.SKUID,c.SKU_ID,c.TRADENO,c.SOURCEID,c.SORDERID
    excetion:
    InvalidOperationException: An error occurred for this query during batch execution. See the inner exception for details
    The inner exception is null, but the DataServiceClientException states: Value cannot be null Parameter name: value
    the exception is thrown in base.OnStartProcessingRequest(args) method (overridden).
    Here is the call stack as well:
    at System.Data.Services.WebUtil.CheckArgumentNull[T](T value, String parameterName)
    at System.Data.Services.Internal.ProjectedWrapper.set_PropertyNameList(String value)
    at lambda_method(Closure , Shaper )
    at System.Data.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper)
    at System.Data.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext()
    at System.Data.Services.Internal.ProjectedWrapper.EnumeratorWrapper.MoveNext()
    at System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService)
    at System.Data.Services.DataService`1.HandleNonBatchRequest(RequestDescription description)
    at System.Data.Services.DataService`1.HandleRequest()
    Is there a max number of properties in $select statement
    I think may be it is oracle provider's problem ,but i don't konw how to debug it Can anyone help me
    Any help is greatly appreciated

    I believe the null/empty string issue is unrelated to the 8 column issue, at least for ODP.NET. For example, let's take the original query in the OBE:
    http://.../yoursvcfile.svc/EMPLOYEES?$select=EMPLOYEE_ID,FIRST_NAME,LAST_NAME,SALARY,DEPARTMENT_ID,DEPARTMENT,EMAIL,PHONE_NUMBER,MANAGER_ID
    Let's make all the columns selected not nullable. You can do this with the Oracle Dev Tools. Specifically, PHONE_NUMBER and FIRST_NAME are the only nullable fields. I make them non-nullable and re-run the query and the same error occurs. Thus, these values should never be made null. Moreover, in all 107 rows, none of these row values consist of empty strings anyway.
    Looking into the problem further, WCF DS is calling methods in the System.Data.Services.Internal namespace.
    http://msdn.microsoft.com/en-us/library/system.data.services.internal.aspx
    Specifically, we see your issue when the ProjectedWrapperMany method is called. You will notice that there is ProjectedWrapper0, ProjectedWrapper1...ProjectedWrapper8 methods also present in the same namespace. As soon as the number of columns exceeds 8, ProjectedWrapperMany is called and we see the error. We're going to ask MS to help analyze the issue since this is an .NET-internal method being called.

  • I get an web service error when trying enable web services. I have latest update and rebooted

    i get an web service error when trying enable web services. I have latest update and rebooted

    hi there philnj,
    could you help the community narrow troubleshooting by providing a little more information? Particularly what model printer are we dealing with?
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • GetAndPublish web service failed due to an internal error

    Hello all,
    Been a little while, To start off we have no IP phones connected to Lync. We have a completely separate PBX and VoIP system.
    We have one FE server internally used to have internal users use Lync 2013 as a IM interface and Video conference. All users are running Lync 2013 with all the latest updates. Our Lync 2013 FE server is running on Windows 2008 R2 with all the latest updates.
    v I noticed in our event log the follow error v
    GetAndPublish web service failed due to an internal error. Request Details - Entity: [[email protected]], Device Id: [9A1A1E15-865F-5376-88CD-4384205012F9], Authenticated User: [sip:[email protected]]. Additional Context: [CA_Failure: InternalError] Cause:
    This is an unexpected failure Resolution: Re-start the web server. If you see this error continuously, examine the server traces and contact product support.
    I have googled and only came across technet forums that state checking certificate related issues.. or based around the IP Phones not authenticating. such as
    here, however this guy noted a certain algorithm required by the CA to work properly "RSASSA-PSS algorythm instead of RSAsha1". Now I'm not exactly sure how to check up on this, and I also don't get why everything seems to work fine but I keep
    getting these events populating.
    I also ran "Test-csclientauth" cmdlet on our FE server and came up with a failure much like on the link I provided above.
    Am I to assume these events are being populated because my Lync deployment was set up to use certs techincally not supported by Lync?

    Hey Eason,
    As I had previously mentioned, I have checked the FE server certs and have mentioned the signing algorithm it used to sign the certs, which was sha1DSA and not sha1RSA, I even checked my CA list of issued certs and have found all certs are signed the same.
    Signature algorithm: sha1DSA
    Signature Hash Algorithm: sha1
    Public Key:  RSA (1024 bit)
    I could run request and reinstall all day long it will still get the same certs signed with the algo..
    Doing some research I attempted to see if I could change the signing cert for a specific cert template that was being used to issue the Lync FE certs... however seems that from according to
    this, that I'd have to completely rebuild my CA before I'd be able to request and issue a cert with the proper signing algorithm?!
    This
    says its possible but not supported, what do I do in this situation? Is my only option to rebuild teh entire CA and cert infrastructure?
    I noticed my CSP is set to Microsoft Base DSS Cryptographic Provider, and under the CSP folder there is no "CNGHashAlgorithm" key so I'm using a "Next Gen CSP" apparently? Is this CSP good enough to support Lync...Straight up where is
    the Lync documentation on the CA setup requirements??
    This google link doesn't tell you how you should setup a CA for Lync, what settings need to set etc..

  • Failed to Verify License File Digital Signature

    We are trying test our license file with our add-on identifier as provided by SAP.  We keep getting a different error each time. Now we are getting "failed to verify license file digital signature" After we did the name substitutions in our license file. How do we fix this?

    Hi,
    I am sorry, but this is the forum around Solution Certification - not about general SDK questions or issues.
    Please use the "regular" Forum (SAP Business One SDK)!
    Thanks
    PS: You must never modify the license file!

  • Error Calling Web Service - VersionMismatch Wrong SOAP Version

    Hello,
    I am attempting to create a web service from a function module, and to call this web service from outside of SAP.
    I used the Web Service Creation Wizard to create a web service from BAPI_CURRENCY_GETLIST, and tested it using the Web Service Homepage button from transaction WSADMIN. Everything seems to work OK so far.
    To test calling the web service, I copied the SOAP envelope from the web service homepage into a vbscript file:
    Const HOST = "http://<server>.<domain>:<port>"
    Const URL = "/sap/bc/srt/rfc/sap/ZWSD_Currency?sap-client=<nnn>"
    ' Create the HTTP object
    Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
    Dim Request
    Request = "<?xml version=""1.0"" encoding=""UTF-8"" ?>" & _
              "<SOAP-ENV:Envelope xmlns:SOAP-ENV=""http://schemas.xmlsoap.org/soap/envelope"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema"" xmlns:xs=""http://www.w3.org/2001/XMLSchema-instance"">" & _
              "<SOAP-ENV:Header>" & _
              "<sapsess:Session xmlns:sapsess=""http://www.sap.com/webas/630/soap/features/session/"">" & _
              "<enableSession>true</enableSession>" & _
              "</sapsess:Session>" & _
              "</SOAP-ENV:Header>" & _
              "<SOAP-ENV:Body>" & _
              "<ns1:CurrencyGetlist xmnls:ns1='urn:sap-com:document:sap:soap:functions:mc-style'>" & _
              "<CurrencyList><item>" & _
              "<CURRENCY></CURRENCY>" & _
              "<CURRENCY_ISO></CURRENCY_ISO>" & _
              "<ALT_CURR></ALT_CURR>" & _
              "<VALID_TO></VALID_TO>" & _
              "<LONG_TEXT></LONG_TEXT>" & _
              "</item></CurrencyList>" & _
              "</ns1:CurrencyGetlist>" & _
              "</SOAP-ENV:Body>" & _
              "</SOAP-ENV:Envelope>"
    xmlhttp.open "POST", HOST & URL, False
    xmlhttp.send (request)
    MsgBox (xmlhttp.responseXML.xml)
    When I execute the vbscript, the response is
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelop/">
    <soap-env:Body>
      <soap-env:Fault>
        <faultcode>
          soap-env:VersionMismatch
        </faultcode>
        <faultstring xml:lang="en">
          Wrong SOAP Version
        </faultstring>
      </soap-env:Fault>
    </soap-env:Body>
    </soap-env:Envelope>
    The system log (transaction SM21) contains the messages:
    SOAP Runtime: SOAP Fault exception occurred in program CL_SOAP_MESSAGE===============CP in include CL_SOAP_ME SSAGE===============CM00X at position 34
    SOAP Runtime: Exception message: Severe processing error; SOAP fault handling required
    In the RFC trace (transaction SM59) I see
    XRFC> INFO 14:25:10: SOAP Transport Binding CL_SOAP_TRANSPORT_BINDING     <
    XRFC> ROOT->IFSOAP_TRANSPORT_BINDING~RESPONSE() Try to create response  <
    XRFC> message                                                             <
    XRFC>                                                                     <
    XRFC> INFO 14:25:10: SOAP Transport Binding CL_SOAP_TRANSPORT_BINDING     <
    XRFC> ROOT->IFSOAP_TRANSPORT_BINDING~RESPONSE() Response message        <
    XRFC> created                                                             <
    XRFC>                                                                     <
    XRFC> INFO 14:25:10: SOAP Transport binding CL_SOAP_HTTP_TPBND_ROOT       <
    XRFC> ->IF_SOAP_TRANSPORT_BINDING~RECEIVE() Try to receive message        <
    XRFC>                                                                     <
    XRFC> 20071218 142510 00037640: SOAP Fault Exception caught: : Wrong      <
    XRFC> SOAP Version                                                        <
    XRFC>                                                                     <
    XRFC>                                                                     
    XRFC> End of user trace                                                   
    How can I tell what version(s) of SOAP the NetWeaver 2004 platform supports? Has anyone seen and resolved this error?
    Thanks in advance,
    Mark

    Hi Anton,
    Thanks for the helpful suggestion. I did try setting SOAPAction using xmlhttp.setRequestHeader, but that didn't seem to make any difference. I may not have formatted the SOAP header correctly, however.
    What I noticed is that if I added a slash at the end of the xmlns:soap tag in the SOAP envelope, I got a different error message (SOAP Processing failure, error id = 112).
    I downloaded version 2.0 of the .NET framework and the SOAPSonar tool. SOAPSonar was able to format the SOAP envelope from the WSDL. When I pasted the SOAP envelope from SOAPSonar into my vbscript file, it worked. So, the vbscript looks like this:
    Const HOST = "http://nwr051.nwenergy:1080"
    Const URL = "/sap/bc/srt/rfc/sap/ZWSD_Currency?sap-client=100"
    Const FORMAT = "dd-MMM-yy"
    ' Create the HTTP object
    Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
    Dim Request
    Request = "<?xml version=""1.0"" encoding=""utf-8""?>" & _
              "<soap:Envelope xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:tns=""urn:sap-com:document:sap:soap:functions:mc-style"">" & _
              " <soap:Body>" & _
              "    <tns:CurrencyGetlist>" & _
              "      <CurrencyList>" & _
              "      </CurrencyList>" & _
              "    </tns:CurrencyGetlist>" & _
              "  </soap:Body>" & _
              "</soap:Envelope>"
    xmlhttp.open "POST", HOST & URL, False
    xmlhttp.send (request)
    MsgBox (xmlhttp.responseXML.xml)
    Again, thanks for taking the time to read through this and offer your insight.
    Regards,
    Mark

Maybe you are looking for