axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Dick <adrian.d...@uk.ibm.com>
Subject Re: SOAP Client Error
Date Thu, 15 Sep 2005 08:34:06 GMT
Hi,

See responses below.


Note:  It would probably be better to use one of these mailing lists:
-  Axis C User (axis-c-user@ws.apache.org)
-  Axis C Developer (axis-c-dev@ws.apache.org)
You can subscribe here: http://ws.apache.org/axis/mail.html or view the
archives here: http://marc.theaimsgroup.com/
I have cross-posted this reply to the user mailing list, and it would be
best if we continue this dicussion on that mailing list.

Regards,
Adrian
_______________________________________
Adrian Dick (adrian.dick@uk.ibm.com)

"Hossain, Shopon" <Shopon.Hossain@gs.com> wrote on 14/09/2005 17:58:56:

> Hi,
>    I am running a SOAP client to get info over http protocol.  It
> connects to a service successfully which returns an integer value.
> It FAILS when it connects to a service which returns a simple object
> as oppose to just an int or string.

What do you mean by a simple object?   Do you mean structure (or complex
element in SOAP terminology)?  Or another simple type, asides from string
or int, eg: boolean or dateTime.?

> I don't know what I am missing.
> If any of you could send me an example (few lines of code to show
> how to call a service which returns an array of objects).

Ah, you mention an array here.  Again, what kind of objects (within the
array) are we talking about here?


It isn't clear to me here, if you're using the WSDL2Ws tooling to generate
stubs from a WSDL.  This should be capable of producing the correct code
for invoking a service for most data structures ... if it's not working for
yours, submitting your WSDL will help us track down any problems in that
code.

Or, perhaps you problem is understanding how to use the stubs, I'd
recommend looking through the various samples for one that closely matches
your situation.

Alternatively, perhaps you have already resolved the above, and something
is failing during the execution - in which case it would be very useful for
us to replicate your problem if you could submit you WSDL, and capture the
SOAP request/response going across the wire (using a tool like TCPMon in
axis.jar).  Additionally, if you're using a trace enable version of Axis, a
copy of your trace would also be useful.

Can you also confirm which version of Axis you're using.

> Your help
> would be greatly appreciated.
> Thanks.
> Shopon
> 212 357 1218
>
> ie. I got your email address from
'http://ws.apache.org/axis/cpp/who.html'  (
> Active Contributors)
> ---------- Working Code ---------
>         m_pCall = new Call();
>         m_pCall->setProtocol(APTHTTP);
>         m_pCall->setEndpointURI(EndPointUrl);
>         int Ret = 0;
>         const char* pcCmplxFaultName;
>         if (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER,
> NORMAL_CHANNEL)){
>                         return Ret;
>         }
>         m_pCall->setTransportProperty(SOAPACTION_HEADER , "");
>         m_pCall->setSOAPVersion(SOAP_VER_1_1);
>         m_pCall->setOperation("autoLocate",EndPointUrl);
>         m_pCall->addCmplxParameter(Value0, (void*)
> Axis_Serialize_LocateRequest, (void*)Axis_Delete_LocateRequest,
> "autoLocateRequest", Axis_URI_LocateRequest);
>         m_pCall->addParameter((void*)&Value1, "trader", XSD_STRING);
>         m_pCall->addParameter((void*)&Value2, "callerName", XSD_STRING);
>         m_pCall->addParameter((void*)&Value3, "repId", XSD_INT);
>         m_pCall->addParameter((void*)&Value4, "requestType", XSD_INT);
>         m_pCall->addParameter((void*)&Value5, "researchFlag",
XSD_BOOLEAN);
>         m_pCall->addParameter((void*)&Value6,
> "acceptPartialLocates", XSD_BOOLEAN);
>         try{
>                 int res = m_pCall->invoke() ;
>                 if (AXIS_SUCCESS == res){
>                 if( AXIS_SUCCESS ==
> m_pCall->checkMessage("autoLocateResponse",EndPointUrl)){
>                                 Ret =
> m_pCall->getElementAsInt("autoLocateReturn", 0);
>                         }
>                 }
>         }catch(exception& e){
>                 ...
>         }catch(...){
>                 ...
>         }
>         m_pCall->unInitialize();
>


Mime
View raw message