users@jax-rpc.java.net

wscompile and namespaces in outgoing SOAP message

From: Matt Swensson <matman2k1_at_yahoo.com>
Date: Thu, 31 Mar 2005 13:32:26 -0800 (PST)

I have generated classes from a WSDL using wscompile with the following
params.
./bin/wscompile.sh -s src/ -d classes/ -gen:client -keep
-f:explicitcontext,searchschema bin/config.xml

When I make a call to a web service, the outgoing SOAP message looks
like this:

<?xml version="1.0" encoding="UTF-8"?>
   <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns0="http://www.blah.com/services/">
      <env:Header>
         <ns0:myHeader>
            <ns0:ID>12</ns0:ID>
         </ns0:myHeader>
      </env:Header>
      <env:Body>
         <ns0:Create>
            <ns0:name>testName</ns0:name>
            <ns0:password>testPassword</ns0:password>
         </ns0:Create>
      </env:Body>
    </env:Envelope>


but I want it to look like this:

<?xml version="1.0" encoding="UTF-8"?>
   <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns0="http://www.blah.com/services/">
      <env:Header>
         <ns0:myHeader>
            <ID>12</ID>
         </ns0:myHeader>
      </env:Header>
      <env:Body>
         <ns0:Create>
            <name>testName</name>
            <password>testPassword</password>
         </ns0:Create>
      </env:Body>
    </env:Envelope>


Does anyone know why the "ns0:"s are being added to the child elements
of the Create call and the header elements? Is there a way to supress
this? Does it have to do with the wscompile or possibly I have to set a
property of some sort?

Thanks,
Matt


                
__________________________________
Do you Yahoo!?
Yahoo! Personals - Better first dates. More second dates.
http://personals.yahoo.com