I noticed there are a few posts regarding namespace problems recently. Here
is my own experience:
I used a Xfire generated client stub to make web services calls to a remote
server. wsgent was used to create the stub from a WSDL file.
The Java code is extremely simple:
FrightEstimationServiceSoapQSServiceClient client = new
FrightEstimationServiceSoapQSServiceClient();
FrightEstimationServiceSoap frightEstimationServiceSoap =
client.getFrightEstimationServiceSoapQSPort();
FreightEstimationRequest soapRequest = new FreightEstimationRequest();
soapRequest.setAccountNumber("94031");
However, the generated request is not correct in its namespace.
<getFrightAndHandlingCharges
xmlns="http://mheducation.com/FreightEstimation">
<ns2:FreightEstimationRequest
xmlns:ns2="http://mheducation.com/FreightEstimation/FreightEstimationRequest">
<AccountNumber>94031</AccountNumber>
....
The AccountNumber is associated with the default namespace
xmlns="http://mheducation.com/FreightEstimation" instead of the expected one
as
xmlns:ns2="http://mheducation.com/FreightEstimation/FreightEstimationRequest">
I manually cooked the following sample request, which works perfectly
communicating with the server:
<fre:getFrightAndHandlingCharges
xmlns:fre1="http://mheducation.com/FreightEstimation/FreightEstimationRequest"
xmlns:fre="http://mheducation.com/FreightEstimation">
<fre1:FreightEstimationRequest>
<AccountNumber>40305</AccountNumber>
The wsgen is defined as:
<taskdef name="wsgen" classname="org.codehaus.xfire.gen.WsGenTask"
classpathref="master-classpath" />
<wsgen outputDirectory="${srcgen}"
wsdl="${project.home}/wsdl/FrightEstimationProxy.wsdl" overwrite="true">
Is these a bug in Xfire or one of the jar files it depends on? I am using
the latest Xfire distribution.
Sorry to use a scary subject to catch eyes from the experts ;). My previous
post a week ago got no answers so far.
Thanks.
Denis
--
View this message in context:
http://www.nabble.com/is-there-a-serious-namespace-bug-in-Xfire-tf3255256.html#a9049809
Sent from the XFire - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email