|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Sticky Method / Webservice callWe are using AXIS2C (C++ code) to call AXIS2/java based webservice. We are using the *PortType.cpp class to make the wsdl call. We are using VisualStudio 2008 to compile the code to create an exe (which also uses MAPI)
When we call first function/method/SOAPAction from C++ it goes through fine and returns as expected. However everyother SOAPAction after that seems to be using the first SOAPAction name, with new parameters (as visible by TCPMON) and hence generates an error. We are using http cookies to validate the session. Here is the call sequence from C++ side *PortType.login(String<username>, String<password>) // sets the cookie *PortType.callA (int<someid>, String<somestring>...) When we make callA TCPMON shows (not exact but illustration only) *PortType.login (int<someid>, String<somestring>...) We tracked down the generated code and every function generated to wrap a Web service in *PortType.cpp includes the following: if (NULL==m_pCall->getTransportProperty("SOAPAction",false)) { m_pCall->setTransportProperty(SOAPACTION_HEADER , "restoreCustomer"); } This code creates the problem where the SOAPAction, once set, never gets changed. We have to comment out the 'if' statement in every case to get around this. I am pretty sure we are doing something wrong here , don't know what ? We looked at example code included with the distribution (and on the web ) for example http://ws.apache.org/axis2/c/docs/hello/client/hello.c.html however methods/functions like following do not exist in our axis2c runtime dll. axutil_env_create_all() axis2_options_create() axutil_strcmp() axis2_svc_client_set_options build_om_request axis2_svc_client_send_receive(svc_client, env, payload); Whar are we doing wrong? Amit |
|
|
Re: Sticky Method / Webservice callHi,
Are you generating the code using Axis2/C[1] or Axis/CPP[2]? Axis2/C doesn't generate C++ code. So I am assuming you are using Axis/CPP? In that case, you can't use Axis2/C runtime, hence you can't follow the example. Regards, Shankar [1] http://ws.apache.org/axis2/c/ [2] http://ws.apache.org/axis/cpp/ On Tue, Sep 15, 2009 at 1:24 AM, Amit Tewari <amit_tewari@...> wrote: > We are using AXIS2C (C++ code) to call AXIS2/java based webservice. We are using the *PortType.cpp class to make the wsdl call. We are using VisualStudio 2008 to compile the code to create an exe (which also uses MAPI) > > When we call first function/method/SOAPAction from C++ it goes through fine and returns as expected. However everyother SOAPAction after that seems to be using the first SOAPAction name, with new parameters (as visible by TCPMON) and hence generates an error. We are using http cookies to validate the session. > > Here is the call sequence from C++ side > > *PortType.login(String<username>, String<password>) // sets the cookie > *PortType.callA (int<someid>, String<somestring>...) > > When we make callA TCPMON shows (not exact but illustration only) > > *PortType.login (int<someid>, String<somestring>...) > > > > > We tracked down the generated code and every function generated to wrap a Web service in *PortType.cpp includes the following: > > if (NULL==m_pCall->getTransportProperty("SOAPAction",false)) > { > m_pCall->setTransportProperty(SOAPACTION_HEADER , "restoreCustomer"); > } > > This code creates the problem where the SOAPAction, once set, never gets changed. We have to comment out the 'if' statement in every case to get around this. > > I am pretty sure we are doing something wrong here , don't know what ? > > We looked at example code included with the distribution (and on the web ) for example http://ws.apache.org/axis2/c/docs/hello/client/hello.c.html > > however methods/functions like following do not exist in our axis2c runtime dll. > axutil_env_create_all() > axis2_options_create() > axutil_strcmp() > axis2_svc_client_set_options > build_om_request > axis2_svc_client_send_receive(svc_client, env, payload); > > Whar are we doing wrong? > > Amit > > > > -- S.Uthaiyashankar Software Architect WSO2 Inc. http://wso2.com/ - "The Open Source SOA Company" |
| Free embeddable forum powered by Nabble | Forum Help |