You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by zhu jiang <yk...@gmail.com> on 2006/08/10 04:49:33 UTC
[Axis2]How to invoke a webservice built by Axis2 in PHP?
Hi All,
I made a webservice by Axis2 v1.0 using RPCMessageReceiver, but I can't
use the SoapClient class in PHP to invoke the webservice. For example:
$soapclient=new SoapClient("
http://127.0.0.1:8080/axis2/services/version?wsdl");
.......
But the SoapClient could invoke webservices built by Axis 1.3. Does
Axis2 not support this? What should I do?
Thanks,
Jiang
Re: [Axis2]How to invoke a webservice built by Axis2 in PHP?
Posted by Samisa Abeysinghe <sa...@wso2.com>.
Well you can also use the PHP Axis2 extention built on top of Axis2/C.
It is here: http://pecl.php.net/package/axis2
Samisa...
Alistair Young wrote:
> I think there would be two ways of accessing a web service from PHP:
>
> 1 - use the java stub via PHP's Java integration - http://uk.php.net/java
> 2 - POST a SOAP message to the service's REST endpoint without using
> the stub. Just create the SOAP message in PHP - http://uk2.php.net/soap
>
> I've never had to use Java from PHP so I'd probably try the REST
> approach. You'll need PHP 5 though.
>
> Alistair
>
> On 11 Aug 2006, at 08:06, zhu jiang wrote:
>
>> Hi Chinthaka,
>>
>> How could I use the stub code in PHP?
>>
>> Thanks,
>> Jiang
>>
>>
>> 2006/8/10, Eran Chinthaka <chinthaka@opensource.lk
>> <ma...@opensource.lk>>:
>>
>> The easiest way is to write your implement the contract first
>> approach,
>> which I always encourage.
>> Write your own wsdl, use wsdl2java to generate clients and/or server
>> side code and use them. Its the best way.
>>
>> -- Chinthaka
>>
>> zhu jiang wrote:
>> > I cannot use document/literal style message because the operation I
>> > wrote has two parameters, and by now only rpcmessage receiver
>> supports
>> > for this in Axis2. What should I do?
>> >
>> >
>> > 2006/8/10, Eran Chinthaka <chinthaka@opensource.lk
>> <ma...@opensource.lk>
>> > <mailto: chinthaka@opensource.lk
>> <ma...@opensource.lk>>>:
>> >
>> > Is your SoapClient supports document/literal style messages?
>> >
>> >
>> >
>> > zhu jiang wrote:
>> > > Hi All,
>> > >
>> > > I made a webservice by Axis2 v1.0 using
>> RPCMessageReceiver, but I
>> > > can't use the SoapClient class in PHP to invoke the
>> webservice.
>> > For example:
>> > > $soapclient=new
>> > > SoapClient("
>> http://127.0.0.1:8080/axis2/services/version?wsdl");
>> > > .......
>> > >
>> > > But the SoapClient could invoke webservices built by
>> Axis 1.3
>> > . Does
>> > > Axis2 not support this? What should I do?
>> > >
>> > > Thanks,
>> > > Jiang
>> >
>> >
>> >
>> >
>> >
>>
>>
>>
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [Axis2]How to invoke a webservice built by Axis2 in PHP?
Posted by Alistair Young <al...@smo.uhi.ac.uk>.
I think there would be two ways of accessing a web service from PHP:
1 - use the java stub via PHP's Java integration - http://uk.php.net/
java
2 - POST a SOAP message to the service's REST endpoint without using
the stub. Just create the SOAP message in PHP - http://uk2.php.net/soap
I've never had to use Java from PHP so I'd probably try the REST
approach. You'll need PHP 5 though.
Alistair
On 11 Aug 2006, at 08:06, zhu jiang wrote:
> Hi Chinthaka,
>
> How could I use the stub code in PHP?
>
> Thanks,
> Jiang
>
>
> 2006/8/10, Eran Chinthaka <ch...@opensource.lk>:
> The easiest way is to write your implement the contract first
> approach,
> which I always encourage.
> Write your own wsdl, use wsdl2java to generate clients and/or server
> side code and use them. Its the best way.
>
> -- Chinthaka
>
> zhu jiang wrote:
> > I cannot use document/literal style message because the operation I
> > wrote has two parameters, and by now only rpcmessage receiver
> supports
> > for this in Axis2. What should I do?
> >
> >
> > 2006/8/10, Eran Chinthaka <chinthaka@opensource.lk
> > <mailto: chinthaka@opensource.lk>>:
> >
> > Is your SoapClient supports document/literal style messages?
> >
> >
> >
> > zhu jiang wrote:
> > > Hi All,
> > >
> > > I made a webservice by Axis2 v1.0 using
> RPCMessageReceiver, but I
> > > can't use the SoapClient class in PHP to invoke the
> webservice.
> > For example:
> > > $soapclient=new
> > > SoapClient(" http://127.0.0.1:8080/axis2/services/version?
> wsdl");
> > > .......
> > >
> > > But the SoapClient could invoke webservices built by
> Axis 1.3
> > . Does
> > > Axis2 not support this? What should I do?
> > >
> > > Thanks,
> > > Jiang
> >
> >
> >
> >
> >
>
>
>
>
>
Re: [Axis2]How to invoke a webservice built by Axis2 in PHP?
Posted by zhu jiang <yk...@gmail.com>.
Hi Chinthaka,
How could I use the stub code in PHP?
Thanks,
Jiang
2006/8/10, Eran Chinthaka <ch...@opensource.lk>:
>
> The easiest way is to write your implement the contract first approach,
> which I always encourage.
> Write your own wsdl, use wsdl2java to generate clients and/or server
> side code and use them. Its the best way.
>
> -- Chinthaka
>
> zhu jiang wrote:
> > I cannot use document/literal style message because the operation I
> > wrote has two parameters, and by now only rpcmessage receiver supports
> > for this in Axis2. What should I do?
> >
> >
> > 2006/8/10, Eran Chinthaka <chinthaka@opensource.lk
> > <ma...@opensource.lk>>:
> >
> > Is your SoapClient supports document/literal style messages?
> >
> >
> >
> > zhu jiang wrote:
> > > Hi All,
> > >
> > > I made a webservice by Axis2 v1.0 using
> RPCMessageReceiver, but I
> > > can't use the SoapClient class in PHP to invoke the webservice.
> > For example:
> > > $soapclient=new
> > > SoapClient(" http://127.0.0.1:8080/axis2/services/version?wsdl");
> > > .......
> > >
> > > But the SoapClient could invoke webservices built by Axis 1.3
> > . Does
> > > Axis2 not support this? What should I do?
> > >
> > > Thanks,
> > > Jiang
> >
> >
> >
> >
> >
>
>
>
>
>
Re: [Axis2]How to invoke a webservice built by Axis2 in PHP?
Posted by Eran Chinthaka <ch...@opensource.lk>.
The easiest way is to write your implement the contract first approach,
which I always encourage.
Write your own wsdl, use wsdl2java to generate clients and/or server
side code and use them. Its the best way.
-- Chinthaka
zhu jiang wrote:
> I cannot use document/literal style message because the operation I
> wrote has two parameters, and by now only rpcmessage receiver supports
> for this in Axis2. What should I do?
>
>
> 2006/8/10, Eran Chinthaka <chinthaka@opensource.lk
> <ma...@opensource.lk>>:
>
> Is your SoapClient supports document/literal style messages?
>
>
>
> zhu jiang wrote:
> > Hi All,
> >
> > I made a webservice by Axis2 v1.0 using RPCMessageReceiver, but I
> > can't use the SoapClient class in PHP to invoke the webservice.
> For example:
> > $soapclient=new
> > SoapClient(" http://127.0.0.1:8080/axis2/services/version?wsdl");
> > .......
> >
> > But the SoapClient could invoke webservices built by Axis 1.3
> . Does
> > Axis2 not support this? What should I do?
> >
> > Thanks,
> > Jiang
>
>
>
>
>
Re: [Axis2]How to invoke a webservice built by Axis2 in PHP?
Posted by zhu jiang <yk...@gmail.com>.
I cannot use document/literal style message because the operation I wrote
has two parameters, and by now only rpcmessage receiver supports for this in
Axis2. What should I do?
2006/8/10, Eran Chinthaka <ch...@opensource.lk>:
>
> Is your SoapClient supports document/literal style messages?
>
>
>
> zhu jiang wrote:
> > Hi All,
> >
> > I made a webservice by Axis2 v1.0 using RPCMessageReceiver, but I
> > can't use the SoapClient class in PHP to invoke the webservice. For
> example:
> > $soapclient=new
> > SoapClient("http://127.0.0.1:8080/axis2/services/version?wsdl");
> > .......
> >
> > But the SoapClient could invoke webservices built by Axis 1.3. Does
> > Axis2 not support this? What should I do?
> >
> > Thanks,
> > Jiang
>
>
>
>
>
Re: [Axis2]How to invoke a webservice built by Axis2 in PHP?
Posted by Eran Chinthaka <ch...@opensource.lk>.
Is your SoapClient supports document/literal style messages?
zhu jiang wrote:
> Hi All,
>
> I made a webservice by Axis2 v1.0 using RPCMessageReceiver, but I
> can't use the SoapClient class in PHP to invoke the webservice. For example:
> $soapclient=new
> SoapClient("http://127.0.0.1:8080/axis2/services/version?wsdl");
> .......
>
> But the SoapClient could invoke webservices built by Axis 1.3. Does
> Axis2 not support this? What should I do?
>
> Thanks,
> Jiang