You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Brian Bonner <br...@paraware.com> on 2005/09/08 16:57:37 UTC

xsd declaration is not included in XML instance by the generated client proxy

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>

-- 
Brian



Re: How to collect a SOAP Message

Posted by fa...@de9.ime.eb.br.
Yes, I really need the SOAP Body.

I was studying the use of SOAP Handlers to achieve my intention. And it was:

1. I would create a web service with a generic input. (String)
2. I would create a server SOAP Handler to receive all messages going to my web
service.
3. The SOAP Handler would transform the SOAP Body content in a String to keep
up
with web service input. So, in my imagination, I could send any complex types
(Person: [Name,  age,  salary] ; Address: [street, city, state, coutry] ;
product: [Name, price] ;) from different clients. My Handler would get these
complex types and change them to a string and pass to web service as a String
now.

4. My web service would receive the Sting (but the content of it is a complex
type structure originally sent) and transform it to a Document (DOM) and them
extracts the information. As I want to arrive. 

So I would have a web service that could receive any complex type... without a
previously knowledge about the type being receiving and without changes client
method calls. The same client can pass a Person Java Bean, a String, a Adress
Java Bean to this my web service. 

But in my studies I noticed that the web service still needs a (DE)Serializer
for a type. I implemented my web service with a handler and sent a String form
client. Works fine. But,  when I sent a Person Java Bean an error saying:

No serializer found for class Person ...

was sent... And my Handler didn't receive anything as I track.

So, my intentions to transform a complex type to String inside the Handler
falled down.

I think I must abandon my idea, and make a web service to treat a single data
type, or make a web service that extract information from XML, but ensuring
that all my clients will sent only native XML documents, inside the SOAP Body.

I would like to thank all of you who help me with my crazy questions.

:-)

Fabrício.


Citando Linus Kamb <li...@iris.washington.edu>:

