You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by "Jairam, Roopnaraine" <Ro...@ca.com> on 2004/09/29 18:42:20 UTC

java client ok, c++ client exception 55

Hi:

 

I'm trying to get my c++ client to talk to my java webservice. When I
run the client I get an exception of type
AXISC_NODE_VALUE_MISMATCH_EXCEPTOIN = 55, when the call to checkMessgage
is made. 

 

I have include the tcpmon log using the java client which works and the
c++ client which is broken can anyone give me some pointers on somewhere
to look.

 

Thanks in advance.

 

 

RegistrationResults* LicenseSystem::registerLicense(LicenseRegistration*
Value0)

{

            RegistrationResults* pReturn = NULL;

            const char* pcCmplxFaultName;

            try

            {

                        if (AXIS_SUCCESS !=
m_pCall->initialize(CPP_RPC_PROVIDER, NORMAL_CHANNEL)) 

                                    return pReturn;

                        m_pCall->setTransportProperty(SOAPACTION_HEADER
, "");

                        m_pCall->setSOAPVersion(SOAP_VER_1_1);

                        m_pCall->setOperation("registerLicense",
"urn:ca");

                        applyUserPreferences();

            m_pCall->addCmplxParameter(Value0,
(void*)Axis_Serialize_LicenseRegistration,
(void*)Axis_Delete_LicenseRegistration, "in0",
Axis_URI_LicenseRegistration);

                        if (AXIS_SUCCESS == m_pCall->invoke())

                        {

                                    if(AXIS_SUCCESS ==
m_pCall->checkMessage("registerLicenseResponse", "urn:ca"))

                                    {

                                                pReturn =
(RegistrationResults*)m_pCall->getCmplxObject((void*)
Axis_DeSerialize_RegistrationResults, (void*)
Axis_Create_RegistrationResults, (void*)
Axis_Delete_RegistrationResults,"registerLicenseReturn", 0);

                        }

                        }

                        m_pCall->unInitialize();

                        return pReturn;

            }

            catch(AxisException& e)

            {

                        int iExceptionCode = e.getExceptionCode();

                        if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION !=
iExceptionCode)

                        {

                                    m_pCall->unInitialize();

                                    throw;

                        }

                        ISoapFault* pSoapFault = (ISoapFault*)
m_pCall->checkFault("Fault","http://fries/axis/services/LicenseSystem"
);

                        if(pSoapFault)

                        {

                                    m_pCall->unInitialize();

                                    throw
LicenseSystemService_AxisClientException(pSoapFault);

                        }

                        else throw;

            }

}

 

 

 

 

JAVA CLIENT

 

==============

Listen Port: 8080

Target Host: 127.0.0.1

Target Port: 80

==== Request ====

POST /axis/services/LicenseSystem HTTP/1.0

Content-Type: text/xml; charset=utf-8

