You can do this using Axis2 rmi. Axis2 rmi recently added module and it only
available at the nightly build. if you want it to use with Axis2 1.3 you
have to add the axis2-rmi-SNAPSHOT.jar to class path.

here is the way.
first crate tow java beans like this,you can see this in Axis2-rmi tests.

package org.apache.axis2.rmi.databind.dto;

public class Activate {

    private CancelWorkflowRequest CancelWorkflowRequest;

    public CancelWorkflowRequest getCancelWorkflowRequest() {
        return CancelWorkflowRequest;
    }

    public void setCancelWorkflowRequest(CancelWorkflowRequest
cancelWorkflowRequest) {
        CancelWorkflowRequest = cancelWorkflowRequest;
    }
}

package org.apache.axis2.rmi.databind.dto;


public class CancelWorkflowRequest {

    private int IWFID;
    private int Restart;

    public int getIWFID() {
        return IWFID;
    }

    public void setIWFID(int IWFID) {
        this.IWFID = IWFID;
    }

    public int getRestart() {
        return Restart;
    }

    public void setRestart(int restart) {
        Restart = restart;
    }
}

Then use this method to get om element.

public void testCreateActivateObject(){
        Activate activate = new Activate();
        CancelWorkflowRequest cancelWorkflowRequest = new
CancelWorkflowRequest();
        cancelWorkflowRequest.setIWFID(5);
        cancelWorkflowRequest.setRestart(10);

        activate.setCancelWorkflowRequest(cancelWorkflowRequest);

        Configurator configurator = new Configurator();

        configurator.addPackageToNamespaceMaping("
org.apache.axis2.rmi.databind.dto",
                "
http://phoenix.esb.infrastructure.biztalk.schemas.cancelworkflowrequest/";);

        Parameter parameter = new Parameter(Activate.class, "Activate");
        parameter.setNamespace("http://phoenix.co.il/ESB/Infrastructure";);

        try {
            OMElementCreator omElementCreator = new OMElementCreator();
            OMElement omElement = omElementCreator.getOMElement
(activate,parameter,configurator);
            System.out.println("OM Element ==> " + omElement.toString());
        } catch (OMElementCreationException e) {
            e.printStackTrace();  //To change body of catch statement use
File | Settings | File Templates.
        }
     }

Thanks,
Amila.

On 8/15/07, אלחנן מעיין <[EMAIL PROTECTED]> wrote:
>
>  Yes, I would like it to be as straightforward as possible using only java
> Beans and no code generation , if possible (if we have infrastructure based
> on xml for web services call description so we have to be flexlible).
>
>
>
>
>  ------------------------------
>
> *From:* Amila Suriarachchi [mailto:[EMAIL PROTECTED]
> *Sent:* Wednesday, August 15, 2007 5:55 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: [AXIS2] specify playload without using omElement?
>
>
>
>
>
> On 8/15/07, *אלחנן מעיין* <[EMAIL PROTECTED]> wrote:
>
> Hi.. is there way to specify this:
>
> <ns3:Activate xmlns:ns3="http://Phoenix.co.il/ESB/Infrastructure";>
>
> <CancelWorkflowRequest 
> xmlns="http://Phoenix.ESB.Infrastructure.BizTalk.Schemas.CancelWorkflowRequest
> ">
>
> <IWFID>2</IWFID>
>
> <Restart>0</Restart>
>
> </CancelWorkflowRequest>
>
> </ns3:Activate>
>
>
>
> Inside soapbody without using OMElement? (just java Beans?)
>
>
> Do you want to  create this reqeust from the client? and Do you want to
> put this part directly under the soap body?
> i.e <SoapBody>
>         <Activate>
>     </SoapBody>
>
>
>   ------------------------------
>
> *From:* Bhojraj, Santosh [mailto:[EMAIL PROTECTED]
> *Sent:* Wednesday, August 15, 2007 5:11 PM
> *To:* axis-user@ws.apache.org
> *Subject:* RE: Axis2: Speciying style in services.xml
>
>
>
> Thanx...but the link below is *not* for Axis2. Probably Axis 1.1..
>
>
>  ------------------------------
>
> *From:* Martin Gainty [mailto:[EMAIL PROTECTED]
> *Sent:* Tuesday, August 14, 2007 4:57 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Axis2: Speciying style in services.xml
>
> a link to the style attribute explanation
>
>
> http://ws.apache.org/axis/java/user-guide.html#ServiceStylesRPCDocumentWrappedAndMessage
>
> Does this help?
> M--
>
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please
> notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
>
>  ----- Original Message -----
>
> *From:* Bhojraj, Santosh <[EMAIL PROTECTED]>
>
> *To:* axis-user@ws.apache.org
>
> *Sent:* Tuesday, August 14, 2007 4:37 PM
>
> *Subject:* Axis2: Speciying style in services.xml
>
>
>
> Hi:
>
>   I am trying to create web services using Axis2 and would like to specify
> the style as "rpc" when the <<serivce>>.aar is generated. How do I do this ?
> The style gets set to "document" when I deploy the .aar file. I am able to
> do this when generating the WSDL by specifying the parameter in the ant
> build file.
>
>   Is there a link for the specification on this xml file ?
>
>
>
> Thanx!!
>
> Santosh
>
>
>
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>



-- 
Amila Suriarachchi,
WSO2 Inc.

Reply via email to