You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Wishing Carebear <wi...@gmail.com> on 2009/01/19 19:45:20 UTC

how to generate the XML in-out stubs

Hello:In the userguide :
http://ws.apache.org/axis2/1_4_1/userguide-creatingclients.html#createclients

read the following line:
Axis2 gives you several options when it comes to mapping WSDL to objects
when generating clients. Three of these options are Axis2 DataBinding
Framework, XMLBeans, and JiBX databinding. All of these methods involve
using databinding to create Java objects out of the XML structures used by
the service, and each has its pros and cons. You can also generate XML
in-out stubs that are not based on databinding.


Question: Would like to know how to generate the XML in-out stubs.

Thanks,
cbear

Re: how to generate the XML in-out stubs

Posted by Sameera Jayasoma <sa...@gmail.com>.
Hi,

Seems like you need to send and receive XML directly without any
databinding. Have a look a the following link.

http://ws.apache.org/axis2/1_4_1/quickstartguide.html#axiom

-- 
Sameera Jayasoma
Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://tech.jayasoma.org

Re: how to generate the XML in-out stubs

Posted by Wishing Carebear <wi...@gmail.com>.
In SoapUI, the request XML can be generated as below:<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:guit="
http://www.atomic-x.com/xmlservices/GuitarManufWS">
   <soapenv:Header/>
   <soapenv:Body>
      <guit:SearchLink>
         <!--Optional:-->
         <guit:link>?</guit:link>
      </guit:SearchLink>
   </soapenv:Body>
</soapenv:Envelope>

Wondering if it is possible to generate similar to this using axis2 without
any coding. Tried with the -d none but the OMElement looks like needs to be
created by the client which means understanding the XSD types and
everything. With SoapUI, the request is already in the XML String and just
need to fill in the values.

Any pointers will be very useful.

Thanks,
cbear

On Tue, Jan 20, 2009 at 9:42 AM, Wishing Carebear <
wishing.carebear@gmail.com> wrote:

> Thanks Sameera.
>
>
> On Tue, Jan 20, 2009 at 9:25 AM, Sameera Jayasoma <
> sameera.madushan@gmail.com> wrote:
>
>>
>>
>> On Tue, Jan 20, 2009 at 10:38 PM, Wishing Carebear <
>> wishing.carebear@gmail.com> wrote:
>>
>>> Thanks Amila/Sameera for your reply.
>>> Yes, I have a sample request in XML String. Want to pass that to the stub
>>> methods directly. Also from the response want to get the XML response back
>>> as String with no java objects involved.
>>>
>>> Tried -d none option and the stub has the operation as below :
>>>     public  org.apache.axiom.om.OMElement
>>> SearchLink(org.apache.axiom.om.OMElement searchLink)
>>>                                                             throws
>>> java.rmi.RemoteException
>>>
>>> Wondering what is the parameter org.apache.axiom.om.OMElement searchLink
>>> refers to here. Is it the whole request XML only for the payload or the
>>> whole SOAP envelop.
>>>
>>
>> AFAIK, this parameter refers to the XML payload.
>>
>>
>>>
>>> Thanks for your time and help,
>>> Regards
>>> cbear
>>>
>>> On Mon, Jan 19, 2009 at 8:37 PM, Amila Suriarachchi <
>>> amilasuriarachchi@gmail.com> wrote:
>>>
>>>> use  -d none   option
>>>>
>>>> thanks,
>>>> Amila.
>>>>
>>>>
>>>> On Tue, Jan 20, 2009 at 12:15 AM, Wishing Carebear <
>>>> wishing.carebear@gmail.com> wrote:
>>>>
>>>>> Hello:In the userguide :
>>>>> http://ws.apache.org/axis2/1_4_1/userguide-creatingclients.html#createclients
>>>>>
>>>>> read the following line:
>>>>> Axis2 gives you several options when it comes to mapping WSDL to
>>>>> objects when generating clients. Three of these options are Axis2
>>>>> DataBinding Framework, XMLBeans, and JiBX databinding. All of these methods
>>>>> involve using databinding to create Java objects out of the XML structures
>>>>> used by the service, and each has its pros and cons. You can also
>>>>> generate XML in-out stubs that are not based on databinding.
>>>>>
>>>>>
>>>>> Question: Would like to know how to generate the XML in-out stubs.
>>>>>
>>>>> Thanks,
>>>>> cbear
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Amila Suriarachchi
>>>> WSO2 Inc.
>>>> blog: http://amilachinthaka.blogspot.com/
>>>>
>>>
>>>
>>
>>
>> --
>> Sameera Jayasoma
>> Software Engineer
>> WSO2 Inc.
>> Oxygenating the Web Service Platform.
>> http://wso2.org/
>>
>> blog: http://tech.jayasoma.org
>>
>
>

