axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jairam, Roopnaraine" <Roopnaraine.Jai...@ca.com>
Subject RE: java client ok, c++ client exception 55
Date Thu, 30 Sep 2004 19:49:51 GMT
Ok I changed the KeyTableRecord type in the wsdl on the server to just
contain one elment:

   <complexType name="KeyTableRecord">

    <sequence>

     <element name="clientID" nillable="true" type="xsd:string"/>

    </sequence>

   </complexType>

 

And when I rebuilt the server and client I still get same error 

 

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

 

 

Does anybody know what the problem, this is getting frustrating. The
client code is below

 

                        LicenseSystem licSys;

                        LicenseRegistration licReg;

 

                        ClientTableRecord cTR;

                        ProductTableRecord pTR;

                        KeyTableRecord kTR;

                        memset(&cTR,0,sizeof(ClientTableRecord));

                        memset(&pTR,0,sizeof(ProductTableRecord));

                        memset(&kTR,0,sizeof(KeyTableRecord));

 

 

                        kTR.clientID = "123";

        

                        cTR.address1 = "123132";

                        cTR.address2 = "";

                        cTR.city = "new york";

                        cTR.clientID = "";

                        cTR.companyName = "cab";

                        cTR.country = "usa";

                        cTR.email = "jaivi01@ca.com";

                        cTR.state = "NY";

                        cTR.vendorCode = "unknown";

                        cTR.vendorName = "ca";

                        cTR.zip1 = "12311";

                        cTR.zip2 = "";

 

                        pTR.clientID = "";

                        pTR.language = "english";

                        pTR.nodeCount = 1;

                        pTR.os = "winxp";

                        pTR.productBuild = 900;

                        pTR.productCode = "abc";

                        pTR.productName = "eav";

                        pTR.productVersion = 8;

 

                        licReg.keyTblRec = &kTR;

                        licReg.clientTblRec = &cTR;

                        licReg.productTblRec = &pTR;

 

                        licSys.registerLicense(&licReg);

            }

            catch(AxisException& e)

            {

                        printf("Exception : %s\n", e.what());

            }

            catch(exception& e)

            {

                        printf("Unknown exception has occured\n" );

            }

            catch(...)

            {

                        printf("Unknown exception has occured\n" );

            }

            return 0;

 

 

  _____  

From: Jairam, Roopnaraine 
Sent: Thursday, September 30, 2004 12:38 PM
To: Apache AXIS C User List; axis-c-dev@ws.apache.org
Subject: RE: java client ok, c++ client exception 55

 

Thanks John:

 

I was looking at the soap fault string and it stated
<faultstring>org.xml.sax.SAXException: Invalid element in
ca.webservice.LicenseRegistration - KeyTableRecord</faultstring>

 

The received keytable record was 

 

<KeyTableRecord xsi:type="ns2:KeyTableRecord"
xmlns:ns2="http://objects.ca">

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

                  <startDate xsi:type="xsd:date">2004-09-30Z</startDate>

                  <vendorName xsi:type="xsd:string">ca</vendorName>

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

                  <regDate xsi:type="xsd:date">2004-09-30Z</regDate>

                  <componentCode
xsi:type="xsd:string">12312</componentCode>

                  <oemKey xsi:type="xsd:string">abc</oemKey>

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

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

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

                  <companyName xsi:type="xsd:string">ca</companyName>

               </KeyTableRecord>

 

The only thing wrong that I saw was that the startDate and the regDate
had Z at the end. I don't think its supposed to be there. Is this a bug?

 

Vince.

 

 

-----Original Message-----
From: John Hawkins [mailto:HAWKINSJ@uk.ibm.com] 
Sent: Thursday, September 30, 2004 7:36 AM
To: Apache AXIS C User List; axis-c-dev@ws.apache.org
Subject: Re: java client ok, c++ client exception 55

 

 

 

 

 

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>                <axis-c-user@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><ProductTableRec
ord|

|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:registe
rLi|

|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
|

|
|

|==============
|

|
|

|
|

|-----------------------------------------------------------------------
---|

 

 


Mime
View raw message