users@jax-ws.java.net

Re: Error in decoding SOAP Message / Dispatch method cannot be found due to namespace problem

From: Doug Kohlert <Doug.Kohlert_at_Sun.COM>
Date: Wed, 10 May 2006 14:34:46 -0700

Chris,
 From reading the thread, it sounds like you had a WSDL which you
imported that WSDL and then implemented
the client and the server. You then tried to publish your endpoint
using the EndPoint apis but you did not
include the original WSDL in the metadata. You then tried to invoke the
published endpoint with the
client created from the original WSDL. If this is what you did then
you have made some mistakes
that may be causing the problems. First, when importing the WSDL, much
of the binding information
is lost, so when you publish the endpoint without the original WSDL as
meta-data, the JAX-WS runtime
will generate a new WSDL with a probably different binding. So your
client is using one binding and your
server is using another binding. I believe you have two options, 1)
include the original wsdl as meta-data when
publishing your endpoint, or 2) generate the client from the JAX-WS
generated WSDL. I believe your best
option in #1.

Please let us know how that works.

breadfan_at_gmx.de wrote:

>Regarding your input (Jitendra & Vivek's):
>
>- I'm using NOT Mustang! I'm using J2SE 1.5.0_06 with the nightly build
>20060504. So there should be no problem with old jaxws jars.
>
>- I use port 82 because I use Eclipse's TCP/IP Monitor to see the content of
>the soap message. After logging it delegates to 8080. If I directly connect
>to 8080 the problem is still the same. Sorry for the inconvenience with
>that.
>
>- If I do a http://localhost:8080/jaxws-test/portalEai?wsdl (just to be
>clear: please note that in the meantime i prefixed the namespace with
>bugrep. to separate my development from the bugrep-testcase)
>
>definitions
>targetNamespace="http://bugrep.jaxws.server.connector.fss.portal.o2.com/"
>name="PortalEaiPortBugRepImplService">
><import namespace="http://fss.o2.com/portal/services"
>location="http://localhost:8080/jaxws-test/portalEai?wsdl=1"/>
><binding type="ns1:PortalEaiPortType"
>name="PortalEaiPortBugRepImplPortBinding">
><soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
><operation name="checkAddress">
><soap:operation soapAction="Portal_Portal2BPM_checkAddress"/>
><input>
><soap:body namespace="http://fss.o2.com/portal/services" use="literal"/>
></input>
><output>
><soap:body namespace="http://fss.o2.com/portal/services" use="literal"/>
></output>
></operation>
></binding>
><service name="PortalEaiPortBugRepImplService">
><port binding="tns:PortalEaiPortBugRepImplPortBinding"
>name="PortalEaiPortBugRepImplPort">
><soap:address location="http://localhost:8080/jaxws-test/portalEai"/>
></port>
></service>
></definitions>
>
>
>So the input namespace of the source wsdl is (incorrectly?!?) replaced by
>http://fss.o2.com/portal/services.
>I also wonder where the ns1-Prefix of the binding is bound to a namespace?
>
>Btw. http://localhost:8080/jaxws-test/portalEai?wsdl=1 returns:
>
><definitions targetNamespace="http://fss.o2.com/portal/services">
><types/>
><message name="checkAddress">
><part type="xsd:string" name="checkAddressRequestPart"/>
></message>
><message name="checkAddressResponse">
><part type="xsd:string" name="checkAddressResultPart"/>
></message>
><portType name="PortalEaiPortType">
><operation parameterOrder="checkAddressRequestPart" name="checkAddress">
><input message="tns:checkAddress"/>
><output message="tns:checkAddressResponse"/>
></operation>
></portType>
></definitions>
>
>Ok i will try your setMetadata-suggestion tomorrow, but it really feels like
>a bug. Shouldn't jaxws be able to correctly call it's self generated service
>from a given wsdl correctly, without setting further metadata?
>
>
>