Hi
I am using axis 2.0.9 and have webservice hosted by Weblogic and my
client code looks like
try{
//get the soap factory
SOAPFactory factory =
OMAbstractFactory.getSOAP11Factory();
//create the name space
OMNamespace opN =
factory.createOMNamespace("http://www.bea.com/examples/PurchaseOrder",
"m");
OMElement method =
factory.createOMElement("getPurchaseOrderById", opN);
OMElement value =
factory.createOMElement("String", opN);
value.addChild(factory.createText(value,
"1234"));
method.addChild(value);
EndpointReference targetEPR = new
EndpointReference(AddressingConstants.WSA_TO,
"http://localhost:8001/webservice/PurchaseOrderService");
Call call = new Call();
call.setTo(targetEPR);
call.setTransportInfo(Constants.TRANSPORT_HTTP,
Constants.TRANSPORT_HTTP, false);
//Blocking invocation
OMElement result = (OMElement)
call.invokeBlocking("getPurchaseOrderById", method);
StringWriter writer = new StringWriter();
result.serializeWithCache(new
OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(writer)));
writer.flush();
System.out.println(writer.toString());
}
catch(Throwable t){
t.printStackTrace();
}
javax.xml.rpc.JAXRPCException: javax.xml.soap.SOAPException: Found
SOAPElement [<m:String
xmlns:m="http://www.bea.com/examples/PurchaseOrder">1234</m:String>].
But was not able to find a Part that is registered with this Message
which corresponds to this SOAPElement. The name of the element should be
one of these[string].>
My question is
1. Does Call automatically create SOAP Envelope and Body. If not how do
I do it?
2. Does the code look right
Please soomeone
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]