You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Kanchana Welagedara <ka...@gmail.com> on 2009/10/26 09:17:53 UTC

Dynamic innovation of WS client-JAVA

Hi,
I have a WS service which is not a Axis WS  based service but it's some java
based  service exposed which has it's own soap compiler.This smiler service
have deployed and run  in multiple machines.I should write a common client
to invoke the service in  a vendor independent way.My Question are

1. How do i implement it as a dynamic invocation using a common client.

2.If I use dynamic client using JAX_WS how dose it provide the SEP
independence with the artifact generated by *wsimport tool* ?

3.Do I have to use Dispatch client /Dynamic Proxy client?

I found this url following url,are there any articles which shows more
elaboration?
http://ws.apache.org/axis2/1_4_1/jaxws-guide.html#JAXWSIntro

/BR
Kanchana

Re: Dynamic innovation of WS client-JAVA

Posted by Kanchana Welagedara <ka...@gmail.com>.
I tried using the following approach to  invoke a dynamic web service client
and I get the following error.This is a  non axis web service and client
uses RPC call and and ServiceFactory

your input will be highly appreciated

/BR
Kanchana

AxisFault
 faultCode: {http://xml.apache.org/axis/}HTTP
 faultSubcode:
 faultString: (404)/prweb/PRSOAPServlet
 faultActor:
 faultNode:
 faultDetail:
    {}:return code:  404
&lt;html&gt;&lt;head&gt;&lt;title&gt;Apache Tomcat/5.5.26 - Error
report&lt;/title&gt;&lt;style&gt;&lt;!--H1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
H2
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
BODY
{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
P
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
{color : black;}A.name {color : black;}HR {color :
#525D76;}--&gt;&lt;/style&gt; &lt;/head&gt;&lt;body&gt;&lt;h1&gt;HTTP Status
404 - /prweb/PRSOAPServlet&lt;/h1&gt;&lt;HR size=&quot;1&quot;
noshade=&quot;noshade&quot;&gt;&lt;p&gt;&lt;b&gt;type&lt;/b&gt; Status
report&lt;/p&gt;&lt;p&gt;&lt;b&gt;message&lt;/b&gt;
&lt;u&gt;/prweb/PRSOAPServlet&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;description&lt;/b&gt;
&lt;u&gt;The requested resource (/prweb/PRSOAPServlet) is not
available.&lt;/u&gt;&lt;/p&gt;&lt;HR size=&quot;1&quot;
noshade=&quot;noshade&quot;&gt;&lt;h3&gt;Apache
Tomcat/5.5.26&lt;/h3&gt;&lt;/body&gt;&lt;/html&gt;
    {http://xml.apache.org/axis/}HttpErrorCode:404

(404)/prweb/PRSOAPServlet
    at
org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
    at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at CDO.CitiDirectOnline.SOAP.PegaRULES.test.main(test.java:56)


On Tue, Oct 27, 2009 at 4:22 AM, Vidura Gamini Abhaya <vi...@gmail.com>wrote:

> On 10/26/09, Kanchana Welagedara <ka...@gmail.com> wrote:
> > Hi,
> > I have a WS service which is not a Axis WS  based service but it's some
> java
> > based  service exposed which has it's own soap compiler.This smiler
> service
> > have deployed and run  in multiple machines.I should write a common
> client
> > to invoke the service in  a vendor independent way.My Question are
> >
> > 1. How do i implement it as a dynamic invocation using a common client.
> >
> > 2.If I use dynamic client using JAX_WS how dose it provide the SEP
> > independence with the artifact generated by *wsimport tool* ?
> >
> > 3.Do I have to use Dispatch client /Dynamic Proxy client?
> >
> > I found this url following url,are there any articles which shows more
> > elaboration?
> > http://ws.apache.org/axis2/1_4_1/jaxws-guide.html#JAXWSIntro
> >
> > /BR
> > Kanchana
> >
>
> --
> Sent from my mobile device
>

Re: Dynamic innovation of WS client-JAVA

Posted by Vidura Gamini Abhaya <vi...@gmail.com>.
On 10/26/09, Kanchana Welagedara <ka...@gmail.com> wrote:
> Hi,
> I have a WS service which is not a Axis WS  based service but it's some java
> based  service exposed which has it's own soap compiler.This smiler service
> have deployed and run  in multiple machines.I should write a common client
> to invoke the service in  a vendor independent way.My Question are
>
> 1. How do i implement it as a dynamic invocation using a common client.
>
> 2.If I use dynamic client using JAX_WS how dose it provide the SEP
> independence with the artifact generated by *wsimport tool* ?
>
> 3.Do I have to use Dispatch client /Dynamic Proxy client?
>
> I found this url following url,are there any articles which shows more
> elaboration?
> http://ws.apache.org/axis2/1_4_1/jaxws-guide.html#JAXWSIntro
>
> /BR
> Kanchana
>

-- 
Sent from my mobile device

Re: Dynamic innovation of WS client-JAVA

Posted by Kanchana Welagedara <ka...@gmail.com>.
On Wed, Oct 28, 2009 at 4:57 AM, Deepal Jayasinghe <de...@opensource.lk>wrote:

>
> > I have a WS service which is not a Axis WS  based service but it's
> > some java based  service exposed which has it's own soap compiler.This
> > smiler service have deployed and run  in multiple machines.I should
> > write a common client to invoke the service in  a vendor independent
> > way.My Question are
> Well whole idea of Web service is to have a vendor independent way of
> accessing the service, for example in order to invoke a Web service what
> we need is to have the WSDL.
> >
> > 1. How do i implement it as a dynamic invocation using a common client.
> You can generate the stub for the client, and then dynamically you can
> change the EPR and invoke the service. Since all the services have the
> same API one client should be able to talk to all.
>

 Question about changing the EPR dyanammically

1. You mean giving the technical user to enter the epr in a property file
and handle it dynamic way in a program or is there a specific API to make it
dynamic.Any samples?
I don't understand how you can make the generated stubs to invoke
dynamically since generated code itself  has hard coded end point url unless
you do the above.

Basically what you are saying I can use the generated stubs and make it
dynamic  rather writing a Dynamic client with out generating stubs?

2.If you generate the stubs for a particular service when you change the
service you will have to regenerate the Stubs again?doesn't  the dynamic
invocation provides you more re-usability by creating proxies on the fly?

3.How  I can provide the user control to access which machine's service to
be accessed based on the technical user  requirement?

Thanks in advance for your time

/BR
Kanchana

>
> >
> > I found this url following url,are there any articles which shows more
> > elaboration?
> > http://ws.apache.org/axis2/1_4_1/jaxws-guide.html#JAXWSIntro
> >
> > /BR
> > Kanchana
>
>

> --
> Thank you!
>
>
> http://blogs.deepal.org
> http://deepal.org
>
>

Re: Dynamic innovation of WS client-JAVA

Posted by Deepal Jayasinghe <de...@opensource.lk>.
> I have a WS service which is not a Axis WS  based service but it's
> some java based  service exposed which has it's own soap compiler.This
> smiler service have deployed and run  in multiple machines.I should
> write a common client to invoke the service in  a vendor independent
> way.My Question are
Well whole idea of Web service is to have a vendor independent way of
accessing the service, for example in order to invoke a Web service what
we need is to have the WSDL.
>
> 1. How do i implement it as a dynamic invocation using a common client.
You can generate the stub for the client, and then dynamically you can
change the EPR and invoke the service. Since all the services have the
same API one client should be able to talk to all.

>
> I found this url following url,are there any articles which shows more
> elaboration?
> http://ws.apache.org/axis2/1_4_1/jaxws-guide.html#JAXWSIntro
>
> /BR
> Kanchana

-- 
Thank you!


http://blogs.deepal.org
http://deepal.org