Calling web service from Java "The message with Action '' cannot be processed at the receiver"

JuanN

I'm newbie with web services and java, so I have some issues to connect my application with an external Web Service. I get all the time this exception

The message with Action '' cannot be processed at the receiver

Maybe my assumptions are wrong, but I think the action is defined inside the SOAP payload. Here is the WSDL:

<?xml version='1.0'?>
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.tempuri.org/wsdl/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.tempuri.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
  <types />
  <message name="BINICIARREPORTRequest">
    <part name="EAUSUARIO" type="xsd:string" />
    <part name="EAMODULO" type="xsd:string" />
    <part name="EANOMREPOR" type="xsd:string" />
    <part name="EAPARAMREPOR" type="xsd:string" />
    <part name="EANOMPANTA" type="xsd:string" />
  </message>
  <message name="BINICIARREPORTResponse">
    <part name="RESULT" type="xsd:boolean" />
  </message>
  <portType name="PWS_LANZA_REPOR_PORT_1">
    <operation name="BINICIARREPORT">
      <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" />
      <input message="tns:BINICIARREPORTRequest" />
      <output message="tns:BINICIARREPORTResponse" />
    </operation>
  </portType>
  <binding name="PWS_LANZA_REPOR_PORT_1Soap" type="tns:PWS_LANZA_REPOR_PORT_1">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" />
    <operation name="BINICIARREPORT">
      <soap:operation soapAction="http://www.tempuri.org/wsdl/BINICIARREPORTRequest" style="rpc" />
      <input name="BINICIARREPORTRequest">
        <soap:body use="encoded" namespace="http://www.tempuri.org/wsdl/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </input>
      <output name="BINICIARREPORTResponse">
        <soap:body use="encoded" namespace="http://www.tempuri.org/wsdl/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
      </output>
    </operation>
  </binding>
  <service name="PWS_LANZA_REPOR">
    <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" />
    <port name="PWS_LANZA_REPOR_PORT_1Port" binding="tns:PWS_LANZA_REPOR_PORT_1Soap">
      <soap:address location="" />
    </port>
  </service>
</definitions>

Here is the code I'm using:

        final String endpointUrl = this.configuracion
                .getConfigJNDI(WS_MECANIZACION_JNDI);

        final QName serviceName = new QName(null,
                "PWS_LANZA_REPOR");
        final QName portName = new QName(null, "PWS_LANZA_REPOR_PORT_1Port");
        final javax.xml.ws.Service service = javax.xml.ws.Service
                .create(serviceName);
        service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING,
                endpointUrl);

        final Dispatch<SOAPMessage> dispatch = service.createDispatch(
                portName, SOAPMessage.class,
                javax.xml.ws.Service.Mode.MESSAGE);

        final SOAPMessage response = dispatch.invoke(mensajeSOAP);

If I use SoapUI to check this out, everything works fine (the message is OK as well as the endpointURL), but no success whatsoever from the java application.

This is the soap message I'm sending:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="s" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
        <wsdl:BINICIARREPORT xmlns:wsdl="cosa">
            <EAUSUARIO>CD</EAUSUARIO>
            <EAMODULO>PR</EAMODULO>
            <EANOMREPOR>PRR14</EANOMREPOR>
            <EAPARAMREPOR/>
            <EANOMPANTA/>
        </wsdl:BINICIARREPORT>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I don't know whether this is important, but the url I was given has no "?wsdl" at then end:

http://prueba/prueba/Pws_Lanza_Rep1.svc

Any clues?

JuanN

I haven't figured it out yet, but following the steps here everything worked fine! I have used the same xml and the same parameters, so it still remains a mistery to me why the previous code didn't work.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

The message with Action cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher

From Dev

The message with Action cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher

From Dev

The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher.

From Dev

Calling SSRS 2008 web service from Java

From Dev

Calling a web service SOAP in java

From Dev

Calling .Net web service from Android Device

From Dev

Calling Web Service from jQuery .ajax() issue

From Dev

Calling a web service from android - NullPointerException

From Dev

Calling web service from Windows Form and jQuery

From Dev

Calling C# Web Service from JQuery

From Dev

Calling a method of the ASPX page from Web Service

From Dev

Calling web service from outlook add in

From Dev

Getting java.io.IoException while calling .net web service from my java code

From Dev

Rest web service not found when calling from client

From Dev

Calling asmx web service from JavaScript yields 404

From Dev

405 - method not allowed calling web service from struts

From Dev

Calling web service to web service; Architecture View

From Dev

Calling a web service using nodejs

From Dev

calling https web service methods

From Dev

Calling web service with ssl certificates

From Dev

Consuming secure web service from JAVA

From Dev

Calling C# asp.net web service or web method from email without opening browser

From Dev

Calling C# asp.net web service or web method from email without opening browser

From Dev

Calling Javascript from service android

From Dev

Calling a Rest Service from a servlet

From Dev

Calling an EXE from a WCF Service

From Dev

Error opening Xlsx files created from calling Reporting Services Web Service ReportExecution2005

From Dev

Null parameters when calling a JAX-WS Web Service from JavaScript

From Dev

Calling a JSON based ASP.NET web-service from an Android phone

Related Related

  1. 1

    The message with Action cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher

  2. 2

    The message with Action cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher

  3. 3

    The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher.

  4. 4

    Calling SSRS 2008 web service from Java

  5. 5

    Calling a web service SOAP in java

  6. 6

    Calling .Net web service from Android Device

  7. 7

    Calling Web Service from jQuery .ajax() issue

  8. 8

    Calling a web service from android - NullPointerException

  9. 9

    Calling web service from Windows Form and jQuery

  10. 10

    Calling C# Web Service from JQuery

  11. 11

    Calling a method of the ASPX page from Web Service

  12. 12

    Calling web service from outlook add in

  13. 13

    Getting java.io.IoException while calling .net web service from my java code

  14. 14

    Rest web service not found when calling from client

  15. 15

    Calling asmx web service from JavaScript yields 404

  16. 16

    405 - method not allowed calling web service from struts

  17. 17

    Calling web service to web service; Architecture View

  18. 18

    Calling a web service using nodejs

  19. 19

    calling https web service methods

  20. 20

    Calling web service with ssl certificates

  21. 21

    Consuming secure web service from JAVA

  22. 22

    Calling C# asp.net web service or web method from email without opening browser

  23. 23

    Calling C# asp.net web service or web method from email without opening browser

  24. 24

    Calling Javascript from service android

  25. 25

    Calling a Rest Service from a servlet

  26. 26

    Calling an EXE from a WCF Service

  27. 27

    Error opening Xlsx files created from calling Reporting Services Web Service ReportExecution2005

  28. 28

    Null parameters when calling a JAX-WS Web Service from JavaScript

  29. 29

    Calling a JSON based ASP.NET web-service from an Android phone

HotTag

Archive