Accept: application/soap+xml, application/dime, multipart/related,
text/*

User-Agent: Axis/1.1

Host: 127.0.0.1

Cache-Control: no-cache

Pragma: no-cache

SOAPAction: ""

Content-Length: 3059

 

<?xml version="1.0" encoding="UTF-8"?>

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

 <soapenv:Body>

  <ns1:registerLicense
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="urn:ca">

   <in0 href="#id0"/>

  </ns1:registerLicense>

  <multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:LicenseRegistration"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="urn:ca">

   <keyTblRec href="#id1"/>

   <productTblRec href="#id2"/>

   <clientTblRec href="#id3"/>

  </multiRef>

  <multiRef id="id1" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns3:KeyTableRecord" xmlns:ns3="http://objects.ca"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">

   <nodes xsi:type="xsd:int">0</nodes>

   <startDate xsi:type="xsd:date" xsi:nil="true"/>

   <vendorName xsi:type="xsd:string" xsi:nil="true"/>

   <clientID xsi:type="xsd:string" xsi:nil="true"/>

   <regDate xsi:type="xsd:date" xsi:nil="true"/>

   <componentCode xsi:type="xsd:string" xsi:nil="true"/>

   <oemKey xsi:type="xsd:string" xsi:nil="true"/>

   <expired xsi:type="xsd:boolean">false</expired>

   <key xsi:type="xsd:string">KWBQG-3DHVM-7XH24-KBB6C-C5JP3</key>

   <days xsi:type="xsd:int">0</days>

   <companyName xsi:type="xsd:string" xsi:nil="true"/>

  </multiRef>

  <multiRef id="id2" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns4:ProductTableRecord" xmlns:ns4="http://objects.ca"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">

   <productBuild xsi:type="xsd:int">0</productBuild>

   <nodeCount xsi:type="xsd:int">0</nodeCount>

   <os xsi:type="xsd:string" xsi:nil="true"/>

   <language xsi:type="xsd:string" xsi:nil="true"/>

   <clientID xsi:type="xsd:string" xsi:nil="true"/>

   <productVersion xsi:type="xsd:int">0</productVersion>

   <productName xsi:type="xsd:string" xsi:nil="true"/>

   <productCode xsi:type="xsd:string" xsi:nil="true"/>

  </multiRef>

  <multiRef id="id3" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns5:ClientTableRecord" xmlns:ns5="http://objects.ca"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">

   <state xsi:type="xsd:string" xsi:nil="true"/>

   <address2 xsi:type="xsd:string" xsi:nil="true"/>

   <address1 xsi:type="xsd:string" xsi:nil="true"/>

   <country xsi:type="xsd:string" xsi:nil="true"/>

   <vendorName xsi:type="xsd:string" xsi:nil="true"/>

   <vendorCode xsi:type="xsd:string" xsi:nil="true"/>

   <city xsi:type="xsd:string" xsi:nil="true"/>

   <clientID xsi:type="xsd:string" xsi:nil="true"/>

   <email xsi:type="xsd:string">jaivi01@ca.com</email>

   <zip2 xsi:type="xsd:string" xsi:nil="true"/>

   <zip1 xsi:type="xsd:string" xsi:nil="true"/>

   <companyName xsi:type="xsd:string" xsi:nil="true"/>

  </multiRef>

 </soapenv:Body>

</soapenv:Envelope>==== Response ====

HTTP/1.1 200 OK

Content-Type: text/xml;charset=utf-8

Date: Wed, 29 Sep 2004 16:09:03 GMT

Server: Apache-Coyote/1.1

Connection: close

 

<?xml version="1.0" encoding="UTF-8"?>

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

 <soapenv:Body>

  <ns1:registerLicenseResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="urn:ca">

   <registerLicenseReturn href="#id0"/>

  </ns1:registerLicenseResponse>

  <multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:RegistrationResults"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="urn:ca">

   <status xsi:type="xsd:int">1000</status>

   <key xsi:type="xsd:string">NEW-LICENSE-KEY-FROM-OEM</key>

   <days xsi:type="xsd:int">0</days>

   <clientID xsi:type="xsd:string">1001</clientID>

  </multiRef>

 </soapenv:Body>

</soapenv:Envelope>

==============

 

C++ CLIENT 

 

==============

Listen Port: 8080

Target Host: 127.0.0.1

Target Port: 80

==== Request ====

POST /axis/services/LicenseSystem HTTP/1.1

Host: 127.0.0.1

Content-Type: text/xml; charset=UTF-8

SOAPAction: ""

Content-Length: 1795

 

<?xml version='1.0' encoding='utf-8' ?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><ns
1:registerLicense xmlns:ns1="urn:ca"><LicenseRegistration
xsi:type="ns1:LicenseRegistration" xmlns:ns1="urn:ca"><KeyTableRecord
xsi:type="ns2:KeyTableRecord" xmlns:ns2="http://objects.ca"><nodes
xsi:type="xsd:int">0</nodes><startDate
xsi:type="xsd:date">1900-01-00Z</startDate><vendorName
xsi:nil="true"/><clientID xsi:nil="true"/><regDate
xsi:type="xsd:date">1900-01-00Z</regDate><componentCode
xsi:type="xsd:string">abc</componentCode><oemKey
xsi:nil="true"/><expired xsi:type="xsd:boolean">false</expired><key
xsi:type="xsd:string">KWBQG-3DHVM-7XH24-KBB6C-C5JP3</key><days
xsi:type="xsd:int">0</days><companyName
xsi:type="xsd:string">ca</companyName></KeyTableRecord><ProductTableReco
rd xsi:type="ns2:ProductTableRecord"
xmlns:ns2="http://objects.ca"><productBuild
xsi:type="xsd:int">0</productBuild><nodeCount
xsi:type="xsd:int">0</nodeCount><os xsi:nil="true"/><language
xsi:nil="true"/><clientID xsi:nil="true"/><productVersion
xsi:type="xsd:int">0</productVersion><productName
xsi:nil="true"/><productCode
xsi:nil="true"/></ProductTableRecord><ClientTableRecord
xsi:type="ns2:ClientTableRecord" xmlns:ns2="http://objects.ca"><state
xsi:nil="true"/><address2 xsi:nil="true"/><address1
xsi:nil="true"/><country xsi:nil="true"/><vendorName
xsi:nil="true"/><vendorCode xsi:nil="true"/><city
xsi:nil="true"/><clientID xsi:nil="true"/><email
xsi:type="xsd:string">jaivi01@ca.com</email><zip2 xsi:nil="true"/><zip1
xsi:nil="true"/><companyName
xsi:nil="true"/></ClientTableRecord></LicenseRegistration></ns1:register
License></SOAP-ENV:Body></SOAP-ENV:Envelope>==== Response ====

HTTP/1.1 500 Internal Server Error

Content-Type: text/xml;charset=utf-8

Transfer-Encoding: chunked

Date: Wed, 29 Sep 2004 15:56:12 GMT

Server: Apache-Coyote/1.1

Connection: close

 

1f2

<?xml version="1.0" encoding="UTF-8"?>

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

 <soapenv:Body>

  <soapenv:Fault>

   <faultcode>soapenv:Server.userException</faultcode>

   <faultstring>org.xml.sax.SAXException: Invalid element in
ca.webservice.LicenseRegistration - KeyTableRecord</faultstring>

   <detail/>

  </soapenv:Fault>

 </soapenv:Body>

</soapenv:Envelope>

0

 

==============

 

 

 


Re: java client ok, c++ client exception 55

Posted by John Hawkins <HA...@uk.ibm.com>.



the exception is because the message coming back is a fault and it should
not be. Therefore we correctly throw back the exception. The issue is what
is wrong with the message going to the server that it can't understand.

dev list - any ideas?


John Hawkins




                                                                           
             "Jairam,                                                      
             Roopnaraine"                                                  
             <Roopnaraine.Jair                                          To 
             am@ca.com>                <ax...@ws.apache.org>         
                                                                        cc 
             29/09/2004 17:42                                              
                                                                   Subject 
                                       java client ok, c++ client          
             Please respond to         exception 55                        
              "Apache AXIS C                                               
                User List"                                                 
                                                                           
                                                                           
                                                                           
                                                                           




Hi:

I’m trying to get my c++ client to talk to my java webservice. When I run
the client I get an exception of type AXISC_NODE_VALUE_MISMATCH_EXCEPTOIN =
55, when the call to checkMessgage is made.

I have include the tcpmon log using the java client which works and the c++
client which is broken can anyone give me some pointers on somewhere to
look.

Thanks in advance.




|--------------------------------------------------------------------------|
|RegistrationResults* LicenseSystem::registerLicense(LicenseRegistration*  |
|Value0)                                                                   |
|{                                                                         |
|            RegistrationResults* pReturn = NULL;                          |
|            const char* pcCmplxFaultName;                                 |
|            try                                                           |
|            {                                                             |
|                        if (AXIS_SUCCESS !=                               |
|m_pCall->initialize(CPP_RPC_PROVIDER, NORMAL_CHANNEL))                    |
|                                    return pReturn;                       |
|                        m_pCall->setTransportProperty(SOAPACTION_HEADER , |
|"");                                                                      |
|                        m_pCall->setSOAPVersion(SOAP_VER_1_1);            |
|                        m_pCall->setOperation("registerLicense",          |
|"urn:ca");                                                                |
|                        applyUserPreferences();                           |
|            m_pCall->addCmplxParameter(Value0,                            |
|(void*)Axis_Serialize_LicenseRegistration,                                |
|(void*)Axis_Delete_LicenseRegistration, "in0",                            |
|Axis_URI_LicenseRegistration);                                            |
|                        if (AXIS_SUCCESS == m_pCall->invoke())            |
|                        {                                                 |
|                                    if(AXIS_SUCCESS ==                    |
|m_pCall->checkMessage("registerLicenseResponse", "urn:ca"))               |
|                                    {                                     |
|                                                pReturn =                 |
|(RegistrationResults*)m_pCall->getCmplxObject((void*)                     |
|Axis_DeSerialize_RegistrationResults, (void*)                             |
|Axis_Create_RegistrationResults, (void*)                                  |
|Axis_Delete_RegistrationResults,"registerLicenseReturn", 0);              |
|                        }                                                 |
|                        }                                                 |
|                        m_pCall->unInitialize();                          |
|                        return pReturn;                                   |
|            }                                                             |
|            catch(AxisException& e)                                       |
|            {                                                             |
|                        int iExceptionCode = e.getExceptionCode();        |
|                        if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION !=         |
|iExceptionCode)                                                           |
|                        {                                                 |
|                                    m_pCall->unInitialize();              |
|                                    throw;                                |
|                        }                                                 |
|                        ISoapFault* pSoapFault = (ISoapFault*)            |
|m_pCall->checkFault("Fault","http://fries/axis/services/LicenseSystem" ); |
|                        if(pSoapFault)                                    |
|                        {                                                 |
|                                    m_pCall->unInitialize();              |
|                                    throw                                 |
|LicenseSystemService_AxisClientException(pSoapFault);                     |
|                        }                                                 |
|                        else throw;                                       |
|            }                                                             |
|}                                                                         |
|--------------------------------------------------------------------------|








|--------------------------------------------------------------------------|
|JAVA CLIENT                                                               |
|                                                                          |
|==============                                                            |
|Listen Port: 8080                                                         |
|Target Host: 127.0.0.1                                                    |
|Target Port: 80                                                           |
|==== Request ====                                                         |
|POST /axis/services/LicenseSystem HTTP/1.0                                |
|Content-Type: text/xml; charset=utf-8                                     |
|Accept: application/soap+xml, application/dime, multipart/related, text/* |
|User-Agent: Axis/1.1                                                      |
|Host: 127.0.0.1                                                           |
|Cache-Control: no-cache                                                   |
|Pragma: no-cache                                                          |
|SOAPAction: ""                                                            |
|Content-Length: 3059                                                      |
|                                                                          |
|<?xml version="1.0" encoding="UTF-8"?>                                    |
|<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/|
|" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="                |
|http://www.w3.org/2001/XMLSchema-instance">                               |
| <soapenv:Body>                                                           |
|  <ns1:registerLicense soapenv:encodingStyle="                            |
|http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:ca">            |
|   <in0 href="#id0"/>                                                     |
|  </ns1:registerLicense>                                                  |
|  <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="             |
|http://schemas.xmlsoap.org/soap/encoding/"                                |
|xsi:type="ns2:LicenseRegistration" xmlns:soapenc="                        |
|http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:ca">            |
|   <keyTblRec href="#id1"/>                                               |
|   <productTblRec href="#id2"/>                                           |
|   <clientTblRec href="#id3"/>                                            |
|  </multiRef>                                                             |
|  <multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="             |
|http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:KeyTableRecord"  |
|xmlns:ns3="http://objects.ca" xmlns:soapenc="                             |
|http://schemas.xmlsoap.org/soap/encoding/">                               |
|   <nodes xsi:type="xsd:int">0</nodes>                                    |
|   <startDate xsi:type="xsd:date" xsi:nil="true"/>                        |
|   <vendorName xsi:type="xsd:string" xsi:nil="true"/>                     |
|   <clientID xsi:type="xsd:string" xsi:nil="true"/>                       |
|   <regDate xsi:type="xsd:date" xsi:nil="true"/>                          |
|   <componentCode xsi:type="xsd:string" xsi:nil="true"/>                  |
|   <oemKey xsi:type="xsd:string" xsi:nil="true"/>                         |
|   <expired xsi:type="xsd:boolean">false</expired>                        |
|   <key xsi:type="xsd:string">KWBQG-3DHVM-7XH24-KBB6C-C5JP3</key>         |
|   <days xsi:type="xsd:int">0</days>                                      |
|   <companyName xsi:type="xsd:string" xsi:nil="true"/>                    |
|  </multiRef>                                                             |
|  <multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="             |
|http://schemas.xmlsoap.org/soap/encoding/"                                |
|xsi:type="ns4:ProductTableRecord" xmlns:ns4="http://objects.ca"           |
|xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">                |
|   <productBuild xsi:type="xsd:int">0</productBuild>                      |
|   <nodeCount xsi:type="xsd:int">0</nodeCount>                            |
|   <os xsi:type="xsd:string" xsi:nil="true"/>                             |
|   <language xsi:type="xsd:string" xsi:nil="true"/>                       |
|   <clientID xsi:type="xsd:string" xsi:nil="true"/>                       |
|   <productVersion xsi:type="xsd:int">0</productVersion>                  |
|   <productName xsi:type="xsd:string" xsi:nil="true"/>                    |
|   <productCode xsi:type="xsd:string" xsi:nil="true"/>                    |
|  </multiRef>                                                             |
|  <multiRef id="id3" soapenc:root="0" soapenv:encodingStyle="             |
|http://schemas.xmlsoap.org/soap/encoding/"                                |
|xsi:type="ns5:ClientTableRecord" xmlns:ns5="http://objects.ca"            |
|xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">                |
|   <state xsi:type="xsd:string" xsi:nil="true"/>                          |
|   <address2 xsi:type="xsd:string" xsi:nil="true"/>                       |
|   <address1 xsi:type="xsd:string" xsi:nil="true"/>                       |
|   <country xsi:type="xsd:string" xsi:nil="true"/>                        |
|   <vendorName xsi:type="xsd:string" xsi:nil="true"/>                     |
|   <vendorCode xsi:type="xsd:string" xsi:nil="true"/>                     |
|   <city xsi:type="xsd:string" xsi:nil="true"/>                           |
|   <clientID xsi:type="xsd:string" xsi:nil="true"/>                       |
|   <email xsi:type="xsd:string">jaivi01@ca.com</email>                    |
|   <zip2 xsi:type="xsd:string" xsi:nil="true"/>                           |
|   <zip1 xsi:type="xsd:string" xsi:nil="true"/>                           |
|   <companyName xsi:type="xsd:string" xsi:nil="true"/>                    |
|  </multiRef>                                                             |
| </soapenv:Body>                                                          |
|</soapenv:Envelope>==== Response ====                                     |
|HTTP/1.1 200 OK                                                           |
|Content-Type: text/xml;charset=utf-8                                      |
|Date: Wed, 29 Sep 2004 16:09:03 GMT                                       |
|Server: Apache-Coyote/1.1                                                 |
|Connection: close                                                         |
|                                                                          |
|<?xml version="1.0" encoding="UTF-8"?>                                    |
|<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/|
|" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="                |
|http://www.w3.org/2001/XMLSchema-instance">                               |
| <soapenv:Body>                                                           |
|  <ns1:registerLicenseResponse soapenv:encodingStyle="                    |
|http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:ca">            |
|   <registerLicenseReturn href="#id0"/>                                   |
|  </ns1:registerLicenseResponse>                                          |
|  <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="             |
|http://schemas.xmlsoap.org/soap/encoding/"                                |
|xsi:type="ns2:RegistrationResults" xmlns:soapenc="                        |
|http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:ca">            |
|   <status xsi:type="xsd:int">1000</status>                               |
|   <key xsi:type="xsd:string">NEW-LICENSE-KEY-FROM-OEM</key>              |
|   <days xsi:type="xsd:int">0</days>                                      |
|   <clientID xsi:type="xsd:string">1001</clientID>                        |
|  </multiRef>                                                             |
| </soapenv:Body>                                                          |
|</soapenv:Envelope>                                                       |
|==============                                                            |
|                                                                          |
|--------------------------------------------------------------------------|
|C++ CLIENT                                                                |
|                                                                          |
|==============                                                            |
|Listen Port: 8080                                                         |
|Target Host: 127.0.0.1                                                    |
|Target Port: 80                                                           |
|==== Request ====                                                         |
|POST /axis/services/LicenseSystem HTTP/1.1                                |
|Host: 127.0.0.1                                                           |
|Content-Type: text/xml; charset=UTF-8                                     |
|SOAPAction: ""                                                            |
|Content-Length: 1795                                                      |
|                                                                          |
|<?xml version='1.0' encoding='utf-8' ?><SOAP-ENV:Envelope xmlns:SOAP-ENV="|
|http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="                    |
|http://www.w3.org/2001/XMLSchema" xmlns:xsi="                             |
|http://www.w3.org/2001/XMLSchema-instance                                 |
|"><SOAP-ENV:Body><ns1:registerLicense                                     |
|xmlns:ns1="urn:ca"><LicenseRegistration xsi:type="ns1:LicenseRegistration"|
|xmlns:ns1="urn:ca"><KeyTableRecord xsi:type="ns2:KeyTableRecord"          |
|xmlns:ns2="http://objects.ca"><nodes                                      |
|xsi:type="xsd:int">0</nodes><startDate                                    |
|xsi:type="xsd:date">1900-01-00Z</startDate><vendorName                    |
|xsi:nil="true"/><clientID xsi:nil="true"/><regDate                        |
|xsi:type="xsd:date">1900-01-00Z</regDate><componentCode                   |
|xsi:type="xsd:string">abc</componentCode><oemKey xsi:nil="true"/><expired |
|xsi:type="xsd:boolean">false</expired><key                                |
|xsi:type="xsd:string">KWBQG-3DHVM-7XH24-KBB6C-C5JP3</key><days            |
|xsi:type="xsd:int">0</days><companyName                                   |
|xsi:type="xsd:string">ca</companyName></KeyTableRecord><ProductTableRecord|
|xsi:type="ns2:ProductTableRecord" xmlns:ns2="http://objects.ca            |
|"><productBuild xsi:type="xsd:int">0</productBuild><nodeCount             |
|xsi:type="xsd:int">0</nodeCount><os xsi:nil="true"/><language             |
|xsi:nil="true"/><clientID xsi:nil="true"/><productVersion                 |
|xsi:type="xsd:int">0</productVersion><productName                         |
|xsi:nil="true"/><productCode                                              |
|xsi:nil="true"/></ProductTableRecord><ClientTableRecord                   |
|xsi:type="ns2:ClientTableRecord" xmlns:ns2="http://objects.ca"><state     |
|xsi:nil="true"/><address2 xsi:nil="true"/><address1                       |
|xsi:nil="true"/><country xsi:nil="true"/><vendorName                      |
|xsi:nil="true"/><vendorCode xsi:nil="true"/><city                         |
|xsi:nil="true"/><clientID xsi:nil="true"/><email                          |
|xsi:type="xsd:string">jaivi01@ca.com</email><zip2 xsi:nil="true"/><zip1   |
|xsi:nil="true"/><companyName                                              |
|xsi:nil="true"/></ClientTableRecord></LicenseRegistration></ns1:registerLi|
|cense></SOAP-ENV:Body></SOAP-ENV:Envelope>==== Response ====              |
|HTTP/1.1 500 Internal Server Error                                        |
|Content-Type: text/xml;charset=utf-8                                      |
|Transfer-Encoding: chunked                                                |
|Date: Wed, 29 Sep 2004 15:56:12 GMT                                       |
|Server: Apache-Coyote/1.1                                                 |
|Connection: close                                                         |
|                                                                          |
|1f2                                                                       |
|<?xml version="1.0" encoding="UTF-8"?>                                    |
|<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/|
|" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="                |
|http://www.w3.org/2001/XMLSchema-instance">                               |
| <soapenv:Body>                                                           |
|  <soapenv:Fault>                                                         |
|   <faultcode>soapenv:Server.userException</faultcode>                    |
|   <faultstring>org.xml.sax.SAXException: Invalid element in              |
|ca.webservice.LicenseRegistration - KeyTableRecord</faultstring>          |
|   <detail/>                                                              |
|  </soapenv:Fault>                                                        |
| </soapenv:Body>                                                          |
|</soapenv:Envelope>                                                       |
|0                                                                         |
|                                                                          |
|==============                                                            |
|                                                                          |
|                                                                          |
|--------------------------------------------------------------------------|



Re: java client ok, c++ client exception 55

Posted by John Hawkins <HA...@uk.ibm.com>.



the exception is because the message coming back is a fault and it should
not be. Therefore we correctly throw back the exception. The issue is what
is wrong with the message going to the server that it can't understand.

dev list - any ideas?


John Hawkins




                                                                           
             "Jairam,                                                      
             Roopnaraine"                                                  
             <Roopnaraine.Jair                                          To 
             am@ca.com>                <ax...@ws.apache.org>         
                                                                        cc 
             29/09/2004 17:42                                              
                                                                   Subject 
                                       java client ok, c++ client          
             Please respond to         exception 55                        
              "Apache AXIS C                                               
                User List"                                                 
                                                                           
                                                                           
                                                                           
                                                                           




Hi:

I’m trying to get my c++ client to talk to my java webservice. When I run
the client I get an exception of type AXISC_NODE_VALUE_MISMATCH_EXCEPTOIN =
55, when the call to checkMessgage is made.

I have include the tcpmon log using the java client which works and the c++
client which is broken can anyone give me some pointers on somewhere to
look.

Thanks in advance.




|--------------------------------------------------------------------------|
|RegistrationResults* LicenseSystem::registerLicense(LicenseRegistration*  |
|Value0)                                                                   |
|{                                                                         |
|            RegistrationResults* pReturn = NULL;                          |
|            const char* pcCmplxFaultName;                                 |
|            try                                                           |
|            {                                                             |
|                        if (AXIS_SUCCESS !=                               |
|m_pCall->initialize(CPP_RPC_PROVIDER, NORMAL_CHANNEL))                    |
|                                    return pReturn;                       |
|                        m_pCall->setTransportProperty(SOAPACTION_HEADER , |
|"");                                                                      |
|                        m_pCall->setSOAPVersion(SOAP_VER_1_1);            |
|                        m_pCall->setOperation("registerLicense",          |
|"urn:ca");                                                                |
|                        applyUserPreferences();                           |
|            m_pCall->addCmplxParameter(Value0,                            |
|(void*)Axis_Serialize_LicenseRegistration,                                |
|(void*)Axis_Delete_LicenseRegistration, "in0",                            |
|Axis_URI_LicenseRegistration);                                            |
|                        if (AXIS_SUCCESS == m_pCall->invoke())            |
|                        {                                                 |
|                                    if(AXIS_SUCCESS ==                    |
|m_pCall->checkMessage("registerLicenseResponse", "urn:ca"))               |
|                                    {                                     |
|                                                pReturn =                 |
|(RegistrationResults*)m_pCall->getCmplxObject((void*)                     |
|Axis_DeSerialize_RegistrationResults, (void*)                             |
|Axis_Create_RegistrationResults, (void*)                                  |
|Axis_Delete_RegistrationResults,"registerLicenseReturn", 0);              |
|                        }                                                 |
|                        }                                                 |
|                        m_pCall->unInitialize();                          |
|                        return pReturn;                                   |
|            }                                                             |
|            catch(AxisException& e)                                       |
|            {                                                             |
|                        int iExceptionCode = e.getExceptionCode();        |
|                        if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION !=         |
|iExceptionCode)                                                           |
|                        {                                                 |
|                                    m_pCall->unInitialize();              |
|                                    throw;                                |
|                        }                                                 |
|                        ISoapFault* pSoapFault = (ISoapFault*)            |
|m_pCall->checkFault("Fault","http://fries/axis/services/LicenseSystem" ); |
|                        if(pSoapFault)                                    |
|                        {                                                 |
|                                    m_pCall->unInitialize();              |
|                                    throw                                 |
|LicenseSystemService_AxisClientException(pSoapFault);                     |
|                        }                                                 |
|                        else throw;                                       |
|            }                                                             |
|}                                                                         |
|--------------------------------------------------------------------------|








|--------------------------------------------------------------------------|
|JAVA CLIENT                                                               |
|                                                                          |
|==============                                                            |
|Listen Port: 8080                                                         |
|Target Host: 127.0.0.1                                                    |
|Target Port: 80                                                           |
|==== Request ====                                                         |
|POST /axis/services/LicenseSystem HTTP/1.0                                |
|Content-Type: text/xml; charset=utf-8                                     |
|Accept: application/soap+xml, application/dime, multipart/related, text/* |
|User-Agent: Axis/1.1                                                      |
|Host: 127.0.0.1                                                           |
|Cache-Control: no-cache                                                   |
|Pragma: no-cache                                                          |
|SOAPAction: ""                                                            |
|Content-Length: 3059                                                      |
|                                                                          |
|<?xml version="1.0" encoding="UTF-8"?>                                    |
|<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/|
|" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="                |
|http://www.w3.org/2001/XMLSchema-instance">                               |
| <soapenv:Body>                                                           |
|  <ns1:registerLicense soapenv:encodingStyle="                            |
|http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:ca">            |
|   <in0 href="#id0"/>                                                     |
|  </ns1:registerLicense>                                                  |
|  <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="             |
|http://schemas.xmlsoap.org/soap/encoding/"                                |
|xsi:type="ns2:LicenseRegistration" xmlns:soapenc="                        |
|http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:ca">            |
|   <keyTblRec href="#id1"/>                                               |
|   <productTblRec href="#id2"/>                                           |
|   <clientTblRec href="#id3"/>                                            |
|  </multiRef>                                                             |
|  <multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="             |
|http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:KeyTableRecord"  |
|xmlns:ns3="http://objects.ca" xmlns:soapenc="                             |
|http://schemas.xmlsoap.org/soap/encoding/">                               |
|   <nodes xsi:type="xsd:int">0</nodes>                                    |
|   <startDate xsi:type="xsd:date" xsi:nil="true"/>                        |
|   <vendorName xsi:type="xsd:string" xsi:nil="true"/>                     |
|   <clientID xsi:type="xsd:string" xsi:nil="true"/>                       |
|   <regDate xsi:type="xsd:date" xsi:nil="true"/>                          |
|   <componentCode xsi:type="xsd:string" xsi:nil="true"/>                  |
|   <oemKey xsi:type="xsd:string" xsi:nil="true"/>                         |
|   <expired xsi:type="xsd:boolean">false</expired>                        |
|   <key xsi:type="xsd:string">KWBQG-3DHVM-7XH24-KBB6C-C5JP3</key>         |
|   <days xsi:type="xsd:int">0</days>                                      |
|   <companyName xsi:type="xsd:string" xsi:nil="true"/>                    |
|  </multiRef>                                                             |
|  <multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="             |
|http://schemas.xmlsoap.org/soap/encoding/"                                |
|xsi:type="ns4:ProductTableRecord" xmlns:ns4="http://objects.ca"           |
|xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">                |
|   <productBuild xsi:type="xsd:int">0</productBuild>                      |
|   <nodeCount xsi:type="xsd:int">0</nodeCount>                            |
|   <os xsi:type="xsd:string" xsi:nil="true"/>                             |
|   <language xsi:type="xsd:string" xsi:nil="true"/>                       |
|   <clientID xsi:type="xsd:string" xsi:nil="true"/>                       |
|   <productVersion xsi:type="xsd:int">0</productVersion>                  |
|   <productName xsi:type="xsd:string" xsi:nil="true"/>                    |
|   <productCode xsi:type="xsd:string" xsi:nil="true"/>                    |
|  </multiRef>                                                             |
|  <multiRef id="id3" soapenc:root="0" soapenv:encodingStyle="             |
|http://schemas.xmlsoap.org/soap/encoding/"                                |
|xsi:type="ns5:ClientTableRecord" xmlns:ns5="http://objects.ca"            |
|xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">                |
|   <state xsi:type="xsd:string" xsi:nil="true"/>                          |
|   <address2 xsi:type="xsd:string" xsi:nil="true"/>                       |
|   <address1 xsi:type="xsd:string" xsi:nil="true"/>                       |
|   <country xsi:type="xsd:string" xsi:nil="true"/>                        |
|   <vendorName xsi:type="xsd:string" xsi:nil="true"/>                     |
|   <vendorCode xsi:type="xsd:string" xsi:nil="true"/>                     |
|   <city xsi:type="xsd:string" xsi:nil="true"/>                           |
|   <clientID xsi:type="xsd:string" xsi:nil="true"/>                       |
|   <email xsi:type="xsd:string">jaivi01@ca.com</email>                    |
|   <zip2 xsi:type="xsd:string" xsi:nil="true"/>                           |
|   <zip1 xsi:type="xsd:string" xsi:nil="true"/>                           |
|   <companyName xsi:type="xsd:string" xsi:nil="true"/>                    |
|  </multiRef>                                                             |
| </soapenv:Body>                                                          |
|</soapenv:Envelope>==== Response ====                                     |
|HTTP/1.1 200 OK                                                           |
|Content-Type: text/xml;charset=utf-8                                      |
|Date: Wed, 29 Sep 2004 16:09:03 GMT                                       |
|Server: Apache-Coyote/1.1                                                 |
|Connection: close                                                         |
|                                                                          |
|<?xml version="1.0" encoding="UTF-8"?>                                    |
|<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/|
|" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="                |
|http://www.w3.org/2001/XMLSchema-instance">                               |
| <soapenv:Body>                                                           |
|  <ns1:registerLicenseResponse soapenv:encodingStyle="                    |
|http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:ca">            |
|   <registerLicenseReturn href="#id0"/>                                   |
|  </ns1:registerLicenseResponse>                                          |
|  <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="             |
|http://schemas.xmlsoap.org/soap/encoding/"                                |
|xsi:type="ns2:RegistrationResults" xmlns:soapenc="                        |
|http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:ca">            |
|   <status xsi:type="xsd:int">1000</status>                               |
|   <key xsi:type="xsd:string">NEW-LICENSE-KEY-FROM-OEM</key>              |
|   <days xsi:type="xsd:int">0</days>                                      |
|   <clientID xsi:type="xsd:string">1001</clientID>                        |
|  </multiRef>                                                             |
| </soapenv:Body>                                                          |
|</soapenv:Envelope>                                                       |
|==============                                                            |
|                                                                          |
|--------------------------------------------------------------------------|
|C++ CLIENT                                                                |
|                                                                          |
|==============                                                            |
|Listen Port: 8080                                                         |
|Target Host: 127.0.0.1                                                    |
|Target Port: 80                                                           |
|==== Request ====                                                         |
|POST /axis/services/LicenseSystem HTTP/1.1                                |
|Host: 127.0.0.1                                                           |
|Content-Type: text/xml; charset=UTF-8                                     |
|SOAPAction: ""                                                            |
|Content-Length: 1795                                                      |
|                                                                          |
|<?xml version='1.0' encoding='utf-8' ?><SOAP-ENV:Envelope xmlns:SOAP-ENV="|
|http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="                    |
|http://www.w3.org/2001/XMLSchema" xmlns:xsi="                             |
|http://www.w3.org/2001/XMLSchema-instance                                 |
|"><SOAP-ENV:Body><ns1:registerLicense                                     |
|xmlns:ns1="urn:ca"><LicenseRegistration xsi:type="ns1:LicenseRegistration"|
|xmlns:ns1="urn:ca"><KeyTableRecord xsi:type="ns2:KeyTableRecord"          |
|xmlns:ns2="http://objects.ca"><nodes                                      |
|xsi:type="xsd:int">0</nodes><startDate                                    |
|xsi:type="xsd:date">1900-01-00Z</startDate><vendorName                    |
|xsi:nil="true"/><clientID xsi:nil="true"/><regDate                        |
|xsi:type="xsd:date">1900-01-00Z</regDate><componentCode                   |
|xsi:type="xsd:string">abc</componentCode><oemKey xsi:nil="true"/><expired |
|xsi:type="xsd:boolean">false</expired><key                                |
|xsi:type="xsd:string">KWBQG-3DHVM-7XH24-KBB6C-C5JP3</key><days            |
|xsi:type="xsd:int">0</days><companyName                                   |
|xsi:type="xsd:string">ca</companyName></KeyTableRecord><ProductTableRecord|
|xsi:type="ns2:ProductTableRecord" xmlns:ns2="http://objects.ca            |
|"><productBuild xsi:type="xsd:int">0</productBuild><nodeCount             |
|xsi:type="xsd:int">0</nodeCount><os xsi:nil="true"/><language             |
|xsi:nil="true"/><clientID xsi:nil="true"/><productVersion                 |
|xsi:type="xsd:int">0</productVersion><productName                         |
|xsi:nil="true"/><productCode                                              |
|xsi:nil="true"/></ProductTableRecord><ClientTableRecord                   |
|xsi:type="ns2:ClientTableRecord" xmlns:ns2="http://objects.ca"><state     |
|xsi:nil="true"/><address2 xsi:nil="true"/><address1                       |
|xsi:nil="true"/><country xsi:nil="true"/><vendorName                      |
|xsi:nil="true"/><vendorCode xsi:nil="true"/><city                         |
|xsi:nil="true"/><clientID xsi:nil="true"/><email                          |
|xsi:type="xsd:string">jaivi01@ca.com</email><zip2 xsi:nil="true"/><zip1   |
|xsi:nil="true"/><companyName                                              |
|xsi:nil="true"/></ClientTableRecord></LicenseRegistration></ns1:registerLi|
|cense></SOAP-ENV:Body></SOAP-ENV:Envelope>==== Response ====              |
|HTTP/1.1 500 Internal Server Error                                        |
|Content-Type: text/xml;charset=utf-8                                      |
|Transfer-Encoding: chunked                                                |
|Date: Wed, 29 Sep 2004 15:56:12 GMT                                       |
|Server: Apache-Coyote/1.1                                                 |
|Connection: close                                                         |
|                                                                          |
|1f2                                                                       |
|<?xml version="1.0" encoding="UTF-8"?>                                    |
|<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/|
|" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="                |
|http://www.w3.org/2001/XMLSchema-instance">                               |
| <soapenv:Body>                                                           |
|  <soapenv:Fault>                                                         |
|   <faultcode>soapenv:Server.userException</faultcode>                    |
|   <faultstring>org.xml.sax.SAXException: Invalid element in              |
|ca.webservice.LicenseRegistration - KeyTableRecord</faultstring>          |
|   <detail/>                                                              |
|  </soapenv:Fault>                                                        |
| </soapenv:Body>                                                          |
|</soapenv:Envelope>                                                       |
|0                                                                         |
|                                                                          |
|==============                                                            |
|                                                                          |
|                                                                          |
|--------------------------------------------------------------------------|