axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From v.krishnamoor...@accenture.com
Subject Question on Document Style Service Vs RPC Style Service ..
Date Sat, 14 Jun 2003 14:58:37 GMT
Hi All,

I need a clarification on different service styles used in Axis 1.0.

I'm sending the SOAPxml String as a parameter to invoke the webservices
...Java objects are generated using WSDL2Java and it will be the input
parameter for the method in the webservices..

Here the client should invoke the webservices by passing xml string as
input parameter  rather than java object.

Client Application:

String SOAPxml = "<?xml version=\"1.0\" encoding
=\"UTF-8\"?><soapenv:Envelope xmlns:soapenv
=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd
=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi
=\"http://www.w3.org/2001/XMLSchema-instance\"><soapenv:Body><p:Add xmlns:p
=\"urn:CalculateNS\" xmlns:xsi
=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation
=\"urn:CalculateNS
CalcSchema.xsd\"><arg1>Hi</arg1><arg2>Hello</arg2></p:Add></soapenv:Body></soapenv:Envelope>


" ...

      Message msg = new Message(SOAPxml);
      call.setRequestMessage(msg);
      call.invoke();
      Message respMsg = call.getResponseMessage();
      System.out.println("Response Message :"+respMsg.getSOAPEnvelope());


Method exposed as a webservice:

public String add(Add parameters) throws java.rmi.RemoteException {
        String strMsg = parameters.getArg1();
        return strMsg ;
    }


Question
Can we achieve the same using RPC mode of style rather than document style
service ?.. If yes, could you please explain the way of approach to be
followed? .. If no, can you give me the reason behind it?..

Thanks
krishna


This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.  If you have
received it in error, please notify the sender immediately and delete the
original.  Any other use of the email by you is prohibited.


Mime
View raw message