[Users] SOAP Fault when calling a WebService
florentp
petals-use at ebmwebsourcing.com
Wed Mar 16 10:28:22 CET 2011
Hi,
I'm using PEtALS 2.4 standalone and WebConsole 1.3. petals-bc-channelclient and petals-bc-soap are the only 2 BC deployed and started on the server.
I also deployed and starded a SA containing 2 SU. First SU provides an external WebService as a JBI component on the PEtALS bus. Second SU consumes that JBI component (from the 1st SU) and expose it as a WebService callable outside of PEtALS. Both SU are based on PEtALS BC SOAP.
WebConsole allows me to see the endpoint created by the first SU. When I use the WebConsole to test it or when I use an external client to test both SU, I always get the same (not very detailled) error :
Code:
<ns2:Fault xmlns:ns3="http://www.w3.org/2003/05/soap-envelope">
<faultcode>ns2:Client</faultcode>
<faultstring>Cannot find dispatch method for {null}parameters using "Payload QName-based Dispatcher"</faultstring>
</ns2:Fault>
Looking in the logs, I didn't find any more detailed information.
Here are the requests I sent from my external client and from WebConsole.
>From external client :
Code:
<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>
<parameters>
<messageId>0</messageId>
<withInitialPayload>true</withInitialPayload>
<withOutboundPayload>true</withOutboundPayload>
</parameters>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
>From WebConsole :
Code:
<parameters>
<messageId>0</messageId>
<withInitialPayload>true</withInitialPayload>
<withOutboundPayload>true</withOutboundPayload>
</parameters>
I think this is a problem between the way the external WebService WSDL is made (without soapaction defined) and how PEtALS "route" the message to the appropriate service...
Here is the external WebService WSDL :
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.1-b03-. -->
<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.1-b03-. -->
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://example.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" name="GetMessageService" targetNamespace="http://example.com/">
<types>
<xsd:schema>
<xsd:import namespace="http://example.com/" schemaLocation="GetMessage_1.xsd"/>
</xsd:schema>
</types>
<message name="getMessage">
<part name="parameters" element="tns:getMessage"/>
</message>
<message name="getMessageResponse">
<part name="parameters" element="tns:getMessageResponse"/>
</message>
<portType name="GetMessage">
<operation name="getMessage">
<input message="tns:getMessage"/>
<output message="tns:getMessageResponse"/>
</operation>
</portType>
<binding name="GetMessagePortBinding" type="tns:GetMessage">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getMessage">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="GetMessageService">
<port name="GetMessagePort" binding="tns:GetMessagePortBinding">
<soap:address location="http://X.X.X.X:8080/.../WebServices/GetMessage"/>
</port>
</service>
</definitions>
and the imported XSD :
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.1-b03-. -->
<xs:schema xmlns:tns="http://example.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://example.com/" version="1.0">
<xs:element name="getMessage" type="tns:getMessage"/>
<xs:element name="getMessageResponse" type="tns:getMessageResponse"/>
<xs:complexType name="getMessage">
<xs:sequence>
<xs:element name="messageId" type="xs:int"/>
<xs:element name="withInitialPayload" type="xs:boolean"/>
<xs:element name="withOutboundPayload" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="getMessageResponse">
<xs:sequence>
<xs:element name="return" type="tns:getMessageResult" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="getMessageResult">
<xs:complexContent>
<xs:extension base="tns:genericResult">
<xs:sequence>
<xs:element name="message" type="tns:message" minOccurs="0"/>
<xs:element name="messageProcess" type="tns:messageProcess" minOccurs="0"/>
<xs:element name="outboundMessage" type="tns:outboundMessage" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="genericResult">
<xs:sequence>
<xs:element name="code" type="xs:int"/>
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:element name="result" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="message">
<xs:complexContent>
<xs:extension base="tns:abstractDataObject">
<xs:sequence>
<xs:element name="creationDate" type="xs:dateTime" minOccurs="0"/>
<xs:element name="documentId" type="xs:string" minOccurs="0"/>
<xs:element name="initialPayload" type="xs:string" minOccurs="0"/>
<xs:element name="insertDate" type="xs:dateTime" minOccurs="0"/>
<xs:element name="messageId" type="xs:int"/>
<xs:element name="receiverId" type="xs:string" minOccurs="0"/>
<xs:element name="senderId" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="abstractDataObject" abstract="true">
<xs:sequence>
<xs:element name="isPersisted" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="messageProcess">
<xs:complexContent>
<xs:extension base="tns:abstractDataObject">
<xs:sequence>
<xs:element name="errorMsg" type="xs:string" minOccurs="0"/>
<xs:element name="filename" type="xs:string" minOccurs="0"/>
<xs:element name="messageId" type="xs:int"/>
<xs:element name="modificationDate" type="xs:dateTime" minOccurs="0"/>
<xs:element name="processingStartedOn" type="xs:dateTime" minOccurs="0"/>
<xs:element name="status" type="tns:statusType" minOccurs="0"/>
<xs:element name="transport" type="tns:transportType" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="outboundMessage">
<xs:complexContent>
<xs:extension base="tns:abstractDataObject">
<xs:sequence>
<xs:element name="messageId" type="xs:int"/>
<xs:element name="outboundPayload" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="statusType">
<xs:restriction base="xs:string">
<xs:enumeration value="RECEIVED"/>
<xs:enumeration value="AWAITING_PROCESS"/>
<xs:enumeration value="ROUTING_ERROR"/>
<xs:enumeration value="PROCESSING"/>
<xs:enumeration value="PROCESSING_ERROR"/>
<xs:enumeration value="AWAITING_DELIVERY"/>
<xs:enumeration value="DELIVERY_ERROR"/>
<xs:enumeration value="DELIVERED"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="transportType">
<xs:restriction base="xs:string">
<xs:enumeration value="TRANSPORT_1"/>
<xs:enumeration value="TRANSPORT_2"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
With another application, I made the same thing (exposing an external WebService as a JBI service and expose this JBI service as a new WebService) but the WSDL was not exactly of the same kind.
Any idea?
Thanks a lot.
-------------------- m2f --------------------
Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=617#617
-------------------- m2f --------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://forum-list.petalslink.org/pipermail/users/attachments/20110316/36c037b1/attachment.htm>
More information about the Users
mailing list