Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   SOAP issue in c++ server (http://www.go4expert.com/forums/soap-issue-cpp-server-t21685/)

punith 6Apr2010 18:32

SOAP issue in c++ server
 
Hi All,

We have a server in c++ that accepts request from various clients and in turn connects to different kind of servers like LDAP, SOAP etc . Our problem is not in c++ but in SOAP. I could not find a separate section for SOAP so I am posting my query here.I am still investigating this but any small lead can greatly help me.

Currently my gsoap utility is generating the request xml as below

Code: xml

POST /hpnp_lqs/apiqueryservice?wsdl HTTP/1.1
Host: 0.0.0.0:8080
User-Agent: gSOAP/2.7
Content-Type: text/xml; charset=utf-8
Content-Length: 607
Connection: close
SOAPAction: "api.query/QueryRequest"
<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns2="urn:api:query" xmlns:ns1="api.query">


<SOAPENV:Body>

<ns1:QueryRequest>
<ns2:APIQuery>
<request_id>141</request_id>
<username>xxxx</username>
<password>yyyy</password>
<MDN>1234567890</MDN>
<originator_system_name>operator</originator_system_name>
</ns2:APIQuery>
</ns1:QueryRequest>

</SOAP-ENV:Body>



But the the intended output is some thing like this.

Code: xml

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns2="urn:api:query" xmlns:ns1="api.query">

<SOAP-ENV:Body>
<ns1:QueryRequest>
    <ns2:APIQuery>
          <ns2:request_id>141</ns2:request_id>
          <ns2:username>xxxx</ns2:username>
          <ns2:password>yyyy</ns2:password>
          <ns2:MDN>1234567890</ns2:MDN>
          <ns2:originator_system_name>operator</ns2:originator_system_name>
     </ns2:APIQuery>
</ns1:QueryRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


Can some one point where I am going wrong I want to get this "ns2" for all attributes.:nonod:

Code: xml

ns1:QueryRequest>
    <ns2:APIQuery>
          <ns2:request_id>141</ns2:request_id>
          <ns2:username>xxxx</ns2:username>
          <ns2:password>yyyy</ns2:password>
          <ns2:MDN>1234567890</ns2:MDN>
          <ns2:originator_system_name>operator</ns2:originator_system_name>
     </ns2:APIQuery>


Thanking you all in advance any small lead can greatly help me.

punith 7Apr2010 17:44

Re: SOAP issue in c++ server
 
Hi All,

I found the solution. The header file generated has the ns2 as unqalified and when changed to qualified it generated the required tags.


All times are GMT +5.5. The time now is 08:43.