Return-Path: Delivered-To: apmail-ws-axis-c-user-archive@www.apache.org Received: (qmail 96449 invoked from network); 5 Aug 2005 07:37:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Aug 2005 07:37:54 -0000 Received: (qmail 17110 invoked by uid 500); 5 Aug 2005 07:37:54 -0000 Delivered-To: apmail-ws-axis-c-user-archive@ws.apache.org Received: (qmail 16929 invoked by uid 500); 5 Aug 2005 07:37:53 -0000 Mailing-List: contact axis-c-user-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C User List" Reply-To: "Apache AXIS C User List" Delivered-To: mailing list axis-c-user@ws.apache.org Received: (qmail 16912 invoked by uid 99); 5 Aug 2005 07:37:53 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Aug 2005 00:37:53 -0700 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=HTML_MESSAGE,HTML_TEXT_AFTER_BODY,HTML_TEXT_AFTER_HTML X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [12.40.51.197] (HELO mailhost.virtusa.com) (12.40.51.197) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Aug 2005 00:37:43 -0700 Received: from cs-mailsvr.Virtusa.com ([10.2.1.11]unverified) by mailhost.virtusa.com with InterScan Messaging Security Suite; Fri, 05 Aug 2005 03:35:53 -0400 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C59990.BB9F1012" X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Subject: RE: Problem deserializing SOAP response in Axis C++ client Date: Fri, 5 Aug 2005 13:37:42 +0600 Message-ID: <403DD48EAE182940B89ECEAFE03F96900656F792@cs-mailsvr.Virtusa.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Problem deserializing SOAP response in Axis C++ client Thread-Index: AcWZdWIp2S0y7DliRb+aHDnQ/VcLvAABaCvw From: "Dushshantha Chandradasa" To: "Apache AXIS C User List" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------_=_NextPart_001_01C59990.BB9F1012 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Linesh, =20 It would be better if you can attach the wsdl file you are using for that then I can generate the client and test with MockServer.=20 And you can use MockServer for Client side testing. Please refer to ..\ws-axis\c\tests\auto_build\UnitTest_Readme.txt for more information. =20 Thanks, Dushshantha ________________________________ From: linesh.mahadik@wipro.com [mailto:linesh.mahadik@wipro.com]=20 Sent: Friday, August 05, 2005 10:23 AM To: axis-c-user@ws.apache.org Subject: Problem deserializing SOAP response in Axis C++ client =20 Hi, =20 I am trying to communicate with a J2EE webservice running on Bea Weblogic webserver 8.1 SP3. The client side has Axis C++. I am getting error while reading the SOAP response sent by the webservice. The exception occurs on calling getElementAsString function (after checkMessage return successful, line 3105: at m_pNode =3D = m_pParser->next ()).=20 =20 The code is exactly similar to the one provided with C++ samples.=20 if (AXIS_SUCCESS !=3D m_pCall->initialize(CPP_RPC_PROVIDER))=20 return *Ret; if (NULL=3D=3Dm_pCall->getTransportProperty("SOAPAction",false)) { m_pCall->setTransportProperty(SOAPACTION_HEADER , "ProductLookupService#lookupProduct"); } m_pCall->setSOAPVersion(SOAP_VER_1_1); =20 setUsername("user"); setPassword("password"); =20 m_pCall->setOperation("lookupProduct", "http://localhost/distribution/webservices "); =20 applyUserPreferences(); m_pCall->addParameter((void*)lpParam, "xmlRequest", XSD_STRING); =20 if (AXIS_SUCCESS =3D=3D m_pCall->invoke()) {=20 =20 if(AXIS_SUCCESS=3D=3Dm_pCall->checkMessage("lookupProductResponse", "http://www.cardinal.com/distribution/webservices ")) { char sTemp[1024]=3D""; sprintf(sTemp, m_pCall->getElementAsString("result", 0)); //**** EXCEPTION THROWN HERE*** } =20 The response received is as below (Trapped using Mindreef SOAPScope). =20 Request sent (It sends an XML string in parameter "xmlRequest") -=20 " xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema " xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance "> "> <= P roductLookupRequestHeader>AB1234CDEF1A3IVR1N DC_UPC475744111EA =20 Rsposne received (Output parameter name is "result")-=20 xmlns:env=3D"http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc=3D"http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema"> xmlns:n1=3D"http://www.cardinal.com/distribution/webservices"> TEST Thanks in advance, Linesh Mahadik Confidentiality Notice=20 The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately and destroy all copies of this message and any attachments. =09 ------_=_NextPart_001_01C59990.BB9F1012 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi = Linesh,

 

It would be better if you can = attach the wsdl file you are using for that then I can generate the client and test = with MockServer.

And you can use MockServer for = Client side testing. Please refer to = ..\ws-axis\c\tests\auto_build\UnitTest_Readme.txt for more information.

 

Thanks,

=

Dushshantha=


From: linesh.mahadik@wipro.com [mailto:linesh.mahadik@wipro.com]
Sent: Friday, August 05, = 2005 10:23 AM
To: = axis-c-user@ws.apache.org
Subject: Problem = deserializing SOAP response in Axis C++ client

 

Hi,

 

I am trying to communicate with a J2EE webservice = running on Bea Weblogic webserver 8.1 SP3. The client side has Axis C++. I am = getting error while reading the SOAP response sent by the webservice. The exception occurs on calling getElementAsString = function (after checkMessage return successful, line 3105: = at m_pNode =3D m_pParser->next ()). =

 

The code is exactly similar to the one provided with = C++ samples.

 if (AXIS_SUCCESS !=3D m_pCall->initialize(CPP_RPC_PROVIDER))
   return *Ret;

 if (NULL=3D=3Dm_pCall->getTransportProperty("SOAPAction",false)= )
 {
  m_pCall->setTransportProperty(SOAPACTION_HEADER , "ProductLookupService#lookupProduct");
 }
  m_pCall->setSOAPVersion(SOAP_VER_1_1);
<= /o:p>

 

 setUsername("user");
 setPassword("password");

 

 m_pCall->setOperation("lookupProduct", "http://localhost/distribution/webservices<= /font>");
  
 applyUserPreferences();
 m_pCall->addParameter((void*)lpParam, "xmlRequest", XSD_STRING);
  
 if (AXIS_SUCCESS =3D=3D = m_pCall->invoke())

 {

   

if(AXIS_SUCCESS=3D=3Dm_pCall->checkMessage("lookupProductRe= sponse", "http://www.car= dinal.com/distribution/webservices"))
{
     char sTemp[1024]=3D"";
     sprintf(sTemp, m_pCall->getElementAsString("result", 0));    //**** EXCEPTION THROWN = HERE***
}
 

The response received is as below (Trapped using = Mindreef SOAPScope).

 

Request sent (It sends an XML string in parameter "xmlRequest") -

<?xml version=3D'1.0' encoding=3D'utf-8' = ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV=3D"
http://schemas.xmlsoap.org/soap/envelope/<= /font>"  xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema" xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance<= /font>">
<SOAP-ENV:Body>
<ns1:lookupProduct xmlns:ns1=3D"
http://www.cardinal.com/distribution/webservices<= /span>">
<xmlRequest = xsi:type=3D"xsd:string">

</xmlRequest>
</ns1:lookupProduct>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Rsposne received (Output parameter name is "result")-

<env:Envelope
   
xmlns:env=3D"http://schemas.xmlsoap.org/soap/envelope/"     xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance"     xmlns:soapenc=3D"http://schemas.xmlsoap.org/soap/encoding/&quo= t;
   
xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema">
<env:Body>
    <n1:lookupProductResponse
xmlns:n1=3D"http://www.cardinal.com/distribution/webservices&q= uot;>
        <result xsi:type=3D"xsd:string">TEST</result>
    </n1:lookupProductResponse>
</env:Body>
</env:Envelope>

Thanks in advance,

Linesh Mahadik



Confidentiality Notice

The information contained in this electronic message and any attachments = to this message are intended
for the exclusive use of the addressee(s) and may contain confidential = or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or = Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.
------_=_NextPart_001_01C59990.BB9F1012--