|
Thomas, Cory, Mike , Anne and all,
Thank you very much for your guidance and patience. I wanted to learn wrap/lit and
doc/lit web services and looked for samples. I found some but
I couldn't find something simple. So I decided to write a simple
sample for myself. That is why I'm very particular about these details. With
your help I have come a long way. I have few more questions
now.
I can't use the SEND_TYPE_ATTR in call because
I'm not using the call object (I have given the Client below). I'm using the
wsdl to get a service and then call the web service.
If I changed
<parameter name="sendXsiTypes" > in global configuration it
sends no xsiTypes but wouldn't it effect all the services 'cos
global handler chain apply these settings on all soap
messages ?
Looking at this problem I
wonder whether I should go back to use a client that uses a call object, but if
I use the call object I think I will be loosing the whole point of
wsdl and wrapp/lit style.
-------- snip of the Client I'm
using ------------------
ServiceFactory serviceFactory = ServiceFactory.newInstance( ); Service currService = serviceFactory.createService(currWsdlUrl, new QName(nameSpaceUri, serviceName));OrderBindingStub myProxy = (OrderBindingStub) currService.getPort( new QName(nameSpaceUri, portName), Class.forName("samples.wrapped.order.WrappedOrder.OrderPortType");-------
Thank you,
Dimuthu.
----- Original Message -----
From: "Cory Wilkerson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 21, 2003 4:15 AM
Subject: RE: Is this a wrapped service ? <?xml version="1.0" encoding="UTF-8"?> <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <globalConfiguration> <parameter name="sendXsiTypes" value="true"/> Though I've not ever tweaked that value, it looks promising. -----Original Message----- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 20, 2003 3:09 PM To: [EMAIL PROTECTED] Subject: Re: Is this a wrapped service ? Dimuthu, Your current message qualifies as Document/Literal. It's always valid to override the type information using the xsi:type attribute -- but the point is that you aren't really overriding the defined schema, so you shouldn't need to include the type information. Can someone else on the list provide some guidance as to how to tell Axis not to specify the xsi:type attributes in the message? Anne At 10:55 AM 8/20/2003 +0600, you wrote: >Hi all, > >Thank you very much for your help Anne. > >I have written a web service in wrapped style which takes in an integer >and return an integer ( for now). I managed to exclude the >"soapenv:encodingStyle=<http://schemas.xmlsoap.org/soap/encoding/>http://schemas.xmlsoap.org/soap/encoding/ >" but still I'm unable to remove the xsi:type from the message. So could >you call this a literal encoded? What am I missing. Follwoing is what I >get from the TCP monitor. I have also given a snip of the wsdl I have written. > > ><?xml version="1.0" encoding="UTF-8"?> ><soapenv:Envelope >xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >xmlns:xsd="http://www.w3.org/2001/XMLSchema" >xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > <soapenv:Body> > <process xmlns="urn:WrappedOrder"> > <A xsi:type="xsd:int">1</A> > </process> > </soapenv:Body> ></soapenv:Envelope> > > >Part of the wsdl I wrote is here. > > ><types> > ><xsd:schema attributeFormDefault="qualified" >elementFormDefault="qualified" targetNamespace="urn:WrappedOrder"> > ><xsd:element name="process"> > ><xsd:complexType> > ><xsd:sequence> > ><xsd:element name="A" type="xsd:int"/> > ></xsd:sequence> > ></xsd:complexType> > ></xsd:element> > ><xsd:element name="processResponse"> > ><xsd:complexType> > ><xsd:sequence> > ><xsd:element name="processResult" type="xsd:int"/> > ></xsd:sequence> > ></xsd:complexType> > ></xsd:element> > ></xsd:schema> > ></types> > > >What could be the problem? How can I eleminate the xsi:type? > >Thanyou, >Dimuthu > >This looks like an RPC/encoded message. >You've included >- >soapenv:encodingStyle=<http://schemas.xmlsoap.org/soap/encoding/>http://schemas.xmlsoap.org/soap/encoding/ > >- xsi:type information > >A wrapped service message would look something like this: > ><?xml version="1.0" encoding="UTF-8"?> ><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> > <soapenv:Body> > <ns1:Add xmlns:ns1="http://math.samples/"> > <B>4.1</B> > <A>2.2</A> > </ns1:Add> > </soapenv:Body> ></soapenv:Envelope> > >Keep in mind that when you're using WRAPPED (or any literal encoding), you >need a WSDL file to get the schema of the message body. Otherwise the SOAP >runtime has no idea how to type map it. > >Anne > >----- Original Message ----- >>From: <mailto:[EMAIL PROTECTED]>Dimuthu Leelarathne >>To: <mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED] >>Sent: Monday, August 04, 2003 1:47 AM >>Subject: Is this a wrapped service ? >> >>I have a service similar to math in samples. I wrote a wsdd and a client >>(I'm not usnig wsdl or wsdl2java).If I run the TCP monitor shows the >>following messages (given bellow). >> >>My question is ::: >> Is it a wrapped service? >> >><?xml version="1.0" encoding="UTF-8"?> >><soapenv:Envelope >>xmlns:soapenv="<http://schemas.xmlsoap.org/soap/envelope/>http://schemas.xmlsoap.org/soap/envelope/" >>xmlns:xsd="http://www.w3.org/2001/XMLSchema" >>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> >> <soapenv:Body> >> <ns1:Add >> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" >> xmlns:ns1="http://math.samples/"> >> <B xsi:type="xsd:float">4.1</B> >> <A xsi:type="xsd:float">2.2</A> >> </ns1:Add> >> </soapenv:Body> >></soapenv:Envelope> >> >>And the reply is: >><?xml version="1.0" encoding="UTF-8"?> >><soapenv:Envelope >>xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >>xmlns:xsd="http://www.w3.org/2001/XMLSchema" >>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> >> <soapenv:Body> >> <AddResponse xmlns="http://math.samples/"> >> <AddResult xsi:type="xsd:float">6.3</AddResult> >> </AddResponse> >> </soapenv:Body> >></soapenv:Envelope> >> >>However I use a call object to invoke this service. Am I missing >>something here? Am I going against the definition of wrapped style here? >> >>Thank you, >>Dimuthu. >> > |
- Is this a wrapped service ? Dimuthu Leelarathne
- Re: Is this a wrapped service ? Anne Thomas Manes
- Is this a wrapped service ? Dimuthu Leelarathne
- AW: Is this a wrapped service ? Thomas Bayer
- Re: Is this a wrapped service ? Anne Thomas Manes
- RE: Is this a wrapped service ? Mike Perham
- RE: Is this a wrapped service ? Cory Wilkerson
- RE: Is this a wrapped service ? Dimuthu Leelarathne
- RE: Is this a wrapped service ? Dimuthu Leelarathne
- RE: Is this a wrapped service ? Volkmann, Mark
- RE: Is this a wrapped service ? Mike Perham
- Re: Is this a wrapped service ? Dimuthu Leelarathne
