axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bochnak Filip <Filip.Boch...@edmb.debis.com>
Subject AW: simple question -> Interoparability Problem C,C++ with Java
Date Thu, 27 May 2004 12:02:55 GMT
Hi Susantha
Thanks for your mail.
I don´t clear understand you. I did donwload the axis-c-1-1-1-win32.zip file
from apache web-page.
And that´s should be run like axis for java does it. Or isn´t it?
I send you the two wsdl files which one is in doc\lit and the other is
rpc\encoded + the results when I run wsdl2ws tool.
Can you please check them. 
Thanks 
Cu Phil

1. File is rpc\encoded
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="service:TestService"
xmlns:impl="service:TestService" xmlns:intf="service:TestService"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/">

   <wsdl:message name="aufrufRequest">

      <wsdl:part name="param" type="xsd:string"/>

   </wsdl:message>

   <wsdl:message name="aufrufResponse">

      <wsdl:part name="aufrufReturn" type="xsd:string"/>

   </wsdl:message>

   <wsdl:portType name="TestService">

      <wsdl:operation name="aufruf" parameterOrder="param">

         <wsdl:input name="aufrufRequest" message="impl:aufrufRequest"/>

         <wsdl:output name="aufrufResponse" message="impl:aufrufResponse"/>

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="TestService_ServiceSoapBinding"
type="impl:TestService">

      <wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="aufruf">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="aufrufRequest">

            <wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="service:TestService"/>

         </wsdl:input>

         <wsdl:output name="aufrufResponse">

            <wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="service:TestService"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="TestServiceService">

      <wsdl:port name="TestService_Service"
binding="impl:TestService_ServiceSoapBinding">

         <wsdlsoap:address
location="http://localhost:8080/axis/services/TestService_Service"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>
----------------------------------------------------------------------------
-----------------
Output from wsdl2ws: header file
/*
 * This is the Client Stub Class genarated by the tool WSDL2Ws
 * TestService.h: interface for the TestServiceclass.
 *
 */
#if !defined(__TESTSERVICE_CLIENTSTUB_H__INCLUDED_)
#define __TESTSERVICE_CLIENTSTUB_H__INCLUDED_

#include <axis/client/Call.h>

class TestService 
{
private:
	Call* m_pCall;
public:
	TestService();
public:
	virtual ~TestService();
public: 
	//void aufruf(xsd__string Value0,xsd__string Value1);
	xsd__string TestService::aufruf(xsd__string Value0);
};

#endif /* !defined(__TESTSERVICE_CLIENTSTUB_H__INCLUDED_)*/
----------------------------------------------------------------------------
---------------
Output from wsdl2ws: cpp file

#include "TestService.h"
#include <axis/server/AxisWrapperAPI.h>

