Hello,
I am using MyEclipse
Version: 5.1.0 GA
Build id: 20061111-5.1.0-GA.
I used a Xfire generated client stub from a WSDL file to make web services calls to a remote server.
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>
Any idea what is wrong
Thanks.
Denis