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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to