Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User Help »

[jboss-user] [JBossWS] - Re: contract based approach

scott.stark@jboss.org

2007-07-19


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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065925#4065925

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065925
_______________________________________________
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user
©2008 junlu.com - Jax Systems, LLC, U.S.A.