You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Davanum Srinivas (JIRA)" <ji...@apache.org> on 2006/05/12 20:07:10 UTC
[jira] Resolved: (AXIS2-694) Soap:Body is serialized inside of a
soap:Header element
[ http://issues.apache.org/jira/browse/AXIS2-694?page=all ]
Davanum Srinivas resolved AXIS2-694:
------------------------------------
Resolution: Fixed
Fixed.
> Soap:Body is serialized inside of a soap:Header element
> -------------------------------------------------------
>
> Key: AXIS2-694
> URL: http://issues.apache.org/jira/browse/AXIS2-694
> Project: Apache Axis 2.0 (Axis2)
> Type: Bug
> Versions: 1.0
> Environment: WinXP, JDK 1.5.06
> Reporter: Simon Fell
> Assignee: Ajith Harshana Ranabahu
> Priority: Critical
> Attachments: partner.wsdl
>
> WSDL2Java -s -u -uri partner.wsdl
> compiled the generated code, called the query method which takes a session Header, like this
> SforceServiceStub stub = new SforceServiceStub();
> Login l = new Login();
> l.setUsername(args[0]);
> l.setPassword(args[1]);
> LoginResult lr = stub.login(l, null).getResult();
>
> System.out.println(lr.getServerUrl());
> System.out.println(lr.getSessionId());
>
> SessionHeader sh = new SessionHeader();
> sh.setSessionId(lr.getSessionId());
> stub = new SforceServiceStub(lr.getServerUrl().replace("https:", "http:"));
>
> Query q = new Query();
> q.setQueryString("select id, name, accountNumber from Account");
> QueryResult qr = stub.query(q, sh, null, null).getResult();
> System.out.println("Query return a total " + qr.getSize() + " rows");
>
> OMElement o = qr.getRecords()[0];
> Iterator i = o.getChildElements();
> while(i.hasNext()) {
> OMElement c = (OMElement)i.next();
> System.out.println(c.getLocalName() + " : " + c.getText());
> }
> The call to query fails because the generated SOAP message has soap:Body inside of the soap:Header element
> POST /services/Soap/u/7.0 HTTP/1.1
> User-Agent: Axis/2.0
> SOAPAction: ""
> Host: na1-api.salesforce.com
> Transfer-Encoding: chunked
> Content-Type: text/xml; charset=UTF-8
> 150
> <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header><soapenv:Body><ns1:query xmlns:ns1="urn:partner.soap.sforce.com"><ns1:queryString>select id, name, accountNumber from Account</ns1:queryString></ns1:query></soapenv:Body></soapenv:Header></soapenv:Envelope>
> 0
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira