Hello.
I get the following error when I try to call invoke. parsing error: org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x0) was found in the element content of the document.SOAP-ENV:Client [faultCode=SOAP-ENV:Client] I have attached the Xml used in the params.addElement URL url = new URL(ConnectUrl); //Address of SOAP router // Build the call Call call = new Call(); call.setSOAPMappingRegistry(new SOAPMappingRegistry()); call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC); //set the name of the SoapServer call.setTargetObjectURI(TargetUri); call.setMethodName(MethodName); Vector params = new Vector(); params.addElement(new Parameter("parameter",String.class, Xml,null)); call.setParams(params); // Invoke the call to the SOAP server Response resp = call.invoke(url,""); // Print the returned string Fault fault = resp.getFault(); if (fault == null) { Parameter ret = resp.getReturnValue(); String returnstring = (String)ret.getValue(); if (returnstring != null && !returnstring.equals("")) { DOMParser parser = new DOMParser(); parser.parse(new InputSource(new StringReader(returnstring))); Document doc = parser.getDocument(); Node node = doc.getDocumentElement().getElementsByTagName ("svarnummer").item(0); if (node.getNodeValue() == "0") return "SUCCESS"; else return "FAILURE"; } else return (String)ret.getValue(); } else { System.out.println("The request generated a Fault object: " + fault.getFaultString() + fault.getFaultCode()); } I am using Xerces 1.4.4, which is the jar file in my classpath Claus Nielsen (See attached file: xmlex.xml)
xmlex.xml
Description: Binary data