axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Bonner <brian.bon...@paraware.com>
Subject Re: xsd declaration is not included in XML instance by the generated client proxy
Date Thu, 08 Sep 2005 18:03:36 GMT
I also wonder why xsi:type="xsd:string" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" is being generated 
in the instance document that is being sent from the Stub.  This doesn't 
need to be there.  Is there a way to not have this be generated?  Is 
there a WSDL2Java switch that I'm unaware of?

Brian



Brian Bonner wrote:

> I used WSDL2Java to create a client of a Document/Literal Web 
> Service.  When I use the generated Proxy to call the service, the 
> document that ends up being generated includes:   
> xsi:type="xsd:string" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
> in the elements,  however, xsd is not declared anywhere and validation 
> of the document at the server is failing.  If I declare the xsd 
> namespace in either the root element or in each of the elements where 
> it's used, it succeeds.  i.e. 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
> I've been searching for what is causing this.  I noticed that the ns1 
> namespace *IS* included in the Body tag below.
>
> Any thoughts?
>
> Here's the example:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <PriceandAvailabilityRequest 
> xmlns="http://www.paraware.com/2005/PriceAndAvailabilityCheckRequest" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> xsi:schemaLocation="http://www.paraware.com/2005/PriceAndAvailabilityCheckRequest 
> xsd/paraware/priceAndAvailabilityRequest.xsd ">
>  <Header>
>    <Reference>
>      <RefNum xsi:type="xsd:string" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">T</RefNum>
>      <RefDate xsi:type="xsd:dateTime" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2005-09-08T13:20:27.375Z</RefDate>

>
>    </Reference>
>    <SupplierID xsi:type="xsd:string" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">383401</SupplierID>
>    <BuyerParty>
>      <Identifier xsi:type="xsd:string" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">383401</Identifier>
>      <SecurityCode xsi:type="xsd:string" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">parawarePA/parawarePA1</SecurityCode>

>
>      <Name xsi:type="xsd:string" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">OKI</Name>
>      <Zip xsi:type="xsd:string" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">45215</Zip>
>      <Company xsi:type="xsd:string" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">OKI</Company>
>    </BuyerParty>
>  </Header>
>  <Body xsi:type="ns1:Query" 
> xmlns:ns1="http://www.paraware.com/2005/PriceAndAvailabilityCheckRequest" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>    <Query>
>      <ManNum xsi:type="xsd:string">3M 1100</ManNum>
>    </Query>
>  </Body>
> </PriceandAvailabilityRequest>
>


Mime
View raw message