Re: how to generate the XML in-out stubs

Posted by Wishing Carebear <wi...@gmail.com>.
Thanks Sameera.

On Tue, Jan 20, 2009 at 9:25 AM, Sameera Jayasoma <
sameera.madushan@gmail.com> wrote:

>
>
> On Tue, Jan 20, 2009 at 10:38 PM, Wishing Carebear <
> wishing.carebear@gmail.com> wrote:
>
>> Thanks Amila/Sameera for your reply.
>> Yes, I have a sample request in XML String. Want to pass that to the stub
>> methods directly. Also from the response want to get the XML response back
>> as String with no java objects involved.
>>
>> Tried -d none option and the stub has the operation as below :
>>     public  org.apache.axiom.om.OMElement
>> SearchLink(org.apache.axiom.om.OMElement searchLink)
>>                                                             throws
>> java.rmi.RemoteException
>>
>> Wondering what is the parameter org.apache.axiom.om.OMElement searchLink refers
>> to here. Is it the whole request XML only for the payload or the whole SOAP
>> envelop.
>>
>
> AFAIK, this parameter refers to the XML payload.
>
>
>>
>> Thanks for your time and help,
>> Regards
>> cbear
>>
>> On Mon, Jan 19, 2009 at 8:37 PM, Amila Suriarachchi <
>> amilasuriarachchi@gmail.com> wrote:
>>
>>> use  -d none   option
>>>
>>> thanks,
>>> Amila.
>>>
>>>
>>> On Tue, Jan 20, 2009 at 12:15 AM, Wishing Carebear <
>>> wishing.carebear@gmail.com> wrote:
>>>
>>>> Hello:In the userguide :
>>>> http://ws.apache.org/axis2/1_4_1/userguide-creatingclients.html#createclients
>>>>
>>>> read the following line:
>>>> Axis2 gives you several options when it comes to mapping WSDL to objects
>>>> when generating clients. Three of these options are Axis2 DataBinding
>>>> Framework, XMLBeans, and JiBX databinding. All of these methods involve
>>>> using databinding to create Java objects out of the XML structures used by
>>>> the service, and each has its pros and cons. You can also generate XML
>>>> in-out stubs that are not based on databinding.
>>>>
>>>>
>>>> Question: Would like to know how to generate the XML in-out stubs.
>>>>
>>>> Thanks,
>>>> cbear
>>>>
>>>
>>>
>>>
>>> --
>>> Amila Suriarachchi
>>> WSO2 Inc.
>>> blog: http://amilachinthaka.blogspot.com/
>>>
>>
>>
>
>
> --
> Sameera Jayasoma
> Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://tech.jayasoma.org
>

Re: how to generate the XML in-out stubs

Posted by Sameera Jayasoma <sa...@gmail.com>.
On Tue, Jan 20, 2009 at 10:38 PM, Wishing Carebear <
wishing.carebear@gmail.com> wrote:

> Thanks Amila/Sameera for your reply.
> Yes, I have a sample request in XML String. Want to pass that to the stub
> methods directly. Also from the response want to get the XML response back
> as String with no java objects involved.
>
> Tried -d none option and the stub has the operation as below :
>     public  org.apache.axiom.om.OMElement
> SearchLink(org.apache.axiom.om.OMElement searchLink)
>                                                             throws
> java.rmi.RemoteException
>
> Wondering what is the parameter org.apache.axiom.om.OMElement searchLink refers
> to here. Is it the whole request XML only for the payload or the whole SOAP
> envelop.
>

