You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Daniel Beland <da...@rdketchup.com> on 2004/12/16 19:44:13 UTC
WSDL2Java
Hi,
I am trying to do some async call with ActiveBPEL, using axis as my client.
So one element of my SOAP message is of type wsa:EndpointReferenceType,
which I can use to set the endpoint where to reply.
it should send a structure similar to
<wsa:EndpointReference xmlns:ns1="http://myservice.org">
<wsa:Address>http://localhost:8080/axis/services/MyService</wsa:Address>
<wsa:ServiceName PortName="ServicePort">ns1:ServiceName</wsa:ServiceName>
</wsa:EndpointReference>
I generated the code with WSDL2Java, and the ServiceName class has a
portName attribute (type NCName) and a _value attribute of type QName. So
far so good.
But when I send this soap message, it look like this:
<wsa:EndpointReference>
<wsa:Address>http://localhost:8080/axis/services/MyService</wsa:Address>
<wsa:ServiceName
PortName="ServicePort">{http://myservice.org}ServiceName</wsa:ServiceName>
</wsa:EndpointReference>
because it returns _value.toString (javax.xml.namespace.QName), normally I
would expect to see something like
<wsa:EndpointReference>
<wsa:Address>http://localhost:8080/axis/services/MyService</wsa:Address>
<wsa:ServiceName PortName="ServicePort"
xmlns:ns1="http://myservice.org">ns1:ServiceName</wsa:ServiceName>
</wsa:EndpointReference>
Is this a bug or there are some options I could set to have the classes
generated correctly?
In the meantime, is there a way, when working with files generated by wsdl
to add some custom xmlns:x attribute inside the element tag, I could then
hardcode the x:ServiceName?
thanks,
Daniel