Hi Dimitris ,
You may use Axis2 POJO rather than using Axiom directly. Then you can
come up with the java bean with the required properties , after that you
can use that as the method signature. If you do so Axis2 will generate
the correct wsdl for you.
Thanks
Deepal
> Hi everyone, I've started to use axis2 (version 1.2) for almost a month
> now and I'd like your help with deployment.
> Even though the service is up and working fine in my development
> environment I would like some advice
> before we need to deploy to the client.
> The messages I need to pass through, say lessons would presumably be in
> the following form:
> (I'm writing without a namespace defined but I would like one)
>
> ===============================================
> Request:
> <viewLesson lesson_id="123" />
>
> Response:
> <viewLessonResponse>
> <title>Lesson's title</title>
> <lesson>blah blah....</lesson>
> <date_created>21/12/2006</date_created>
> <attached_files>
> <attachment>
> <filename>something.pdf</filename>
> <data>base 64 encoded data</data>
> </attachment>
> </attached_files>
> </viewLessonResponse>
> ===============================================
>
> So I've written my service class like:
>
> ==================================================
> package org.example;
>
> // import stuff
>
> public class MyService {
>
> public OMElement viewLesson(OMElement xml) {
> // process the element and return the xml
> }
> }
> ==================================================
>
> and in my services.xml I have a service group and say MyService in there:
> ===============================================================================
>
> <service name="MyService"
> class="my.real.package.lifecycle.MyServiceLifeCycle"
> scope="application"
> targetNamespace="http://www.example.org">
>
> <Description>
> My Description
> </Description>
>
> <schema schemaNamespace="http://www.example.org"/>
>
> <module ref="logger" />
>
> <parameter name="ServiceClass" locked="false">
> org.example.MyService
> </parameter>
>
> <operation name="viewLesson">
> <messageReceiver
>
> class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver" />
> </operation>
> </service>
>
> Now I know axis can't know about my data to produce a proper wsdl file,
> but what I get is weird, this is what I don't understand:
>
> <wsdl:definitions targetNamespace="http://www.examle.org">
> <wsdl:documentation>
> My Documentation
> </wsdl:documentation>
> <wsdl:types>
> <xs:schema targetNamespace="http://www.example.org"
> attributeFormDefault="qualified" elementFormDefault="qualified">
> <xs:element name="viewLesson">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="viewLesson" type="xs:anyType"
> nillable="true"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="viewLessonResponse">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="return" type="xs:anyType"
> nillable="true"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> ... Rest of stuff
> ===============================================================================
>
>
> Why does viewLesson contain another element in there named viewLesson?
> And viewLessonResponse an element named return? What am I doing wrong?
> Sorry for the long post, but I tried to be as detailed as possible.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]