axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dimuthu Gamage" <dimut...@gmail.com>
Subject Re: Webserivce call through Axis fails..
Date Sun, 13 Apr 2008 08:32:59 GMT
Hi Rahil,

I missed the part you are using generated code for client. For client
you don't need services.xml. I just tried your WSDL to generate both
client and server side and it worked for me when i did the above
changes to the services.xml, that s why I propose the change. I will
try to answer on your problem later part of the mail. first will start
answering your other questions.

The directory structure of the test case is
res - resources like wsdl file, client logic, server logic (files
other than generated code)
stub - client side generated code + demo.c
skel - server side generated code + axis2_skel_*.c
resources - generated services.xml

I generated both the server and client logic using this script
http://people.apache.org/~dimuthu/leisure/23_oct/generate_demos.rb.
First you have to generate the code for the wsdl. Then you need to
just run this script in the same directory. This is used just to
generate test cases.

The request message you mentioned is not one generated from the WSDL2C
generated code. I think you manually write it in the tcpmon. For me
the request was like this,

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
      <wsa:To>http://localhost:9090/axis2/services/GSCP_service_serviceagent</wsa:To>
      <wsa:Action>/ProcessDefinitions/Testing/TestServer/GSCP/intfAuthenticateCustomer-service.serviceagent/intfwsAuthenticateCustomerEndpoint0/SendSMSOp</wsa:Action>
      <wsa:MessageID>f09e1804-0930-1dd1-3a6e-00197e732d4d</wsa:MessageID>
   </soapenv:Header>
   <soapenv:Body>
      <n:SendSMSRequest
xmlns:n="http://xmlns.dohabank.com/namespace/dbframework/UtilityServicesSchema.xsd"
xmlns:n0="http://xmlns.dohabank.com/namespace/dbframework/HeaderSchema.xsd">
         <n0:Header>
            <n0:ChannelID>demo string id: 90</n0:ChannelID>
            <n0:User>demo string id: 91</n0:User>
            <n0:AuthFlag>demo string id: 92</n0:AuthFlag>
         </n0:Header>
         <n:Message>demo string id: 93</n:Message>
         <n:Title>demo string id: 94</n:Title>
         <n:MobileNo>demo string id: 95</n:MobileNo>
      </n:SendSMSRequest>
   </soapenv:Body></soapenv:Envelope>

But in your message there is additional 'group' element wrap the
elements inside the body content, which is wrong. So try sending the
above message (with your values) and check what the response is. In
the same time tcpmon can be used as a tool for capture message sent by
external client and service. Just go through
http://ws.apache.org/commons/tcpmon/tcpmontutorial.html to learn how
to do that. So that you will be able to observe the real messages sent
and receive by your client.

And when I check the schema and the message, I didn't noticed any
problem in the generated code for your WSDL. So the problem should be
something else. The "adb_" prefix doesn't effect to the message sent
by the client, it just used in the function signature.

If the "axis2_svc_client_send_receive_with_op_qname" returns NULL, it
means the server doesn't at least send a fault. So my guess the
problem is in the network connection. So please recheck endpoint and
proxy settings and try.

Thanks
Dimuthu


On Sun, Apr 13, 2008 at 11:29 AM, Rahil Ali <rahil.ali@tpsonline.com> wrote:
> Hello Dimuthu,
>
> I tried the nighlty build of axis-snapshot, it complied properly. But when I
> tried to call the service it gave the same error again when calling
> "axis2_svc_client_send_receive_with_op_qname" (RETURN NULL). I think it is
> because of adb_ prefix?? Pls tell me whats the fix for this problem.
>
> Thanks & Regards,
> Rahil
>
>
> Rahil Ali <rahil.ali@tpsonline.com> wrote:
>
>
>
> Hi Dimuthu,
>
> Thanks for the replies and help. Couple of questions again ... What is the
> use of service.xml when I am just a client. Secondly I saw the file you
> attached, pls explain how did u generated such organised code, also pls
> explain the directory structure... I am trying on the nightly build you
> mentioned earlier and will respond the results.
>
> Thanks & Regards,
> Rahil Ali
>
> Dimuthu Gamage <dimuthuc@gmail.com> wrote:
> My early email was reported rejected by the recipient. This should be
> due to the large attachment. I will keep the test case uploaded at
> http://people.apache.org/~dimuthu/leisure/1_dec/case37_servicexml.zip
>
> Thanks
> Dimuthu
>
> On Sat, Apr 12, 2008 at 12:25 PM, Dimuthu Gamage wrote:
> > Hi Rahil,
> >
> > This should be due to the service.xml has '-', and '.' characters for
> > the service name and the service class name. In the latest svn this
> > issue is corrected. And I was able to fix the issue in missing 'adb_'
> > prefix too, so you can use the original WSDL without doing any changes
> > with.
> >
> > You may wait until the today's axis2/java nightly build, or just use
> > the attached files.
> >
> > Thanks
> > Dimuthu
> >
> >
> >
> > On Thu, Apr 10, 2008 at 4:26 PM, Samisa Abeysinghe wrote:
> > > Rahil Ali wrote:
> > >
> > > > Yes, I am using code generated by WSDL2C using this command :
> > > > "WSDL2C.sh -uri GSCP-service.serviceagent.wsdl -u -d adb"
> > > > I am trying to call this operation: "SendSMSOp"
> > > > Can you check whether my wsdl is ok or not. I have removed operations
> and
> > > other non-related items from the original WSDL.
> > > >
> > >
> > > The WSDL seems to be valid. If it was invalid, usually the codegen tools
> > > trows an exception.
> > >
> > > Looking at the WSDL and the request sent by the client, the message sent
> is
> > > not correct as far as I can tell. I am not sure if this is a bug in the
> > > generated code or the user code.
> > > We need a codegen expert to help us here :)
> > >
> > > Samisa...
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-c-user-help@ws.apache.org
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>
>
>
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Mime
View raw message