AFAIK, this parameter refers to the XML payload.


>
> Thanks for your time and help,
> Regards
> cbear
>
> On Mon, Jan 19, 2009 at 8:37 PM, Amila Suriarachchi <
> amilasuriarachchi@gmail.com> wrote:
>
>> use  -d none   option
>>
>> thanks,
>> Amila.
>>
>>
>> On Tue, Jan 20, 2009 at 12:15 AM, Wishing Carebear <
>> wishing.carebear@gmail.com> wrote:
>>
>>> Hello:In the userguide :
>>> http://ws.apache.org/axis2/1_4_1/userguide-creatingclients.html#createclients
>>>
>>> read the following line:
>>> Axis2 gives you several options when it comes to mapping WSDL to objects
>>> when generating clients. Three of these options are Axis2 DataBinding
>>> Framework, XMLBeans, and JiBX databinding. All of these methods involve
>>> using databinding to create Java objects out of the XML structures used by
>>> the service, and each has its pros and cons. You can also generate XML
>>> in-out stubs that are not based on databinding.
>>>
>>>
>>> Question: Would like to know how to generate the XML in-out stubs.
>>>
>>> Thanks,
>>> cbear
>>>
>>
>>
>>
>> --
>> Amila Suriarachchi
>> WSO2 Inc.
>> blog: http://amilachinthaka.blogspot.com/
>>
>
>


-- 
Sameera Jayasoma
Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://tech.jayasoma.org

Re: how to generate the XML in-out stubs

Posted by Wishing Carebear <wi...@gmail.com>.
Thanks Amila/Sameera for your reply.
Yes, I have a sample request in XML String. Want to pass that to the stub
methods directly. Also from the response want to get the XML response back
as String with no java objects involved.

Tried -d none option and the stub has the operation as below :
    public  org.apache.axiom.om.OMElement
SearchLink(org.apache.axiom.om.OMElement searchLink)
                                                            throws
java.rmi.RemoteException

Wondering what is the parameter org.apache.axiom.om.OMElement searchLink refers
to here. Is it the whole request XML only for the payload or the whole SOAP
envelop.

Thanks for your time and help,
Regards
cbear

On Mon, Jan 19, 2009 at 8:37 PM, Amila Suriarachchi <
amilasuriarachchi@gmail.com> wrote:

> use  -d none   option
>
> thanks,
> Amila.
>
>
> On Tue, Jan 20, 2009 at 12:15 AM, Wishing Carebear <
> wishing.carebear@gmail.com> wrote:
>
>> Hello:In the userguide :
>> http://ws.apache.org/axis2/1_4_1/userguide-creatingclients.html#createclients
>>
>> read the following line:
>> Axis2 gives you several options when it comes to mapping WSDL to objects
>> when generating clients. Three of these options are Axis2 DataBinding
>> Framework, XMLBeans, and JiBX databinding. All of these methods involve
>> using databinding to create Java objects out of the XML structures used by
>> the service, and each has its pros and cons. You can also generate XML
>> in-out stubs that are not based on databinding.
>>
>>
>> Question: Would like to know how to generate the XML in-out stubs.
>>
>> Thanks,
>> cbear
>>
>
>
>
> --
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
>

Re: how to generate the XML in-out stubs

Posted by Amila Suriarachchi <am...@gmail.com>.
use  -d none   option

thanks,
Amila.

On Tue, Jan 20, 2009 at 12:15 AM, Wishing Carebear <
wishing.carebear@gmail.com> wrote:

> Hello:In the userguide :
> http://ws.apache.org/axis2/1_4_1/userguide-creatingclients.html#createclients
>
> read the following line:
> Axis2 gives you several options when it comes to mapping WSDL to objects
> when generating clients. Three of these options are Axis2 DataBinding
> Framework, XMLBeans, and JiBX databinding. All of these methods involve
> using databinding to create Java objects out of the XML structures used by
> the service, and each has its pros and cons. You can also generate XML
> in-out stubs that are not based on databinding.
>
>
> Question: Would like to know how to generate the XML in-out stubs.
>
> Thanks,
> cbear
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/