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 Bay Coni <ba...@gmx.de> on 2007/07/21 19:14:45 UTC

[axis2] How can i deploy a rpc/literal POJO in Axis2 at run time?

Hi All,

I've create a simple echoString POJO test web
service with Axis2-1.3-RC2.

I try this line for deploying rpc/literal style:
operation.setStyle(AxisOperation.STYLE_RPC);

Axis2 generates allways a document/literal WSDL.

How can i deploy a rpc/literal POJO in Axis2 at run time?

Could you help me please? Thanks in advance!

Bay Coni
.
.
.


Server-Code:
---------------------
ConfigurationContext confContext;
confContext = ConfigurationContextFactory
    .createConfigurationContextFromFileSystem(
     file.getAbsolutePath(),axis2xml);
receiver = new SimpleHTTPServer(confContext, ServerPort);
receiver.start();
confContext = null;
confContext = receiver.getConfigurationContext();
AxisConfiguration axisConfig =
    confContext.getAxisConfiguration();

.
.
.

JMethod[] method = schemaGenerator.getMethods();
PhasesInfo pinfo = axisConfig.getPhasesInfo();
for (int i = 0; i < method.length; i++) {
   JMethod jmethod = method[i];
   AxisOperation operation = service
     .getOperation(new QName(jmethod.getSimpleName()));
   operation.setStyle(AxisOperation.STYLE_RPC);
   System.out.println("style:" + operation.getStyle());
   String mep = operation.getMessageExchangePattern();
   Object obj = messageReciverMap.get(mep);
   operation.setMessageReceiver((MessageReceiver) obj);
   pinfo.setOperationPhases(operation);
   service.addOperation(operation);
}
axisConfig.addService(service);



POJO-Service:
---------------------
public class echoString {

    public String echoString(String input) {
       return input;
    }
}



Autogenerated-WSDL
---------------------
<wsdl:binding
     name="echoStringSOAP11Binding"
     type="axis2:echoStringPortType">
     <soap:binding
         transport="http://schemas.xmlsoap.org/soap/http"
         style="document"/>
     <wsdl:operation name="echoString">
         <soap:operation
             soapAction="urn:echoString"
             style="document"/>
         <wsdl:input>
             <soap:body use="literal"/>
         </wsdl:input>
         <wsdl:output>
             <soap:body use="literal"/>
         </wsdl:output>
     </wsdl:operation>
</wsdl:binding>


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


Re: [axis2] How can i deploy a rpc/literal POJO in Axis2 at run time?

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Bay ,
Axis2 does not support rpc/lit support we may have that in Axis2 1.4
release.

Thanks
Deepal
> Hi All,
>
> I've create a simple echoString POJO test web
> service with Axis2-1.3-RC2.
>
> I try this line for deploying rpc/literal style:
> operation.setStyle(AxisOperation.STYLE_RPC);
>
> Axis2 generates allways a document/literal WSDL.
>
> How can i deploy a rpc/literal POJO in Axis2 at run time?
>
> Could you help me please? Thanks in advance!
>
> Bay Coni
> .
> .
> .
>
>
> S



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