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 Thu, 05 Aug 2004 13:19:57 GMT


Hi All,

I have amended the GatewayWebService.wsdl that I've sent you early and
make it a valid non-wrapped wsdl. The earlier one had 2 parts in a
message body.

Here I am sending the new wsdl and can somebody check this and say
whether this is a valid wsdl.

I have generated the server side and client side by using the latest
axis jars and with -wnonwrapped command line option. The generated code
seems to be ok. I compiled the server and client as well and it compiled
without any errors.

Thanks and Regards,
Amila Rathnayake.




> -----Original Message-----
> From: Amila Rathnayake [mailto:amilar@opensource.lk]
> Sent: Wednesday, August 04, 2004 6:33 PM
> To: 'Apache AXIS C Developers List'
> Cc: sanjiva@opensource.lk
> Subject: RE: Supporting for Non-Wrapped WSDL's
> 
> 
> 
> Hi All,
> 
> I still have two problems to clarify with my implementation of
> non-wrapped style wsdl support.
> 
> 
> 1).
> 
> Theoretically in wrapped style wsdl's we can have same name for
> operation name and parameter name for that operation. But if we have
the
> same name for operation and parameter in non-wrapped wsdl, is it a
> valid/correct wsdl?
> 
> Please clarify me if anybody has an idea on this.
> 
> 
> 2).
> 
> In the stub header at the client side, it adds the code for include
> header files for arrays defined in the complex types. But actually
that
> array represents a simple type and therefore it will not generate
> separate class for that type. Then it will give errors at the
> compilation since it can't find the particular header file.
> 
> For example ;
> 
> <s:complexType name="Thing" final="restriction">
>   <s:sequence>
>     <s:element ref="s0:aThing" minOccurs="0" maxOccurs="unbounded"/>
>     <s:element ref="s0:otherData" minOccurs="0"
maxOccurs="unbounded"/>
>   </s:sequence>
> </s:complexType>
> 
> But actually aThing is a simple type
> 
>           <s:simpleType name="aThing">
>               <s:restriction base="s:string">
>                   <s:maxLength value="255"/>
>               </s:restriction>
>           </s:simpleType>
> 
> I have to work on this and have to stop the adding of lines to include
> the header files for arrays in complex types and those arrays are
> actually simple types and that is defined in other place of the wsdl.
> 
> Thanks and regards,
> Amila.
> 
> 
> 
> > -----Original Message-----
> > From: Amila Rathnayake [mailto:amilar@opensource.lk]
> > Sent: Wednesday, August 04, 2004 3:39 PM
> > To: 'Apache AXIS C Developers List'
> > Subject: RE: Supporting for Non-Wrapped WSDL's
> >
> >
> >
> > 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