Hi all,
I read the example at http://www-106.ibm.com/developerworks/webservices/library/ws-soapatt/?open&l=930,t=grws and it was very helpful. I have a small problem. I am using Apache SOAP 2.2 both on the client side and the server side and I am not using WSDL, but simple RPC based invocation.
 
The server side code DocumentManagementImpl is fine and my code is similar to that. But the client side code uses WSTK and Apache SOAP I guess. It also uses WSDL based invocation. I need to add attachments using Apache SOAP only (may be using SOAPContext) and with out using WSDL. Does anyone has a sample code to add attachments using apache soap only. My server url looks like http://<hostname>:<port>/soap/servlet/rpcrouter
My client code before using attachments looks something like below. Now I need to code related to attachments to this code.

// Build the call.

Call call = new Call();

trace("after calling Call");

call.setTargetObjectURI("urn:SOAPServiceName");

call.setMethodName("methodName");

call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);

Vector params = new Vector();

params.addElement(new Parameter("arg1", userField.getText().getClass(), new String(userField.getText()),null));

params.addElement(new Parameter("arg2", passField.getText().getClass(), new String(passField.getText()), null));

call.setParams(params);

Response resp;

resp = call.invoke(url, "");

 
Any help would be appreciated.
 
Thanks
 
Praveen

Reply via email to