> Do you really need the SOAP Body, or do you just want a way to send arbitrary
> XML documents?
> 
> You can do the latter by having a doc/lit(wrapped) service that takes
> xsd:anyType (or 
> apachesoap:Element if you don't care about interoperability).  That produces
> a service 
> interface method signature of:
> 
> <return msg type> serviceMethod(org.w3c.dom.Element parameter);
> 
> If you use xsd:anyType in the wsdl, you need to add a type mapping in the
> wsdd from 
> xsd:anyType to Element using
> org.apache.axis.encoding.ser.Element(De)SerializerFactory.
> 
> fabricio@de9.ime.eb.br wrote:
> > Hello all,
> > 
> > Is there a way to implement a web service that can collect all the SOAPBody
> from
> > a SOAP Message? For instance, I have a client that sends the soap message
> to my
> > Web Service (WSA). My WSA must collects the SOAP Message, SOAP Body is
> most
> > important. And then, parse it as a XML file. 
> > 
> > I don't know how it could be possible. Because as I know, web services
> receives
> > the SOAP Message, but takes only the data type required. 
> > 
> > How my web service could be implemented to receives all the SOAPBody and
> > manually I could extract the information inside it? And the client? How
> does it
> > call this specific web service?
> > 
> > Thanks a lot for all the help,
> > 
> > Fabrício.
> > 
> > ----------------------------------------------------------------
> > This message was sent using IMP, the Internet Messaging Program.
> 


 

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Re: How to collect a SOAP Message

Posted by Linus Kamb <li...@iris.washington.edu>.
Do you really need the SOAP Body, or do you just want a way to send arbitrary XML documents?

You can do the latter by having a doc/lit(wrapped) service that takes xsd:anyType (or 
apachesoap:Element if you don't care about interoperability).  That produces a service 
interface method signature of:

<return msg type> serviceMethod(org.w3c.dom.Element parameter);

If you use xsd:anyType in the wsdl, you need to add a type mapping in the wsdd from 
xsd:anyType to Element using org.apache.axis.encoding.ser.Element(De)SerializerFactory.

fabricio@de9.ime.eb.br wrote:
> Hello all,
> 
> Is there a way to implement a web service that can collect all the SOAPBody from
> a SOAP Message? For instance, I have a client that sends the soap message to my
> Web Service (WSA). My WSA must collects the SOAP Message, SOAP Body is most
> important. And then, parse it as a XML file. 
> 
> I don't know how it could be possible. Because as I know, web services receives
> the SOAP Message, but takes only the data type required. 
> 
> How my web service could be implemented to receives all the SOAPBody and
> manually I could extract the information inside it? And the client? How does it
> call this specific web service?
> 
> Thanks a lot for all the help,
> 
> Fabrício.
> 
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.

Re: How to collect a SOAP Message

Posted by Steve Viens <sv...@gmail.com>.
Fabrício, this might help:
  Take a look at the doPost method.
 
http://cvs.apache.org/viewcvs.cgi/ws-juddi/src/java/org/apache/juddi/registry/AbstractService.java?view=markup
 Steve

 On 9/8/05, Stefan Schuster <ss...@pironet-ndh.com> wrote: 
> 
> The projects WSIF and JROM may be just what you want. Take a look,
> 
> best regards,
> 
> Stefan
> 
> fabricio@de9.ime.eb.br wrote:
> 
> >Yeah,
> >
> >it sounds strange, but I think by this way I could realize my dream about 
> make a
> >web service that can receive any complex type. I could extract the 
> information
> >about those analysing the SOAPMessage. It's being hard to achieve it! :-/
> >
> >Thanks a lot.
> >
> >Fabricio.
> >
> >Citando Stefan Schuster <ss...@pironet-ndh.com>:
> >
> >
> >
> >>Hi,
> >>
> >>take a look at MessageContext.getMessage() -> should allow access to the
> >>SOAP
> >>message. But think about it if you really want to do this, sounds like
> >>reinventing the wheel...
> >>
> >>You may also be interessted in the service styles (wrapped, document,
> >>etc,...) some
> >>of them may give you an XML-document inside the service impl.
> >>
> >>Best Regards,
> >>
> >>Stefan
> >>
> >>fabricio@de9.ime.eb.br wrote:
> >>
> >>
> >>
> >>>Hello all,
> >>>
> >>>Is there a way to implement a web service that can collect all the 
> SOAPBody
> >>>
> >>>
> >>from
> >>
> >>
> >>>a SOAP Message? For instance, I have a client that sends the soap 
> message to
> >>>
> >>>
> >>my
> >>
> >>
> >>>Web Service (WSA). My WSA must collects the SOAP Message, SOAP Body is 
> most
> >>>important. And then, parse it as a XML file.
> >>>
> >>>I don't know how it could be possible. Because as I know, web services
> >>>
> >>>
> >>receives
> >>
> >>
> >>>the SOAP Message, but takes only the data type required.
> >>>
> >>>How my web service could be implemented to receives all the SOAPBody 
> and
> >>>manually I could extract the information inside it? And the client? How 
> does
> >>>
> >>>
> >>it
> >>
> >>
> >>>call this specific web service?
> >>>
> >>>Thanks a lot for all the help,
> >>>
> >>>Fabrício.
> >>>
> >>>----------------------------------------------------------------
> >>>This message was sent using IMP, the Internet Messaging Program.
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >
> >
> >
> >
> >----------------------------------------------------------------
> >This message was sent using IMP, the Internet Messaging Program.
> >
> >
> 
> 
>

Re: How to collect a SOAP Message

Posted by Stefan Schuster <ss...@pironet-ndh.com>.
The projects WSIF and JROM may be just what you want. Take a look,

best regards,

Stefan

fabricio@de9.ime.eb.br wrote:

>Yeah,
>
>it sounds strange, but I think by this way I could realize my dream about make a
>web service that can receive any complex type. I could extract the information
>about those analysing the SOAPMessage. It's being hard to achieve it! :-/
>
>Thanks a lot.
>
>Fabricio.
>
>Citando Stefan Schuster <ss...@pironet-ndh.com>:
>
>  
>
>>Hi,
>>
>>take a look at MessageContext.getMessage() -> should allow access to the 
>>SOAP
>>message. But think about it if you really want to do this, sounds like
>>reinventing the wheel...
>>
>>You may also be interessted in the service styles (wrapped, document, 
>>etc,...) some
>>of them may give you an XML-document inside the service impl.
>>
>>Best Regards,
>>
>>Stefan
>>
>>fabricio@de9.ime.eb.br wrote:
>>
>>    
>>
>>>Hello all,
>>>
>>>Is there a way to implement a web service that can collect all the SOAPBody
>>>      
>>>
>>from
>>    
>>
>>>a SOAP Message? For instance, I have a client that sends the soap message to
>>>      
>>>
>>my
>>    
>>
>>>Web Service (WSA). My WSA must collects the SOAP Message, SOAP Body is most
>>>important. And then, parse it as a XML file. 
>>>
>>>I don't know how it could be possible. Because as I know, web services
>>>      
>>>
>>receives
>>    
>>
>>>the SOAP Message, but takes only the data type required. 
>>>
>>>How my web service could be implemented to receives all the SOAPBody and
>>>manually I could extract the information inside it? And the client? How does
>>>      
>>>
>>it
>>    
>>
>>>call this specific web service?
>>>
>>>Thanks a lot for all the help,
>>>
>>>Fabrício.
>>>
>>>----------------------------------------------------------------
>>>This message was sent using IMP, the Internet Messaging Program.
>>> 
>>>
>>>      
>>>
>>    
>>
>
>
>
>
>----------------------------------------------------------------
>This message was sent using IMP, the Internet Messaging Program.
>  
>



Re: How to collect a SOAP Message

Posted by fa...@de9.ime.eb.br.
Yeah,

it sounds strange, but I think by this way I could realize my dream about make a
web service that can receive any complex type. I could extract the information
about those analysing the SOAPMessage. It's being hard to achieve it! :-/

Thanks a lot.

Fabricio.

Citando Stefan Schuster <ss...@pironet-ndh.com>:

> Hi,
> 
> take a look at MessageContext.getMessage() -> should allow access to the 
> SOAP
> message. But think about it if you really want to do this, sounds like
> reinventing the wheel...
> 
> You may also be interessted in the service styles (wrapped, document, 
> etc,...) some
> of them may give you an XML-document inside the service impl.
> 
> Best Regards,
> 
> Stefan
> 
> fabricio@de9.ime.eb.br wrote:
> 
> >Hello all,
> >
> >Is there a way to implement a web service that can collect all the SOAPBody
> from
> >a SOAP Message? For instance, I have a client that sends the soap message to
> my
> >Web Service (WSA). My WSA must collects the SOAP Message, SOAP Body is most
> >important. And then, parse it as a XML file. 
> >
> >I don't know how it could be possible. Because as I know, web services
> receives
> >the SOAP Message, but takes only the data type required. 
> >
> >How my web service could be implemented to receives all the SOAPBody and
> >manually I could extract the information inside it? And the client? How does
> it
> >call this specific web service?
> >
> >Thanks a lot for all the help,
> >
> >Fabrício.
> >
> >----------------------------------------------------------------
> >This message was sent using IMP, the Internet Messaging Program.
> >  
> >
> 
> 




----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Re: How to collect a SOAP Message

Posted by Stefan Schuster <ss...@pironet-ndh.com>.
Hi,

take a look at MessageContext.getMessage() -> should allow access to the 
SOAP
message. But think about it if you really want to do this, sounds like
reinventing the wheel...

You may also be interessted in the service styles (wrapped, document, 
etc,...) some
of them may give you an XML-document inside the service impl.

Best Regards,

Stefan

fabricio@de9.ime.eb.br wrote:

>Hello all,
>
>Is there a way to implement a web service that can collect all the SOAPBody from
>a SOAP Message? For instance, I have a client that sends the soap message to my
>Web Service (WSA). My WSA must collects the SOAP Message, SOAP Body is most
>important. And then, parse it as a XML file. 
>
>I don't know how it could be possible. Because as I know, web services receives
>the SOAP Message, but takes only the data type required. 
>
>How my web service could be implemented to receives all the SOAPBody and
>manually I could extract the information inside it? And the client? How does it
>call this specific web service?
>
>Thanks a lot for all the help,
>
>Fabrício.
>
>----------------------------------------------------------------
>This message was sent using IMP, the Internet Messaging Program.
>  
>



RE: How to collect a SOAP Message

Posted by Zheng Li <zl...@it.swin.edu.au>.
The SOAP monitor can intercept the SOAP messages for a web service. After
get the SOAP message, just use a XML parser to extract the info you want. I
just programmed a SOAPMonitorClient which can get the SOAP request and
respond messages for a service and extract the operation and parameters from
SOAP body. It's easy, mate.

-----Original Message-----
From: fabricio@de9.ime.eb.br [mailto:fabricio@de9.ime.eb.br] 
Sent: 2005年9月9日 2:20
To: axis-user@ws.apache.org
Subject: How to collect a SOAP Message


Hello all,

Is there a way to implement a web service that can collect all the SOAPBody
from a SOAP Message? For instance, I have a client that sends the soap
message to my Web Service (WSA). My WSA must collects the SOAP Message, SOAP
Body is most important. And then, parse it as a XML file. 

I don't know how it could be possible. Because as I know, web services
receives the SOAP Message, but takes only the data type required. 

How my web service could be implemented to receives all the SOAPBody and
manually I could extract the information inside it? And the client? How does
it call this specific web service?

Thanks a lot for all the help,

Fabrício.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



How to collect a SOAP Message

Posted by fa...@de9.ime.eb.br.
Hello all,

Is there a way to implement a web service that can collect all the SOAPBody from
a SOAP Message? For instance, I have a client that sends the soap message to my
Web Service (WSA). My WSA must collects the SOAP Message, SOAP Body is most
important. And then, parse it as a XML file. 

I don't know how it could be possible. Because as I know, web services receives
the SOAP Message, but takes only the data type required. 

How my web service could be implemented to receives all the SOAPBody and
manually I could extract the information inside it? And the client? How does it
call this specific web service?

Thanks a lot for all the help,

Fabrício.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Re: Way to turn off XSITypeGeneration?

Posted by Brian Bonner <br...@paraware.com>.
Sure.  I've attached it.

Brian



Anne Thomas Manes wrote:

> Can you provide the WSDL?
>
> On 9/8/05, *Brian Bonner* <brian.bonner@paraware.com 
> <ma...@paraware.com>> wrote:
>
>     I did more research and it looks like org.apache.axis.message.RPCParam
>     is generating the XSIType info.  There's a method to turn this
>     generation on/off, but it looks like the Call class doesn't use it.
>
>     Is there anyway to turn this off or include the schema in the outer
>     element?  Thanks.
>
>     Brian
>
>
>
>     Brian Bonner wrote:
>
>     > I also wonder why xsi:type="xsd:string"
>     > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
>     <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
>     <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
>     <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"
>     <http://www.w3.org/2001/XMLSchema-instance%22>>T</RefNum>
>     >>      <RefDate xsi:type="xsd:dateTime"
>     >> xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
>     <http://www.w3.org/2001/XMLSchema-instance%22>>2005-09-08T13:20:27.375Z</RefDate>
>     >>
>     >>    </Reference>
>     >>    <SupplierID xsi:type="xsd:string"
>     >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     <http://www.w3.org/2001/XMLSchema-instance%22>>383401</SupplierID>
>     >>
>     >>    <BuyerParty>
>     >>      <Identifier xsi:type="xsd:string"
>     >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     <http://www.w3.org/2001/XMLSchema-instance%22>>383401</Identifier>
>     >>
>     >>      <SecurityCode xsi:type="xsd:string"
>     >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     <http://www.w3.org/2001/XMLSchema-instance%22>>parawarePA/parawarePA1</SecurityCode>
>     >>
>     >>      <Name xsi:type="xsd:string"
>     >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     <http://www.w3.org/2001/XMLSchema-instance%22>>OKI</Name>
>     >>      <Zip xsi:type="xsd:string"
>     >> xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
>     <http://www.w3.org/2001/XMLSchema-instance%22>>45215</Zip>
>     >>      <Company xsi:type="xsd:string"
>     >> xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
>     <http://www.w3.org/2001/XMLSchema-instance%22>>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>
>     >>
>     >
>
>

Re: Way to turn off XSITypeGeneration?

Posted by Anne Thomas Manes <at...@gmail.com>.
Can you provide the WSDL?

On 9/8/05, Brian Bonner <br...@paraware.com> wrote:
> 
> I did more research and it looks like org.apache.axis.message.RPCParam
> is generating the XSIType info. There's a method to turn this
> generation on/off, but it looks like the Call class doesn't use it.
> 
> Is there anyway to turn this off or include the schema in the outer
> element? Thanks.
> 
> Brian
> 
> 
> 
> Brian Bonner wrote:
> 
> > 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>
> >>
> >
> 
>

Way to turn off XSITypeGeneration?

Posted by Brian Bonner <br...@paraware.com>.
I did more research and it looks like org.apache.axis.message.RPCParam 
is generating the XSIType info.  There's a method to turn this 
generation on/off, but it looks like the Call class doesn't use it.

Is there anyway to turn this off or include the schema in the outer 
element?  Thanks.

Brian



Brian Bonner wrote:

> 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>
>>
>


Re: xsd declaration is not included in XML instance by the generated client proxy

Posted by Brian Bonner <br...@paraware.com>.
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>
>