You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Yuvaraj Athur Raghuvir <yu...@gmail.com> on 2007/09/14 06:45:07 UTC
Connecting to StrikeIron WebServices - how to?
Hello,
As you might already know, StrikeIron has Webservices Search available as a
WebService [1]. [SOAP 1.1]
I decided to use the Google Sample to create client and interpret the
result.
The client invoke fails. There seems to be no SOAP fault.
Any suggestions?
Thanks & Regards,
Yuva
[1] http://www.strikeiron.com/ProductDetail.aspx?p=23
<http://www.strikeiron.com/ProductDetail.aspx?p=23>
Environment : VC++, proxy (configured into axis2.xml)
Assumptions:
operation = "SearchWebServices";
si_wss_key = <get this from strikeiron>;
si_wss_keyword = "finance";
Changes:
address = "http://ws.strikeiron.com/StrikeIronDirectoryService"; //endpoint
ns1 = axiom_namespace_create(env, "http://www.strikeirion.com/webservices",
"ns1"); //payload
The SOAP message I am generating looks like this:
<ns1:SearchWebservies
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/
" xmlns:ns1="http://www.strikeiron.com/webservices"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance
" xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www/w3/org/1999/XMLSchema
">
<LicenceKey xsi:type="xsd:string"> .... </LicenseKEy>
<KEyWord xsi;type="xsd;string">finance<
/KeyWord>
</nsl:SearchWebServices>
Re: Connecting to StrikeIron WebServices - how to?
Posted by Yuvaraj Athur Raghuvir <yu...@gmail.com>.
Hello,
I have assembled the soap:Envelope.
Now, I need to get <?xml version=" 1.0" encoding="utf-8"?> on the top.
I think this should be a simple call somewhere and not part of payload
assembly.
Suggestions?
Regards,
Yuva
On 9/15/07, Yuvaraj Athur Raghuvir <yu...@gmail.com> wrote:
>
> Hello,
>
> I have discovered the correct form of the XML to be sent as follows:
>
> <?xml version=" 1.0" encoding="utf-8"?>
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="
> http://www.w3.org/2001/XMLSchema" xmlns:enc="
> http://schemas.xmlsoap.org/soap/encoding" >
>
> <soap:Body>
> <tns:SearchWebServices xmlns:tns="http://www.strikeirion.com/webservices">
> <tns:LicenseKey>licensekey</tns:LicenseKey>
> <tns:KeyWord>keyword</tns:KeyWord>
> </tns:SearchWebServices>
> </soap:Body>
>
> </soap:Envelope>
>
> If I use the Google Sample verbatim, I get the following XML:
> <ns1:SearchWebservices soapenv:encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/ " xmlns:ns1="
> http://www.strikeiron.com/webservices" xmlns:xsi="
> http://www.w3.org/1999/XMLSchema-instance " xmlns:soapenv='
> http://schemas.xmlsoap.org/soap/envelope/ " xmlns:xsd="
> http://www/w3/org/1999/XMLSchema ">
> <LicenseKey xsi:type="xsd:string"> license </LicenseKEy>
> <KeyWord xsi;type="xsd;string">keyword</KeyWord>
> </nsl:SearchWebServices>
>
> I went through AXIOM/C sample but I donot see how I can get the following
> elements:
> a) <?xml version="1.0" encoding="utf-8"?> : Is this implicit?
> b) <soap:Envelope..>...</soap:Envelop>
> c) <soap:Body>...</soap:Body>
>
> Any code snippets for the above will help. Thanks!
>
> Regards,
> Yuva
>
>
> On 9/14/07, Yuvaraj Athur Raghuvir < yuvaraj.a.r@gmail.com> wrote:
> >
> > Hello,
> >
> > As you might already know, StrikeIron has Webservices Search available
> > as a WebService [1]. [SOAP 1.1]
> >
> > I decided to use the Google Sample to create client and interpret the
> > result.
> >
> > The client invoke fails. There seems to be no SOAP fault.
> >
> > Any suggestions?
> >
> > Thanks & Regards,
> > Yuva
> >
> > [1] http://www.strikeiron.com/ProductDetail.aspx?p=23
> > <http://www.strikeiron.com/ProductDetail.aspx?p=23>
> >
> > Environment : VC++, proxy (configured into axis2.xml)
> > Assumptions:
> > operation = "SearchWebServices";
> > si_wss_key = <get this from strikeiron>;
> > si_wss_keyword = "finance";
> >
> > Changes:
> > address = "http://ws.strikeiron.com/StrikeIronDirectoryService ";
> > //endpoint
> > ns1 = axiom_namespace_create(env, "
> > http://www.strikeirion.com/webservices", "ns1"); //payload
> >
> > The SOAP message I am generating looks like this:
> >
> > <ns1:SearchWebservies soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "
> > xmlns:ns1="http://www.strikeiron.com/webservices" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance "
> > xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd=" http://www/w3/org/1999/XMLSchema
> > ">
> > <LicenceKey xsi:type="xsd:string"> .... </LicenseKEy>
> > <KEyWord xsi;type="xsd;string">finance<
> > /KeyWord>
> > </nsl:SearchWebServices>
> >
> >
> >
> >
> >
>
Re: Connecting to StrikeIron WebServices - how to?
Posted by Dinesh Premalal <xy...@gmail.com>.
Yuva,
Please find my comments inline
"Yuvaraj Athur Raghuvir" <yu...@gmail.com> writes:
> If I use the Google Sample verbatim, I get the following XML:
> <ns1:SearchWebservices soapenv:encodingStyle=" http://schemas.xmlsoap.org/soap/
> encoding/ " xmlns:ns1="http://www.strikeiron.com/webservices" xmlns:xsi=" http:
> //www.w3.org/1999/XMLSchema-instance " xmlns:soapenv='http://
> schemas.xmlsoap.org/soap/envelope/ " xmlns:xsd="http://www/w3/org/1999/
> XMLSchema ">
> <LicenseKey xsi:type="xsd:string"> license </LicenseKEy>
> <KeyWord xsi;type="xsd;string">keyword</KeyWord>
> </nsl:SearchWebServices>
>
> I went through AXIOM/C sample but I donot see how I can get the following
> elements:
> a) <?xml version="1.0" encoding="utf-8"?> : Is this implicit?
> b) <soap:Envelope..>...</soap:Envelop>
> c) <soap:Body>...</soap:Body>
>
My understanding is , you don't need to worry about creating xml
declaration and soap envelope. Axis2/C will take care of it. You just
need to pass your payload (that you specify above) to
axis2_svc_client_send_receive function
ret_node = axis2_svc_client_send_receive(svc_client, env, payload);
thanks,
Dinesh
--
Dinesh Premalal
http://xydinesh.wordpress.com/
GPG ID : A255955C
GPG Key Finger Print : C481 E5D4 C27E DC34 9257 0229 4F44 266E A255 955C
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org
Re: Connecting to StrikeIron WebServices - how to?
Posted by Yuvaraj Athur Raghuvir <yu...@gmail.com>.
Hello,
I have discovered the correct form of the XML to be sent as follows:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="
http://www.w3.org/2001/XMLSchema" xmlns:enc="
http://schemas.xmlsoap.org/soap/encoding" >
<soap:Body>
<tns:SearchWebServices xmlns:tns="http://www.strikeirion.com/webservices">
<tns:LicenseKey>licensekey</tns:LicenseKey>
<tns:KeyWord>keyword</tns:KeyWord>
</tns:SearchWebServices>
</soap:Body>
</soap:Envelope>
If I use the Google Sample verbatim, I get the following XML:
<ns1:SearchWebservices soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/ " xmlns:ns1="
http://www.strikeiron.com/webservices" xmlns:xsi="
http://www.w3.org/1999/XMLSchema-instance " xmlns:soapenv='
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="
http://www/w3/org/1999/XMLSchema ">
<LicenseKey xsi:type="xsd:string"> license </LicenseKEy>
<KeyWord xsi;type="xsd;string">keyword</KeyWord>
</nsl:SearchWebServices>
I went through AXIOM/C sample but I donot see how I can get the following
elements:
a) <?xml version="1.0" encoding="utf-8"?> : Is this implicit?
b) <soap:Envelope..>...</soap:Envelop>
c) <soap:Body>...</soap:Body>
Any code snippets for the above will help. Thanks!
Regards,
Yuva
On 9/14/07, Yuvaraj Athur Raghuvir <yu...@gmail.com> wrote:
>
> Hello,
>
> As you might already know, StrikeIron has Webservices Search available as
> a WebService [1]. [SOAP 1.1]
>
> I decided to use the Google Sample to create client and interpret the
> result.
>
> The client invoke fails. There seems to be no SOAP fault.
>
> Any suggestions?
>
> Thanks & Regards,
> Yuva
>
> [1] http://www.strikeiron.com/ProductDetail.aspx?p=23
> <http://www.strikeiron.com/ProductDetail.aspx?p=23>
>
> Environment : VC++, proxy (configured into axis2.xml)
> Assumptions:
> operation = "SearchWebServices";
> si_wss_key = <get this from strikeiron>;
> si_wss_keyword = "finance";
>
> Changes:
> address = "http://ws.strikeiron.com/StrikeIronDirectoryService ";
> //endpoint
> ns1 = axiom_namespace_create(env, "http://www.strikeirion.com/webservices",
> "ns1"); //payload
>
> The SOAP message I am generating looks like this:
>
> <ns1:SearchWebservies soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "
> xmlns:ns1="http://www.strikeiron.com/webservices" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance "
> xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd=" http://www/w3/org/1999/XMLSchema
> ">
> <LicenceKey xsi:type="xsd:string"> .... </LicenseKEy>
> <KEyWord xsi;type="xsd;string">finance<
> /KeyWord>
> </nsl:SearchWebServices>
>
>
>
>
>