Posted By:
Sharon_Well
Posted On:
Friday, April 19, 2002 01:45 PM
I am passing xml as a string, and using encodingStyle "LITERAL", which is what you are supposed to do to NOT get that error. public Boolean SaveComponents(String CompDoc, String username,String encodepassword) throws Exception { Boolean returnVal = null; URL endpointURL = new URL(endpoint); Call call = new Call(); call.setSOAPTransport(m_httpConnection); call.setTargetObjectURI("urn:MedleyManager"); call.setMethodName("SaveMedleyAndComponents"); //call.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML); Vector params = new Vector(); params.addElement(new Parameter("CompDoc",Element.class, CompDoc,Constants.N
More>>
I am passing xml as a string, and using encodingStyle "LITERAL", which is what you are supposed to do to NOT get that error.
public Boolean SaveComponents(String CompDoc,
String username,String encodepassword) throws Exception
{
Boolean returnVal = null;
URL endpointURL = new URL(endpoint);
Call call = new Call();
call.setSOAPTransport(m_httpConnection);
call.setTargetObjectURI("urn:MedleyManager");
call.setMethodName("SaveMedleyAndComponents");
//call.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML);
Vector params = new Vector();
params.addElement(new Parameter("CompDoc",Element.class, CompDoc,Constants.NS_URI_LITERAL_XML));
params.addElement(new Parameter("username",String.class,username, Constants.NS_URI_SOAP_ENC));
params.addElement(new Parameter("encodepassword",String.class,encodepassword, Constants.NS_URI_SOAP_ENC));
call.setParams(params);
Response response = call.invoke(endpointURL, "");
if (!response.generatedFault())
{
Parameter result = response.getReturnValue();
returnVal = (Boolean)result.getValue();
}
else
{
Fault fault = response.getFault();
throw new SOAPException(fault.getFaultCode(), fault.getFaultString());
}
return returnVal;
}
Thanks,
Sharon.
<<Less