In the WSDD, specify <service name="MyService" style="wrapped" use="literal">
The wrapped style supports an RPC-like programming interface. For the client, use WSDL2Java to generate a client proxy. The DII call interface wasn't designed to work with document/literal. Anne On Feb 11, 2008 7:21 AM, Duseja, Sushil <[EMAIL PROTECTED]> wrote: > > > > > Hello, > > > > I am new to web services. Could anyone please let me know as to how to > create a document/literal web service using axis? And what type of client is > used to invoke it? I would really appreciate if deploy.wsdd's contents and > client code is provided as I am facing issues using my own. > > > > In addition, what are the changes one needs to make to the client that works > well with rpc/encoded service, to access a doc/literal service? > > > > Service > > > > public class MyService > > { > > public String serviceMethod(String arg) > > { > > return arg; > > } > > > > } > > > > deploy.wsdd > > > > <deployment xmlns="http://xml.apache.org/axis/wsdd/" > > xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> > > > > <service name="MyService" style="document" use="literal"> > > > > <parameter name="className" > value="samples.userguide.example3.MyService"/> > > <parameter name="allowedMethods" value="*"/> > > > > </service> > > > > </deployment> > > > > Client > > > > Service service = new Service(); > > Call call = (Call) service.createCall(); > > call.setTargetEndpointAddress( new java.net.URL(endpointURL) ); > > call.setOperationName( new QName("http://example3.userguide.samples", > "serviceMethod") ); > > call.addParameter( "arg", org.apache.axis.encoding.XMLType.XSD_STRING, > ParameterMode.IN); > > call.setReturnType( org.apache.axis.encoding.XMLType.XSD_STRING ); > > > > String ret = (String) call.invoke( new Object[] { textToSend } ); > > > > > > Thanks. > > > > Regards, > > Sushil Duseja > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]