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