facebook

generated WS client has namespace error

  1. MyEclipse Archived
  2.  > 
  3. Web Services
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #266388 Reply

    ywang20
    Member

    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”&gt;
    <ns2:FreightEstimationRequest xmlns:ns2=”http://mheducation.com/FreightEstimation/FreightEstimationRequest”&gt;
    <AccountNumber>94031</AccountNumber>

    ….
    The AccountNumber is associated with the default namespace xmlns=”http://mheducation.com/FreightEstimation&#8221; instead of the expected one as xmlns:ns2=”http://mheducation.com/FreightEstimation/FreightEstimationRequest”&gt;

    I manually cooked the following sample request, which works perfectly communicating with the server:

    <fre:getFrightAndHandlingCharges xmlns:fre1=”http://mheducation.com/FreightEstimation/FreightEstimationRequest&#8221; xmlns:fre=”http://mheducation.com/FreightEstimation”&gt;
    <fre1:FreightEstimationRequest>
    <AccountNumber>40305</AccountNumber>

    Any idea what is wrong
    Thanks.
    Denis

    #266425 Reply

    Riyad Kalla
    Member

    Denis, I’ve aksed someone from the WS team to follow up with you.

    #266463 Reply

    Brian Fernandes
    Moderator

    Denis,

    This is either caused by an issue with the WSDL file used to generate the service, or a code generation issue with the XFire generator.
    Could you send us the relevant portions of your WSDL file (or the entire WSDL file if possible) so that we may further investigate this?
    You can paste the WSDL here or mail it to support@genuitec.com ATTN Brian – include a link to this thread.

    I noticed you have already taken this issue up with the XFire team, but without the WSDL file we really go further.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: generated WS client has namespace error

You must be logged in to post in the forum log in