axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomas Kelly" <kel...@taylodge.com>
Subject RE: Code generateion, with xmlbeans, results in missing methods.
Date Mon, 23 Apr 2007 16:12:05 GMT
Anne - thanks for that.  My list of notes is steadily growing :)

Amila - thanks again.  I was not confident of my WSDL and was focusing on it
as the source of the problem.  I removed the 'unwrap'/'synconly' options
from my Ant build and now it builds fine.

I'm heading off now to read:
http://www-128.ibm.com/developerworks/webservices/library/ws-whichwsdl/
... to better understand the doc/lit wrapped style wsdl.

Thks,
Tom.

-----Original Message-----
From: Anne Thomas Manes [mailto:atmanes@gmail.com]
Sent: 23 April 2007 13:12
To: axis-user@ws.apache.org
Subject: Re: Code generateion, with xmlbeans, results in missing
methods.


The namespace attribute in the binding is used only with RPC style. It
identifies the namespace to be used to qualify the dynamically
generated wrapper element (which has a local name that matches the
operation name) for the RPC message. When using document style, the
message conforms exactly to the schema defined for the element
specified in the message part -- no dynamic elements generated,
therefore no namespace attribute required.

Anne

On 4/23/07, Tomas Kelly <kellyt@taylodge.com> wrote:
>
>
> Glen - thanks for the info and the link.  I've amended my wsdl
accordingly.
> It's not the source of the current problem but I'm sure it would have
> tripped my up next.
>
> Amila - thanks also to you for taking the time to run thru the code.  I
> downloaded the nightly snapshot from last night, re-ran wsdl2java and I
got
> a slightly different error (a different undefined method).  So basically
> still in the same boat.  I was previously using axi2-1.1.1 (the last
> release).  I see from this list 1.2 may well be released this week to I'll
> probably download that once it's available.
>
> Below is a snip from the build.xml I'm using showing the ant task and
> options.  I have to admit, most of the options are simply copied from
Axis2
> samples - I'm wading in here and learning as I'm going.  I'm off now to
read
> up on doc/lit services so I understand why I shouldn't have specified a
> namespace on my <soap: tags...
>
>   <path id="axis2.classpath">
>     <fileset dir="D:/axis/axis2-1.2-SNAPSHOT/lib">
>       <include name="*.jar"/>
>     </fileset>
>   </path>
>
>   <target name="wsdl2java">
>     <taskdef name="wsdl2Java"
>       classname="org.apache.axis2.tool.ant.AntCodegenTask"
>       classpathref="axis2.classpath"/>
>
>     <echo message="wsdl.src.dir is '${wsdl.src.dir}'"/>
>
>     <wsdl2Java
>       wsdlfilename="${wsdl.src.dir}/MyService.wsdl"
>       language="java"
>       packageName="com.test.testws"
>       databindingName="xmlbeans"
>       unwrap="true"
>       synconly="true"
>       serverSide="true"
>       serverSideInterface="true"
>       generateServiceXml="true"
>       targetSourceFolderLocation="src"
>       targetResourcesFolderLocation="resources"
>       />
>   </target>
>
>
> -----Original Message-----
> From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
> Sent: 23 April 2007 06:00
> To: axis-user@ws.apache.org
> Subject: Re: Code generateion, with xmlbeans, results in missing methods.
>
> I generated the code with the wsdl2java with the current code base at the
> 1.2 branch and it seems to be ok.
> So what is the Axis2 version you use and what are the options you use?
> Can you try out with the RC2?
>
> Amila.
>
>
> On 4/21/07, Glen Mazza <grm7793@verizon.net> wrote:
> > Quite possibly unrelated to your problem, but according to Anne[1], if
> > you are using document/literal, you should *not* have a namespace for
> > your soap:body messages, as you have here:
> >
> > <soap:body use="literal" namespace=" http://MyService"/>
> >
> > Glen
> >
> > [1] http://marc.info/?l=axis-user&m=117394780408840&w=2
> >
> > Am Freitag, den 20.04.2007, 17:37 +0100 schrieb Tomas Kelly:
> > > I'm new to Axis2 - but not to programming. Im interested in generating
> > > service-from-wsdl ('contract-first').  Unfortunately,
> I'm new to WSDL too.
> > >
> > > Using the WSDL below, when I run wsdl2java (I'm using the wsdl2java
ant
> > > task, in Eclipse 3.2...) I get a 'build successful' message from Ant
but
> the
> > > generated classes seem empty and one contains a missing method (for
> example,
> > > the MyServiceMessageReceiverInOut class calls a method 'xgetCourseId'
> which
> > > is undefined for type MyRequestDocument.MyRequest).  I can give more
> details
> > > if it helps.
> > >
> > > I'm assuming (from reading here) there's something wrong with the
> WSDL...
> > > if anyone could point out the error - or indeed a resource I could
> reference
> > > to work it out for myself that would be great.
> > > Thks,
> > > Tom.
> > >
> > >
> > > <wsdl:definitions xmlns:soap="
> http://schemas.xmlsoap.org/wsdl/soap/"
> > >
> xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/ "
> > >       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > >       xmlns:http="http://schemas.xmlsoap.org/wsdl/http/
> "
> > >
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> > >       xmlns:axis2="http://MyService"
> > >       xmlns:app="http://www.customer.com/app"
> > >       targetNamespace="http://MyService">
> > >
> > >       <wsdl:types>
> > >               <xs:schema
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > >                       attributeFormDefault="qualified"
> > >                       elementFormDefault="qualified"
> > >                       xmlns:app="http://www.customer.com/app"
> > >                       targetNamespace="http://www.customer.com/app ">
> > >
> > >                       <!-- ELEMENTS -->
> > >
> > >                       <xs:simpleType name="courseCodeType">
> > >                               <xs:restriction base="xs:string">
> > >                                       <xs:minLength
> value="1" />
> > >                                       <xs:maxLength
> value="7" />
> > >                               </xs:restriction>
> > >                       </xs:simpleType>
> > >                       <xs:simpleType name="courseVerType">
> > >                               <xs:restriction base="xs:string">
> > >                                       <xs:minLength
> value="1" />
> > >                                       <xs:maxLength
> value="5" />
> > >                               </xs:restriction>
> > >                       </xs:simpleType>
> > >                       <xs:complexType name="courseIdType">
> > >                               <xs:sequence>
> > >                                       <xs:element
> name="courseCode" type="app:courseCodeType" />
> > >                                       <xs:element
> name="courseVer" type="app:courseVerType" />
> > >                               </xs:sequence>
> > >                       </xs:complexType>
> > >                       <xs:simpleType name="string5">
> > >                               <xs:restriction base="xs:string">
> > >                                       <xs:minLength
> value="0" />
> > >                                       <xs:maxLength
> value="5" />
> > >                               </xs:restriction>
> > >                       </xs:simpleType>
> > >                       <xs:simpleType name="string5m">
> > >                               <xs:restriction base="app:string5">
> > >                                       <xs:minLength
> value="1" />
> > >                               </xs:restriction>
> > >                       </xs:simpleType>
> > >                       <xs:simpleType name="string100">
> > >                               <xs:restriction base="xs:string">
> > >                                       <xs:minLength
> value="0" />
> > >                                       <xs:maxLength
> value="100" />
> > >                               </xs:restriction>
> > >                       </xs:simpleType>
> > >                       <xs:simpleType name="string100m">
> > >                               <xs:restriction base="app:string100">
> > >                                       <xs:minLength
> value="1" />
> > >                               </xs:restriction>
> > >                       </xs:simpleType>
> > >                       <xs:simpleType name="ynType">
> > >                               <xs:restriction base="xs:token">
> > >                                       <xs:pattern
> value="[YN]" />
> > >                               </xs:restriction>
> > >                       </xs:simpleType>
> > >
> > >                       <xs:element name="myRequest">
> > >                               <xs:complexType>
> > >                                       <xs:sequence>
> > >
> <xs:element name="courseId" type="app:courseIdType" />
> > >                                       </xs:sequence>
> > >                               </xs:complexType>
> > >                       </xs:element>
> > >
> > >                       <xs:element name="myResponse">
> > >                               <xs:complexType>
> > >                                       <xs:sequence>
> > >
> <xs:element name="courseId" type="app:courseIdType" />
> > >
> <xs:element name="name" type="app:string100m" />
> > >
> <xs:element name="version" type="app:string5" />
> > >                                       </xs:sequence>
> > >                               </xs:complexType>
> > >                       </xs:element>
> > >
> > >               </xs:schema>
> > >       </wsdl:types>
> > >
> > >       <!-- MESSAGES -->
> > >
> > >       <wsdl:message name="myRequestMessage">
> > >               <wsdl:part name="part1" element="app:myRequest" />
> > >       </wsdl:message>
> > >       <wsdl:message name="myResponseMessage">
> > >               <wsdl:part name="part1" element="app:myResponse" />
> > >       </wsdl:message>
> > >
> > >       <!-- Port type (operations) -->
> > >
> > >       <wsdl:portType name="MyServicePort">
> > >               <wsdl:operation name="myOp">
> > >                       <wsdl:input
> message="axis2:myRequestMessage" />
> > >                       <wsdl:output
> message="axis2:myResponseMessage" />
> > >               </wsdl:operation>
> > >       </wsdl:portType>
> > >
> > >       <!-- BINDING (bind operations) -->
> > >
> > >       <wsdl:binding name="myServiceSOAP11Binding"
> > >               type="axis2:MyServicePort">
> > >               <soap:binding
> transport="http://schemas.xmlsoap.org/soap/http"
> > >                       style="document" />
> > >               <wsdl:operation name="myOp">
> > >                       <soap:operation soapAction="urn:myOp"
> style="document" />
> > >                       <wsdl:input>
> > >                               <soap:body use="literal"
> > >
> namespace="http://MyService" />
> > >                       </wsdl:input>
> > >                       <wsdl:output>
> > >                               <soap:body use="literal"
> > >
> namespace="http://MyService" />
> > >                       </wsdl:output>
> > >               </wsdl:operation>
> > >       </wsdl:binding>
> > >
> > >       <wsdl:binding name="myServiceSOAP12Binding"
> > >               type="axis2:MyServicePort">
> > >               <wsdl:operation name="myOp">
> > >                       <soap12:operation soapAction="urn:myOp"
> > >                               style="document" />
> > >                       <wsdl:input>
> > >                               <soap12:body use="literal"
> > >
> namespace="http://MyService " />
> > >                       </wsdl:input>
> > >                       <wsdl:output>
> > >                               <soap12:body use="literal"
> > >                                       namespace="
> http://MyService" />
> > >                       </wsdl:output>
> > >               </wsdl:operation>
> > >       </wsdl:binding>
> > >
> > >       <!-- SERVICE -->
> > >
> > >       <wsdl:service name="myService">
> > >               <wsdl:port name="myServiceSOAP11port"
> > >
> binding="axis2:myServiceSOAP11Binding">
> > >                       <soap:address
> > >
> location="http://pc0001/axis2-1.1.1/services/myService" />
> > >               </wsdl:port>
> > >               <wsdl:port name="myServiceSOAP12port"
> > >
> binding="axis2:myServiceSOAP12Binding">
> > >                       <soap12:address
> > >                               location="
> http://pc0001/axis2-1.1.1/services/myService" />
> > >               </wsdl:port>
> > >       </wsdl:service>
> > >
> > > </wsdl:definitions>
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message