I gave up using the POJO method for generating the outgoing SOAP message as it does not seem to work. I am able to generate a correct SOAP envelope using the SOAPFactory
etc explicitly. However, I get the following:

org.apache.axis2.AxisFault: Unknown SOAP Version. Current Axis handles only SOAP 1.1 and SOAP 1.2 messages at org.apache.axis2.context.MessageContext.setEnvelope(MessageContext.java:1310) at org.apache.axis2.rpcclient.BooksAxis2SOAPRPCclient.main(BooksAxis2SOAPRPCclient.java:75)

This is the code - I am initializing the SOAP11 modules so why is it complaining at the last line below?
Thanks

              Options options = new Options();
options.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
               options.setTo(targetEPR);
               options.setAction("urn:getBooks");
ServiceClient client = new ServiceClient();
               client.setOptions(options);
OperationClient mepClient = client
                   .createClient(ServiceClient.ANON_OUT_IN_OP);
SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
               OMNamespace ns = fac.createOMNamespace(
"http://http://myBooksAxis2.axis2.apache.org/";, "ns1");
               OMElement payload = fac.createOMElement("getBooks", ns);

               SOAPEnvelope env = fac.getDefaultEnvelope();
               env.setNamespace(ns);
env.getBody().addChild(payload); MessageContext mc = new MessageContext(); mc.setEnvelope(env);


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
For additional commands, e-mail: java-user-h...@axis.apache.org

Reply via email to