axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Rathnayake" <ami...@opensource.lk>
Subject RE: Supporting for Non-Wrapped WSDL's
Date Wed, 04 Aug 2004 09:38:53 GMT


Hi All,

I regret to say that still nobody has commented on my issue and I really
want your comments on this to make sure that the generated code for
non-wrapped style is correct. I have generated both the server side and
client side. I also checked the differences in generated codes for
server and client sides in both wrapped and non-wrapped styles and it
looks correct for me. But still your comments on this are really
appreciated.

I am sending the relevant diff file for the changes I've made on
WSDL2Ws.java and you can apply this patch and test for non-wrapped style
wsdl's.

With this change you can give a command line argument to generate in
non-wrapped style. If you don't give any command line argument for the
wsdl2ws tool it will generate for wrapped style by default.

For example for client side ;

Java -classpath ./wsdl2ws.jar;%classpath%
org.apache.axis.wsdl.wsdl2ws.WSDL2Ws <*.wsdl> -o./ClientOut -lc++
-sclient -wnonwrapped

-w wrapping style of the WSDL (wrapped|nonwrapped) - default is wrapped

Please try this out and send your comments.

Thanks and Regards,
Amila Rathnayake.



> -----Original Message-----
> From: Amila Rathnayake [mailto:amilar@opensource.lk]
> Sent: Tuesday, August 03, 2004 6:37 PM
> To: 'Apache AXIS C Developers List'
> Subject: RE: Supporting for Non-Wrapped WSDL's
> 
> 
> 
> 
> Hi All,
> 
> Theoretically it should be able to generate valid skeletons and stubs
in
> the non-wrapped style by even using a wrapped style wsdl's.
> 
> So that I have used a wrapped style wsdl and generated server
skeletons
> in the non-wrapped style.
> 
> I have added the relevant wrapped style wsdl here with and following
are
> the differences between wrapped style code generation and non-wrapped
> style code generation by using the same wsdl file.
> 
> Here I have given only the places where the generated code is
different
> in two styles. Except the following all the other files and codes
> generated by the wsdl2ws tool are same.
> 
> By looking at the following codes you can find the differences between
> the code generation in two styles.
> 
> thing.h and thing.cpp
> ======================
> in wrapped style
> ------------------
> void find_aThing(aThing Value0, AXIS_OUT_PARAM aThing_Array*
OutValue0,
> AXIS_OUT_PARAM otherData_Array* OutValue1);
> 
> in the non-wrapped style
> --------------------------
> void find_aThing(find_aThing* Value0, AXIS_OUT_PARAM aThing_Array*
> OutValue0, AXIS_OUT_PARAM otherData_Array* OutValue1);
> 
> 
> thingwrapper.cpp
> ================
> in wrapped style
> ------------------
> xsd__string v0 = pIWSDZ->getElementAsString("aThing",0);
> 
> in the non-wrapped style
> --------------------------
> find_aThing *v0 =
>
(find_aThing*)pIWSDZ->getCmplxObject((void*)Axis_DeSerialize_find_aThing
> 		, (void*)Axis_Create_find_aThing,
> (void*)Axis_Delete_find_aThing
> 		, "find_aThing", Axis_URI_find_aThing);
> 
> 
> Please have a look at those differences with the attached wsdl and
> comment on this.
> 
> Thanks and Regards,
> Amila Rathnayake.
> 
> 
> 
> 
> > -----Original Message-----
> > From: Amila Rathnayake [mailto:amilar@opensource.lk]
> > Sent: Tuesday, August 03, 2004 5:40 PM
> > To: 'Apache AXIS C Developers List'; axis-c-user@ws.apache.org
> > Subject: RE: Supporting for Non-Wrapped WSDL's
> >
> > Hi All,
> >
> > Right now Axis C++ is supporting for wrapped style WSDL files.
> > Non-wrapped style WSDL 's are not supported and currently all the
> > doc-lit WSDL's are considered as wrapped style by default and
> generating
> > the Skeletons and Stubs accordingly by the WSDL2WS tool.
> >
> > I have implemented the support for non-wrapped style wsdl. But for
> > testing purposes I need several valid WSDL's of non-wrapped style.
> >
> > I've found a simple WSDL which is in non-wrapped style. But that
WSDL
> is
> > having more than one part in the message. Then this should be an
> invalid
> > wsdl since in the doc-lit type we can have only one part in the
> message.
> >
> >    <wsdl:message name="loadXMLDataRequest">
> >
> >       <wsdl:part name="in0" element="impl:in0"/>
> >
> >       <wsdl:part name="in1" element="impl:in1"/>
> >
> >    </wsdl:message>
> >
> > I have attached the relevant WSDL file here with.
> >
> > If you have any idea, please comment on this.
> >
> > Btw if you have come across any non-wrapped style wsdl file, please
> send
> > that file.
> >
> > Thanks and Regards,
> > Amila Rathnayake.
> >
> >
> >
> >
> > > -----Original Message-----
> > > From: amilar@opensource.lk [mailto:amilar@opensource.lk]
> > > Sent: Wednesday, July 21, 2004 6:31 PM
> > > To: Apache AXIS C Developers List
> > > Subject: Supporting for Non-Wrapped WSDL's
> > >
> > > Hi All,
> > >
> > > At this moment Axis is assuming and supporting only for Wrapped
> style
> > > WSDL's.
> > >
> > > In wrapped style WSDL's, all method parameters are wrapped inside
an
> > > element named as the same name as operation and of the type of
> > > xsd:complextype.
> > >
> > > Ex: Wrapped Style
> > > -----------------
> > >
> > > ...
> > > <types>
> > >     <xsd:schema targetNamespace="http://www.sample.org/" >
> > >         <xsd:element name="countWords">
> > >             <xsd:complexType>
> > >                 <xsd:sequence>
> > >                     <xsd:element name="words" type="xsd:string" />
> > >                 </xsd:sequence>
> > >             </xsd:complexType>
> > >         </xsd:element>
> > >     </xsd:schema>
> > > </types>
> > > <message name="countWordsInput">
> > >     <part name="iInputText" element="tns:countWords" />
> > > </message>
> > > ...
> > >
> > > non-wrapped style
> > > =================
> > > But in Non-Wrapped style type is declared in the element tag.
> > > If you have overloaded operations, you cannot use the
> document/literal
> > > wrapped style.
> > > WSDL allows overloaded operations. But when you add the wrapped
> > pattern to
> > > WSDL you require an element to have the same name as the
operation,
> > and
> > > you cannot have two elements with the same name in XML. So you
must
> > use
> > > the document/literal, non-wrapped style or one of the RPC styles
> > >
> > > Eg: non-wrapped style
> > > ----------------------
> > >
> > > ...
> > > <types>
> > >     <xsd:schema targetNamespace="http://www.sample.org/" >
> > >         <xsd:element name="countWords" type="xsd:string" />
> > >     </xsd:schema>
> > > </types>
> > > <message name="countWordsInput">
> > >     <part name="iInputText" element="tns:countWords" />
> > > </message>
> > >  ...
> > >
> > > Currently I am working on this and implementing the support for
> > > non-wrapped style wsdl's.
> > >
> > > Regards,
> > > Amila Rathnayake.
> > >
> > >


Mime
View raw message