IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
Expand all | Collapse all

Server did not recognize the value of HTTP Header SOAPAction (ASP.NET WebService)

  • 1.  Server did not recognize the value of HTTP Header SOAPAction (ASP.NET WebService)

    Posted Fri June 28, 2013 02:36 PM

    Hi Friends,

    Can anyone help me to call a ASP.Net webservice?

    We already have some webservices in Java/JBOSS called by EntireX JXMLRPCServer… All works fine.

    The problem starts when i try to call a new webservice developed in ASP.Net

    I’ve followed all the same steps of the other services, but, when i try to test it on EntireX Eclipse XML Tester, received the message bellow:

    <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">
    <soap:Body>
    <soap:Fault>
    <faultcode>soap:Client</faultcode>
    <faultstring>System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: .
    at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
    at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message)
    at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
    at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)</faultstring>
    <detail></detail>
    </soap:Fault>
    </soap:Body>
    </soap:Envelope>

    Looking for the RAW View of the request, i can see that no SOAPAction was defined, but it was declared.

    Exemple of XML Request:

    <?xml version="1.0" encoding="UTF-8" ?>
    <!-- Generated by Software AG, EntireX Sample XML Generator (8.1.2.0020-0120) on 2013-06-28 at 13:32:58 -->
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xmm="http://namespace.softwareag.com/entirex/xml/mapping" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <SOAP-ENV:Header>
    <!-- <SOAPAction>http://localhost:2864/wsInterno.asmx/enviarEmailSimplificado</SOAPAction> -->
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
    <m:enviarEmailSimplificado xmlns:m="http://localhost:2864/wsInterno.asmx/">
    <pDestinatario>a</pDestinatario>
    <pSubject>b</pSubject>
    <pBody>c</pBody>
    <pHtmlBody>false</pHtmlBody>
    <pMensagemErro></pMensagemErro>
    </m:enviarEmailSimplificado>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    Example of RAW Request:

    POST /wsInterno.asmx 
    content-type: text/xml
    accept: text/xml
    SOAPAction: ""
    user-agent: EntireX Eclipse XML Tester (8.2.2.0.186)
    
    <?xml version="1.0" encoding="UTF-8" ?>
    <!-- Generated by Software AG, EntireX Sample XML Generator (8.1.2.0020-0120) on 2013-06-28 at 13:32:58 -->
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xmm="http://namespace.softwareag.com/entirex/xml/mapping" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <SOAP-ENV:Header>
    <!-- <SOAPAction>http://localhost:2864/wsInterno.asmx/enviarEmailSimplificado</SOAPAction> -->
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
    <m:enviarEmailSimplificado xmlns:m="http://localhost:2864/wsInterno.asmx/">
    <pDestinatario>a</pDestinatario>
    <pSubject>b</pSubject>
    <pBody>c</pBody>
    <pHtmlBody>false</pHtmlBody>
    <pMensagemErro></pMensagemErro>
    </m:enviarEmailSimplificado>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    Response Text:

    <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">
    <soap:Body>
    <soap:Fault>
    <faultcode>soap:Client</faultcode>
    <faultstring>System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: .
    at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
    at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message)
    at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
    at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)</faultstring>
    <detail></detail>
    </soap:Fault>
    </soap:Body>
    </soap:Envelope>

    Response RAW View:

    POST /wsInterno.asmx HTTP/1.1 500 Internal Server Error
    X-AspNet-Version: 4.0.30319
    Date: Fri, 28 Jun 2013 16:34:26 GMT
    Content-Length: 866
    Content-Type: text/xml; charset=utf-8
    Connection: Close
    Server: ASP.NET Development Server/10.0.0.0
    Cache-Control: private
    
    <?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"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: .
    at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
    at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message)
    at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
    at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)</faultstring><detail /></soap:Fault></soap:Body></soap:Envelope>

    IDL Declaration:

    /* Generated by Software AG, IDL Extractor for WSDL (8.1.2.0020-0120) on 2013-06-28 at 08:58:36
    /* URI=http://localhost:2864/wsInterno.asmx  (binding for SOAP 1.1)
    /* URI=http://localhost:2864/wsInterno.asmx  (binding for SOAP 1.2)
    library 'SYSTEM':'wsInterno' is
    program 'SENDMAIL':'enviarEmailSimplificado' is
    define data parameter
    1 pDestinatario 	  (A150)	In
    1 pSubject 	  (A300)	In
    1 pBody 	  (A8000)	In
    1 pHtmlBody 	  (L)	In
    1 pMensagemErro 	  (A300)	In Out
    1 enviarEmailSimplificadoResult 	  (L)	Out
    end-define

    #EntireX
    #Mainframe-Integration
    #webMethods


  • 2.  RE: Server did not recognize the value of HTTP Header SOAPAction (ASP.NET WebService)

    Posted Fri June 28, 2013 03:08 PM

    Hi Andre, it looks like you use an old version of EXX.

    The issue is not ASP.NET - it is web services standards/protocols which are very dynamic - and exposed via WSDL.
    EXX does see only WSDL - and EXX 8.1 is old/unsupported.

    In such cases - the best practice is to first load the WSDL into SOAPUI - and kick a SOAP request from SOAPUI; that way you see the exact SOAP that works, for comparison with XML RPC Server.

    Anyway - check out the topic of “IDL to XML Mapping with the XML Mapping Editor”;
    Perhaps this Edit - allows you to insert SOAP Action inside SOAP Header.

    Regards, Shmuel


    #EntireX
    #Mainframe-Integration
    #webMethods


  • 3.  RE: Server did not recognize the value of HTTP Header SOAPAction (ASP.NET WebService)

    Posted Thu July 04, 2013 10:30 AM

    Hi Shmuel, thanks for your reply.

    With the SoapUI all works fine.

    For a short test, i use the XML Request from the SoapUI into the XML Tester and not worked again.

    For other service written in Java, all works fine.

    Thanks a lot and best regards.


    #EntireX
    #webMethods
    #Mainframe-Integration


  • 4.  RE: Server did not recognize the value of HTTP Header SOAPAction (ASP.NET WebService)

    Posted Tue July 23, 2013 11:20 AM


  • 5.  RE: Server did not recognize the value of HTTP Header SOAPAction (ASP.NET WebService)

    Posted Wed July 24, 2013 08:46 AM

    Hi Guilherme,

    The XML Tester does not set the SOAPAction in the http header automatically, something which the XML RPC Server does do.
    Select the HTTP Test, generate a sample request and then open the settings (small button at the top right of the tester). There you will find the predefined http header properties. Check the SOAPAction header entry and then copy the action to the value field there.
    You can see from your traces of the requests you sent that the Action is being transmitted but the value is empty so this should be all you need to change.

    Regards,
    Matthew


    #webMethods
    #EntireX
    #Mainframe-Integration