Server was unable to read request

"nilesh" <[email protected]>
Newsgroups gmane.text.xml.soap.user
Message-ID <[email protected]>
Hi all,

i am getting following SOAP Fault error...

 Fault Code = soap:Client
 Fault String = Server was unable to read request. --> There is an error in XML
document (6, 3). --> The element 'urn:schemas-nil:dal:webservices:messag
eschemas/authorisation_input:Input_Message' cannot contain text. Expected
 'urn:schemas-nil:dal:webservices:messageschemas/operational:Operational
'. An error occurred at , (1, 106).

Thsi is my code of java soap client..

		String TEST_XML = "<Input_Message xmlns=\"urn:schemas-nil:dal:webservices:messageschemas\"><Operational><Application_Identification><AppId>A2G</AppId></Application_Identification></Operational><Data><Amount>123567.12</Amount></Data></Input_Message>";

		URL url = new URL ("http://192.168.1.7/PayAuth2/Authorisation_Stub.asmx");


		SOAPMappingRegistry smr = new SOAPMappingRegistry ();
		StringDeserializer sd = new StringDeserializer ();
		smr.mapTypes(Constants.NS_URI_SOAP_ENC,new QName ("","AuthoriseResult"),null, null, sd);
		Call call = new Call ();
		call.setSOAPTransport(st);
		call.setSOAPMappingRegistry (smr);
		call.setTargetObjectURI ("urn:schemas-nil:dal:webservices/authorisation");
		call.setMethodName("Authorise");
		call.setEncodingStyleURI (Constants.NS_URI_SOAP_ENC);
		call.getSOAPContext().setDocLitSerialization(true);
		Vector params = new Vector();
		params.addElement(new Parameter("request",java.lang.String.class, TEST_XML, Constants.NS_URI_SOAP_ENC));
		call.setParams(params);

		Response resp = null;
		try {
		   resp = call.invoke (url, "urn:schemas-nil:dal:webservices/authorisation/Authorise");
		}
		catch (SOAPException e) {
			System.err.println("Caught SOAPException (" + e.getFaultCode () + "): " + e.getMessage ());
			return;
		}


my WSDL file looks like this....

- <s:element name="AuthorisePayment">
- <s:complexType>
- <s:sequence>
- <s:element minOccurs="0" maxOccurs="1" name="request">
- <s:complexType>
- <s:sequence>
  <s:any namespace="urn:schemas-nil:dal:webservices:messageschemas/authorisation_input" /> 
  </s:sequence>
  </s:complexType>
  </s:element>
  </s:sequence>
  </s:complexType>
  </s:element>

  is becuase i am sendig java.lang.String.class but its expecting <s:complexType>. can tell me the solution for this...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.