This content has been marked as final.
Show 1 reply
-
1. Re: contract based approach
01012003 Jul 19, 2007 2:34 PM (in response to 01012003)Of course if I write the xml manually and send it over http like this:
<?xml version=\"1.0\" ?> "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"> "<soapenv:Body> "<ans:search xmlns:ans=\"http://ws.hj.org/\"> "<arg0>test</arg0> "</ans:search> "</soapenv:Body> "</soapenv:Envelope>
it works, but if you do:SOAPMessage msg = javax.xml.soap.MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL).createMessage(); SOAPEnvelope env = msg.getSOAPPart().getEnvelope(); SOAPBody body = env.getBody(); SOAPBodyElement be = body.addBodyElement(env.createName("search", "", "ws.hj.org")); be.addChildElement("arg0").addTextNode("test");
it produces and send different xml to endpoint which results in above mentioned exception