bool CallBase::bInitialized;
CallFunctions CallBase::ms_VFtable;
TestService::TestService()
{
	m_pCall = new Call();
	m_pCall->SetProtocol(APTHTTP);
	
m_pCall->SetEndpointURI("http://localhost:9090/axis/services/TestService_Ser
vice");
}

TestService::~TestService()
{
	delete m_pCall;
}


/*Methods corresponding to the web service methods*/

/*
 * This method wrap the service methodaufruf
 */
/*void TestService::aufruf(xsd__string Value0, xsd__string Value1)
{
	if (AXIS_SUCCESS != m_pCall->Initialize(CPP_RPC_PROVIDER,
NORMAL_CHANNEL)) return ;
	m_pCall->SetTransportProperty(SOAPACTION_HEADER , "");
	m_pCall->SetSOAPVersion(SOAP_VER_1_1);
	m_pCall->SetOperation("aufruf", "service:TestService");
	m_pCall->AddParameter((void*)&Value0, "param", XSD_STRING);
	m_pCall->AddParameter((void*)&Value1, "aufrufReturn", XSD_STRING);
	if (AXIS_SUCCESS == m_pCall->Invoke())
	{
		if(AXIS_SUCCESS == m_pCall->CheckMessage("aufrufResponse",
"service:TestService"))
		{
			/*not successful*/
/*		}
	}
	m_pCall->UnInitialize();
}*/
============================================================================
===================
2. File is doc\lit
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="service:TestService"
xmlns:impl="service:TestService" xmlns:intf="service:TestService"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
 <wsdl:types>
  <schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="service:TestService">
   <element name="param" type="xsd:string"/>
   <element name="aufrufReturn" type="xsd:string"/>
  </schema>
 </wsdl:types>

   <wsdl:message name="aufrufRequest">

      <wsdl:part name="param" element="impl:param"/>

   </wsdl:message>

   <wsdl:message name="aufrufResponse">

      <wsdl:part name="aufrufReturn" element="impl:aufrufReturn"/>

   </wsdl:message>

   <wsdl:portType name="TestService">

      <wsdl:operation name="aufruf" parameterOrder="param">

         <wsdl:input name="aufrufRequest" message="impl:aufrufRequest"/>

         <wsdl:output name="aufrufResponse" message="impl:aufrufResponse"/>

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="TestService_ServiceSoapBinding"
type="impl:TestService">

      <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="aufruf">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="aufrufRequest">

            <wsdlsoap:body use="literal" namespace="service:TestService"/>

         </wsdl:input>

         <wsdl:output name="aufrufResponse">

            <wsdlsoap:body use="literal" namespace="service:TestService"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="TestServiceService">

      <wsdl:port name="TestService_Service"
binding="impl:TestService_ServiceSoapBinding">

         <wsdlsoap:address
location="http://localhost:8080/axis/services/TestService_Service"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>
----------------------------------------------------------------------------
----------
Output from wsdl2ws tool header file
/*
 * This is the Client Stub Class genarated by the tool WSDL2Ws
 * TestService.h: interface for the TestServiceclass.
 *
 */
#if !defined(__TESTSERVICE_CLIENTSTUB_H__INCLUDED_)
#define __TESTSERVICE_CLIENTSTUB_H__INCLUDED_

#include <axis/client/Call.h>

class TestService 
{
private:
	Call* m_pCall;
public:
	TestService();
public:
	virtual ~TestService();
public: 
	void aufruf();
};

#endif /* !defined(__TESTSERVICE_CLIENTSTUB_H__INCLUDED_)*/
----------------------------------------------------------------------------
---
Output from wsdl2ws tool cpp file

*
 * This is the Client Stub implementation file genarated by WSDL2Ws tool.
 * TestService.cpp: implemtation for the TestService.
 *
 */

#include "TestService.h"

#include <axis/server/AxisWrapperAPI.h>

bool CallBase::bInitialized;
CallFunctions CallBase::ms_VFtable;
TestService::TestService()
{
	m_pCall = new Call();
	m_pCall->SetProtocol(APTHTTP);
	
m_pCall->SetEndpointURI("http://localhost:9090/axis/services/TestService_Ser
vice");
}

TestService::~TestService()
{
	delete m_pCall;
}


/*Methods corresponding to the web service methods*/

/*
 * This method wrap the service methodaufruf
 */
void TestService::aufruf()
{
	if (AXIS_SUCCESS != m_pCall->Initialize(CPP_DOC_PROVIDER,
NORMAL_CHANNEL)) return ;
	m_pCall->SetTransportProperty(SOAPACTION_HEADER , "");
	m_pCall->SetSOAPVersion(SOAP_VER_1_1);
	m_pCall->SetOperation("param", "service:TestService");
	if (AXIS_SUCCESS == m_pCall->Invoke())
	{
		if(AXIS_SUCCESS == m_pCall->CheckMessage("aufrufReturn",
"service:TestService"))
		{
			/*not successful*/
		}
	}
	m_pCall->UnInitialize();
}


-----Ursprüngliche Nachricht-----
Von: Susantha Kumara [mailto:susantha@opensource.lk]
Gesendet: Donnerstag, 27. Mai 2004 12:58
An: 'Apache AXIS C User List'
Betreff: RE: simple question -> Interoparability Problem C,C++ with Java



But if you get the latest WSDL2Ws tool to process your wsdl and generate
code, you need to get the latest Axis code from the CVS HEAD and compile
all the libraries too.

---
Susantha Kumara
Virtusa (pvt) Ltd.
Office : +94112714385
Mobile : +94777420453

> -----Original Message-----
> From: Susantha Kumara [mailto:susantha@opensource.lk]
> Sent: Thursday, May 27, 2004 10:56 AM
> To: 'Apache AXIS C User List'
> Subject: RE: simple question -> Interoparability Problem C,C++ with
Java
> 
> I checked the latest code of WSDL2Ws tool (stub/skeleton generator)
and
> the bug I mentioned in the previous mail is fixed now. But if your
wsdl
> is document/literal it should work fine.
> 
> What is the style in your wsdl ?.
> 
> I am willing to help you to use Axis C++. Could you send me sufficient
> details on the problems you get (error messages / SOAP messages
captured
> with tcpmonitor / server side logs etc).
> 
> Are u using both Axis C++ client and Server ?.
> 
> ---
> Susantha Kumara
> Virtusa (pvt) Ltd.
> Office : +94112714385
> Mobile : +94777420453
> 
> > -----Original Message-----
> > From: Bochnak Filip [mailto:Filip.Bochnak@edmb.debis.com]
> > Sent: Wednesday, May 26, 2004 6:33 PM
> > To: 'Apache AXIS C User List'
> > Subject: AW: simple question -> Interoparability Problem C,C++ with
> Java
> >
> > Hi Susantha
> >
> > Many thanks for your email.
> > I just wondering because I´ve tried so many times and it´s still not
> > working. :-(
> > Is there anything else what I´m missing? What kind of encoding style
> do I
> > have to use?
> 
> You can use both doc/literal and rpc/encoded. Both are supported in
Axis
> C++. Only rpc/literal is not supported yet.
> 
> > Document/Literal or rpc/encoded. They both didn´t work ???
> 
> They works fine. Could you check the provided samples in the binary
> distribution ?.
> 
> ---
> Susantha.
> 
> 
> > I have also tried gsoap and it works wonderful with
document/literal.
> > It has also some bugs, if I´m run the code
> generators(wsdl2h,soapcpp2),but
> > it works.
> > Can you help me here, because I have to take a decision very soon
> which of
> > both (gsoap,axis c++) are useful for a
> > client c++/service java communication?
> > I would appreciate any help.
> >
> > Thanks Phil
> >
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Susantha Kumara [mailto:susantha@opensource.lk]
> > Gesendet: Mittwoch, 26. Mai 2004 14:22
> > An: 'Apache AXIS C User List'
> > Betreff: RE: simple question -> Interoparability Problem C,C++ with
> Java
> >
> >
> >
> > Hi Phil,
> >
> > Yes its possible to have a Axis C++ client talking to Axis Java
> server.
> > People have done that.
> >
> > But there is a known problem in the Axis C++ code generator-WSDL2Ws
> tool
> > (found today). But this problem occurs when you generated client
side
> > stub sources using a RPC style wsdl which has "parameterOrder"
> attribute
> > in its <portType> <operation ....>
> >
> > We will correct this problem ASAP in the CVS.
> >
> > ---
> > Susantha.
> >
> > > -----Original Message-----
> > > From: Bochnak Filip [mailto:Filip.Bochnak@edmb.debis.com]
> > > Sent: Wednesday, May 26, 2004 6:10 PM
> > > To: axis-c
> > > Subject: simple question -> Interoparability Problem C,C++ with
Java
> > >
> > > Hi all
> > >
> > > I have a simple question. Can I implement a C++ Client which
> connects
> > to a
> > > Java Web Service with Axis?
> > > I´ve tried for weeks to run a simple example like getQuote! But it
> > didn´t
> > > work.
> > > I use Axis C++ 1.1.1 on the Client side and Axis-1_1 Java on the
> > Server
> > > Side.
> > > Does anyone have any clues ??? plz...
> > >
> > > Thanks for your help
> > > Phil


Mime
View raw message