axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergej Srepfler <ser...@jware.hr>
Subject SOAPHeader and c++ client help needed
Date Thu, 08 Jul 2004 14:45:16 GMT
I am totally lost here.

I did find an example how to set an SOAPHeader from C++ client.
   /*create a header of the form:
       <SOAP-ENV:Header>
       <th:newName xmlns:th="http://ws.apache.org/axisCppTest/">
       <TestAuthHeader>
       <username>Test User</username>
       <password>Test Password</password>
       </TestAuthHeader>
       </th:newName>
       </SOAP-ENV:Header>
     */


    //set SOAP headers
    IHeaderBlock *phb = ws.createSOAPHeaderBlock("TestHeader",
                "http://ws.apache.org/axisCppTest/");

    //create parent node
    BasicNode *parentNode = phb->createChild(ELEMENT_NODE);
    parentNode->setLocalName("Credentials");
    //create child node     
    BasicNode *childNode = phb->createChild(ELEMENT_NODE);
    childNode->setLocalName("username");
    //create char node for value
    BasicNode *valueNode = phb->createChild(CHARACTER_NODE);
    valueNode->setValue("Test User");
    //buld node tree
    childNode->addChild(valueNode);
    parentNode->addChild(childNode);

   //add another node set
    childNode = phb->createChild(ELEMENT_NODE);
    childNode->setLocalName("password");

    valueNode = phb->createChild(CHARACTER_NODE);
    valueNode->setValue("Test Password");

    childNode->addChild(valueNode);
    parentNode->addChild(childNode);

    phb->addChild(parentNode);

    and after that, I can call service.
    But - how do I read these fields? How to find out how the service
    changed these fields?


Mime
View raw message