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 vittal nangunoori <nv...@yahoo.com> on 2007/07/10 12:28:20 UTC

[Axis2]How to invoke web service from another

hi All,
Please let me know how to invoke web service from
another service.
I have client stub generated using wsdl2java for the
first service.
I have written second web service and trying to invoke
the first web service using generated client stub.
I am getting exception in main
AxisFault exception.
I unable to trace back and debug the exception.

Advance thanks for the help.

Vittal



      ____________________________________________________________________________________
Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz

---------------------------------------------------------------------
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 web service from another

Posted by Joe Nathan <jo...@yahoo.com>.
PS;

Add the following imports if necessary;
==============================
import javax.xml.soap.*;
import javax.xml.namespace.QName;
import java.net.URL;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.*;

import com.sun.org.apache.xml.internal.serialize.OutputFormat;
import com.sun.org.apache.xml.internal.serialize.XMLSerializer;

-- 
View this message in context: http://www.nabble.com/-Axis2-How-to-invoke-web-service-from-another-tf4055013.html#a11530590
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
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 web service from another

Posted by Joe Nathan <jo...@yahoo.com>.
You should make relevant JAR files included in your classpath or
in container libs. I use JDK1.6 which includes most of the packages
you use. 1.5 is quite different. You have to use many of Axis 
provided JAR files.

If you still have problems, please post versions for;
 - JDK
 - Servlet container
 - Axis

And where you run clients?

Regards.




vittal nangunoori wrote:
> 
> hi Joe Nathan,
> I have put the SAAJ code in my web service application
> and I am getting the following exceptions
> 
> Please provide solution for this too..
> 
> javax.xml.soap.SOAPException: Unable to create SOAP
> Factory: org.apache.axis2.sa
> aj.SOAPFactoryImpl
>         at
> javax.xml.soap.SOAPFactory.newInstance()Ljavax.xml.soap.SOAPFactory;(
> Unknown Source)
> 

-- 
View this message in context: http://www.nabble.com/-Axis2-How-to-invoke-web-service-from-another-tf4055013.html#a11549924
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
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 web service from another

Posted by Joe Nathan <jo...@yahoo.com>.
I think there are bugs in Axis. I tested on POJO calling another SOAP.
Then I get exception like this;
==============================================================
java.util.MissingResourceException: Can't find resource for bundle
org.apache.ax
is2.i18n.ProjectResourceBundle, key outboundNoAction
        at java.util.ResourceBundle.getObject(ResourceBundle.java:386)
        at java.util.ResourceBundle.getString(ResourceBundle.java:346)
        at
org.apache.axis2.i18n.MessageBundle.getMessage(MessageBundle.java:191)
===============================================================
I tested from Servelet container after adding jars to servelet lib. It
worked 
fine. But not from Axis container per se. I will contact SAAJ developer
about 
this problem.

regards.




-- 
View this message in context: http://www.nabble.com/-Axis2-How-to-invoke-web-service-from-another-tf4055013.html#a11556679
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
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 web service from another

Posted by vittal nangunoori <nv...@yahoo.com>.
hi All,
I could able to fix the exception by disengaging the
addressing module by commenting the code in axis2.xml
file. Now I could able to invoke web service from
another web service.
I would like to Thanks Joe Nathan and others for their
cooperation in resolving the issue.

Thanks,
Vittal
--- vittal nangunoori <nv...@yahoo.com> wrote:

> hi All,
> This is the exception that i am getting at the
> server1
> while invoking the service in it from the another
> service in another server2.
> 
> Exceptions at server1
> 
> javax.xml.bind.JAXBException: Validation
> Error(s)->tag
> name "wsa:To" is not allowed. Possible tag names
> are:
> <Security>:Unexpe
> 
> cted element
> {http://www.w3.org/2005/08/addressing}:To: 
>         at
>
com.techrx.soap.encoding.JAXBDeserializer.unmarshall(JAXBDeserializer.java:76)
> 
>         at
>
com.techrx.soap.handler.SOAPMessageHandler.handleRequest(SOAPMessageHandler.java:61)
> 
>         at
>
com.techrx.soap.handler.HandlerChainImpl.handleRequest(HandlerChainImpl.java:64)
> 
>         at
>
com.techrx.soap.server.MessageProcessor.processAsServer(MessageProcessor.java:50)
> 
>         at
>
com.techrx.soap.server.SoapServlet.doPost(SoapServlet.java:114)
> 
>         at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> 
>         at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 
>         at
>
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072)
> 
>         at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
> 
>         at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
> 
>         at
>
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6985)
> 
>         at
>
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
> 
>         at
>
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
> 
>         at
>
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892)
> 
>         at
>
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766)
> 
>         at
>
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
> 
> 
> 
> --- vittal nangunoori <nv...@yahoo.com> wrote:
> 
> > hi All,
> > I have developed web service using POJO.
> > This web service is calling second web service.
> > I created stubs for the second service using axis2
> > and
> > written a client programme.
> > This client is working fine as stand alone
> > application. But when the same cleint code is used
> > in
> > the web service it is not working.
> > 
> > Can any one suggest me how to go ahead with
> calling
> > one service from another.
> > 
> > Thankyou for the help provided.
> > 
> > Regards,
> > Vittal
> > --- vittal nangunoori <nv...@yahoo.com>
> wrote:
> > 
> > > hi Joe,
> > > Can we use both SAAJ classes of jre for SAAJ
> > client
> > > and AXIS2 SAAJ related jars in my web service
> > > simultaneously.
> > > 
> > > Regards,
> > > Vittal
> > > --- vittal nangunoori <nv...@yahoo.com>
> > wrote:
> > > 
> > > > hi Joe,
> > > > I have developed a simple web service using
> > > > axis2(POJO).
> > > > In this web service i have incorporated code
> for
> > > > invoking another web service using SAAJ.
> > > > 
> > > > As a standalone SAAJ client i am able to
> invoke
> > > the
> > > > web service. But when it is included in my web
> > > > service
> > > > i am getting the exception. Is there any
> problem
> > > > with
> > > > SAAJ classes of JRE and Axis2.
> > > > 
> > > > Thanking you,
> > > > Vittal
> > > > 
> > > > 
> > > > 
> > > > --- Joe Nathan <jo...@yahoo.com> wrote:
> > > > 
> > > > > 
> > > > > You should make relevant JAR files included
> in
> > > > your
> > > > > classpath or
> > > > > in container libs. I use JDK1.6 which
> includes
> > > > most
> > > > > of the packages
> > > > > you use. 1.5 is quite different. You have to
> > use
> > > > > many of Axis 
> > > > > provided JAR files.
> > > > > 
> > > > > If you still have problems, please post
> > versions
> > > > > for;
> > > > >  - JDK
> > > > >  - Servlet container
> > > > >  - Axis
> > > > > 
> > > > > And where you run clients?
> > > > > 
> > > > > Regards.
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > vittal nangunoori wrote:
> > > > > > 
> > > > > > hi Joe Nathan,
> > > > > > I have put the SAAJ code in my web service
> > > > > application
> > > > > > and I am getting the following exceptions
> > > > > > 
> > > > > > Please provide solution for this too..
> > > > > > 
> > > > > > javax.xml.soap.SOAPException: Unable to
> > create
> > > > > SOAP
> > > > > > Factory: org.apache.axis2.sa
> > > > > > aj.SOAPFactoryImpl
> > > > > >         at
> > > > > >
> > > > >
> > > >
> > >
> >
>
javax.xml.soap.SOAPFactory.newInstance()Ljavax.xml.soap.SOAPFactory;(
> > > > > > Unknown Source)
> > > > > > 
> > > > > 
> > > > > -- 
> > > > > View this message in context:
> > > > >
> > > >
> > >
> >
>
http://www.nabble.com/-Axis2-How-to-invoke-web-service-from-another-tf4055013.html#a11549923
> > > > > Sent from the Axis - User mailing list
> archive
> > > at
> > > > > Nabble.com.
> > > > > 
> > > > > 
> > > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > > > axis-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail:
> > > > > axis-user-help@ws.apache.org
> > > > > 
> > > > > 
> 
=== message truncated ===



       
____________________________________________________________________________________Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/

---------------------------------------------------------------------
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 web service from another

Posted by vittal nangunoori <nv...@yahoo.com>.
hi All,
This is the exception that i am getting at the server1
while invoking the service in it from the another
service in another server2.

Exceptions at server1

javax.xml.bind.JAXBException: Validation Error(s)->tag
name "wsa:To" is not allowed. Possible tag names are:
<Security>:Unexpe

cted element
{http://www.w3.org/2005/08/addressing}:To: 
        at
com.techrx.soap.encoding.JAXBDeserializer.unmarshall(JAXBDeserializer.java:76)

        at
com.techrx.soap.handler.SOAPMessageHandler.handleRequest(SOAPMessageHandler.java:61)

        at
com.techrx.soap.handler.HandlerChainImpl.handleRequest(HandlerChainImpl.java:64)

        at
com.techrx.soap.server.MessageProcessor.processAsServer(MessageProcessor.java:50)

        at
com.techrx.soap.server.SoapServlet.doPost(SoapServlet.java:114)

        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

        at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072)

        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)

        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)

        at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6985)

        at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

        at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)

        at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892)

        at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766)

        at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)



--- vittal nangunoori <nv...@yahoo.com> wrote:

> hi All,
> I have developed web service using POJO.
> This web service is calling second web service.
> I created stubs for the second service using axis2
> and
> written a client programme.
> This client is working fine as stand alone
> application. But when the same cleint code is used
> in
> the web service it is not working.
> 
> Can any one suggest me how to go ahead with calling
> one service from another.
> 
> Thankyou for the help provided.
> 
> Regards,
> Vittal
> --- vittal nangunoori <nv...@yahoo.com> wrote:
> 
> > hi Joe,
> > Can we use both SAAJ classes of jre for SAAJ
> client
> > and AXIS2 SAAJ related jars in my web service
> > simultaneously.
> > 
> > Regards,
> > Vittal
> > --- vittal nangunoori <nv...@yahoo.com>
> wrote:
> > 
> > > hi Joe,
> > > I have developed a simple web service using
> > > axis2(POJO).
> > > In this web service i have incorporated code for
> > > invoking another web service using SAAJ.
> > > 
> > > As a standalone SAAJ client i am able to invoke
> > the
> > > web service. But when it is included in my web
> > > service
> > > i am getting the exception. Is there any problem
> > > with
> > > SAAJ classes of JRE and Axis2.
> > > 
> > > Thanking you,
> > > Vittal
> > > 
> > > 
> > > 
> > > --- Joe Nathan <jo...@yahoo.com> wrote:
> > > 
> > > > 
> > > > You should make relevant JAR files included in
> > > your
> > > > classpath or
> > > > in container libs. I use JDK1.6 which includes
> > > most
> > > > of the packages
> > > > you use. 1.5 is quite different. You have to
> use
> > > > many of Axis 
> > > > provided JAR files.
> > > > 
> > > > If you still have problems, please post
> versions
> > > > for;
> > > >  - JDK
> > > >  - Servlet container
> > > >  - Axis
> > > > 
> > > > And where you run clients?
> > > > 
> > > > Regards.
> > > > 
> > > > 
> > > > 
> > > > 
> > > > vittal nangunoori wrote:
> > > > > 
> > > > > hi Joe Nathan,
> > > > > I have put the SAAJ code in my web service
> > > > application
> > > > > and I am getting the following exceptions
> > > > > 
> > > > > Please provide solution for this too..
> > > > > 
> > > > > javax.xml.soap.SOAPException: Unable to
> create
> > > > SOAP
> > > > > Factory: org.apache.axis2.sa
> > > > > aj.SOAPFactoryImpl
> > > > >         at
> > > > >
> > > >
> > >
> >
>
javax.xml.soap.SOAPFactory.newInstance()Ljavax.xml.soap.SOAPFactory;(
> > > > > Unknown Source)
> > > > > 
> > > > 
> > > > -- 
> > > > View this message in context:
> > > >
> > >
> >
>
http://www.nabble.com/-Axis2-How-to-invoke-web-service-from-another-tf4055013.html#a11549923
> > > > Sent from the Axis - User mailing list archive
> > at
> > > > Nabble.com.
> > > > 
> > > > 
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > > axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail:
> > > > axis-user-help@ws.apache.org
> > > > 
> > > > 
> > > 
> > > 
> > > 
> > >  
> > >
> >
>
____________________________________________________________________________________
> > > Now that's room service!  Choose from over
> 150,000
> > > hotels
> > > in 45,000 destinations on Yahoo! Travel to find
> > your
> > > fit.
> > >
> http://farechase.yahoo.com/promo-generic-14795097
> > > 
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail:
> > > axis-user-help@ws.apache.org
> > > 
> > > 
> > 
> > 
> > 
> >        
> >
>
____________________________________________________________________________________
> > Get the free Yahoo! toolbar and rest assured with
> > the added security of spyware protection.
> >
>
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail:
> > axis-user-help@ws.apache.org
> > 
> > 
> 
> 
> 
>        
>
____________________________________________________________________________________
> Take the Internet to Go: Yahoo!Go puts the Internet
> in your pocket: mail, news, photos & more. 
> http://mobile.yahoo.com/go?refer=1GNXIC
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail:
> axis-user-help@ws.apache.org
> 
> 



       
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
http://sims.yahoo.com/  

---------------------------------------------------------------------
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 web service from another

Posted by vittal nangunoori <nv...@yahoo.com>.
hi All,
I have developed web service using POJO.
This web service is calling second web service.
I created stubs for the second service using axis2 and
written a client programme.
This client is working fine as stand alone
application. But when the same cleint code is used in
the web service it is not working.

Can any one suggest me how to go ahead with calling
one service from another.

Thankyou for the help provided.

Regards,
Vittal
--- vittal nangunoori <nv...@yahoo.com> wrote:

> hi Joe,
> Can we use both SAAJ classes of jre for SAAJ client
> and AXIS2 SAAJ related jars in my web service
> simultaneously.
> 
> Regards,
> Vittal
> --- vittal nangunoori <nv...@yahoo.com> wrote:
> 
> > hi Joe,
> > I have developed a simple web service using
> > axis2(POJO).
> > In this web service i have incorporated code for
> > invoking another web service using SAAJ.
> > 
> > As a standalone SAAJ client i am able to invoke
> the
> > web service. But when it is included in my web
> > service
> > i am getting the exception. Is there any problem
> > with
> > SAAJ classes of JRE and Axis2.
> > 
> > Thanking you,
> > Vittal
> > 
> > 
> > 
> > --- Joe Nathan <jo...@yahoo.com> wrote:
> > 
> > > 
> > > You should make relevant JAR files included in
> > your
> > > classpath or
> > > in container libs. I use JDK1.6 which includes
> > most
> > > of the packages
> > > you use. 1.5 is quite different. You have to use
> > > many of Axis 
> > > provided JAR files.
> > > 
> > > If you still have problems, please post versions
> > > for;
> > >  - JDK
> > >  - Servlet container
> > >  - Axis
> > > 
> > > And where you run clients?
> > > 
> > > Regards.
> > > 
> > > 
> > > 
> > > 
> > > vittal nangunoori wrote:
> > > > 
> > > > hi Joe Nathan,
> > > > I have put the SAAJ code in my web service
> > > application
> > > > and I am getting the following exceptions
> > > > 
> > > > Please provide solution for this too..
> > > > 
> > > > javax.xml.soap.SOAPException: Unable to create
> > > SOAP
> > > > Factory: org.apache.axis2.sa
> > > > aj.SOAPFactoryImpl
> > > >         at
> > > >
> > >
> >
>
javax.xml.soap.SOAPFactory.newInstance()Ljavax.xml.soap.SOAPFactory;(
> > > > Unknown Source)
> > > > 
> > > 
> > > -- 
> > > View this message in context:
> > >
> >
>
http://www.nabble.com/-Axis2-How-to-invoke-web-service-from-another-tf4055013.html#a11549923
> > > Sent from the Axis - User mailing list archive
> at
> > > Nabble.com.
> > > 
> > > 
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail:
> > > axis-user-help@ws.apache.org
> > > 
> > > 
> > 
> > 
> > 
> >  
> >
>
____________________________________________________________________________________
> > Now that's room service!  Choose from over 150,000
> > hotels
> > in 45,000 destinations on Yahoo! Travel to find
> your
> > fit.
> > http://farechase.yahoo.com/promo-generic-14795097
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail:
> > axis-user-help@ws.apache.org
> > 
> > 
> 
> 
> 
>        
>
____________________________________________________________________________________
> Get the free Yahoo! toolbar and rest assured with
> the added security of spyware protection.
>
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail:
> axis-user-help@ws.apache.org
> 
> 



       
____________________________________________________________________________________
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. 
http://mobile.yahoo.com/go?refer=1GNXIC

---------------------------------------------------------------------
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 web service from another

Posted by vittal nangunoori <nv...@yahoo.com>.
hi Joe,
Can we use both SAAJ classes of jre for SAAJ client
and AXIS2 SAAJ related jars in my web service
simultaneously.

Regards,
Vittal
--- vittal nangunoori <nv...@yahoo.com> wrote:

> hi Joe,
> I have developed a simple web service using
> axis2(POJO).
> In this web service i have incorporated code for
> invoking another web service using SAAJ.
> 
> As a standalone SAAJ client i am able to invoke the
> web service. But when it is included in my web
> service
> i am getting the exception. Is there any problem
> with
> SAAJ classes of JRE and Axis2.
> 
> Thanking you,
> Vittal
> 
> 
> 
> --- Joe Nathan <jo...@yahoo.com> wrote:
> 
> > 
> > You should make relevant JAR files included in
> your
> > classpath or
> > in container libs. I use JDK1.6 which includes
> most
> > of the packages
> > you use. 1.5 is quite different. You have to use
> > many of Axis 
> > provided JAR files.
> > 
> > If you still have problems, please post versions
> > for;
> >  - JDK
> >  - Servlet container
> >  - Axis
> > 
> > And where you run clients?
> > 
> > Regards.
> > 
> > 
> > 
> > 
> > vittal nangunoori wrote:
> > > 
> > > hi Joe Nathan,
> > > I have put the SAAJ code in my web service
> > application
> > > and I am getting the following exceptions
> > > 
> > > Please provide solution for this too..
> > > 
> > > javax.xml.soap.SOAPException: Unable to create
> > SOAP
> > > Factory: org.apache.axis2.sa
> > > aj.SOAPFactoryImpl
> > >         at
> > >
> >
>
javax.xml.soap.SOAPFactory.newInstance()Ljavax.xml.soap.SOAPFactory;(
> > > Unknown Source)
> > > 
> > 
> > -- 
> > View this message in context:
> >
>
http://www.nabble.com/-Axis2-How-to-invoke-web-service-from-another-tf4055013.html#a11549923
> > Sent from the Axis - User mailing list archive at
> > Nabble.com.
> > 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail:
> > axis-user-help@ws.apache.org
> > 
> > 
> 
> 
> 
>  
>
____________________________________________________________________________________
> Now that's room service!  Choose from over 150,000
> hotels
> in 45,000 destinations on Yahoo! Travel to find your
> fit.
> http://farechase.yahoo.com/promo-generic-14795097
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail:
> axis-user-help@ws.apache.org
> 
> 



       
____________________________________________________________________________________
Get the free Yahoo! toolbar and rest assured with the added security of spyware protection.
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php

---------------------------------------------------------------------
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 web service from another

Posted by vittal nangunoori <nv...@yahoo.com>.
hi Joe,
I have developed a simple web service using
axis2(POJO).
In this web service i have incorporated code for
invoking another web service using SAAJ.

As a standalone SAAJ client i am able to invoke the
web service. But when it is included in my web service
i am getting the exception. Is there any problem with
SAAJ classes of JRE and Axis2.

Thanking you,
Vittal



--- Joe Nathan <jo...@yahoo.com> wrote:

> 
> You should make relevant JAR files included in your
> classpath or
> in container libs. I use JDK1.6 which includes most
> of the packages
> you use. 1.5 is quite different. You have to use
> many of Axis 
> provided JAR files.
> 
> If you still have problems, please post versions
> for;
>  - JDK
>  - Servlet container
>  - Axis
> 
> And where you run clients?
> 
> Regards.
> 
> 
> 
> 
> vittal nangunoori wrote:
> > 
> > hi Joe Nathan,
> > I have put the SAAJ code in my web service
> application
> > and I am getting the following exceptions
> > 
> > Please provide solution for this too..
> > 
> > javax.xml.soap.SOAPException: Unable to create
> SOAP
> > Factory: org.apache.axis2.sa
> > aj.SOAPFactoryImpl
> >         at
> >
>
javax.xml.soap.SOAPFactory.newInstance()Ljavax.xml.soap.SOAPFactory;(
> > Unknown Source)
> > 
> 
> -- 
> View this message in context:
>
http://www.nabble.com/-Axis2-How-to-invoke-web-service-from-another-tf4055013.html#a11549923
> Sent from the Axis - User mailing list archive at
> Nabble.com.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail:
> axis-user-help@ws.apache.org
> 
> 



 
____________________________________________________________________________________
Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097

---------------------------------------------------------------------
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 web service from another

Posted by Joe Nathan <jo...@yahoo.com>.
You should make relevant JAR files included in your classpath or
in container libs. I use JDK1.6 which includes most of the packages
you use. 1.5 is quite different. You have to use many of Axis 
provided JAR files.

If you still have problems, please post versions for;
 - JDK
 - Servlet container
 - Axis

And where you run clients?

Regards.




vittal nangunoori wrote:
> 
> hi Joe Nathan,
> I have put the SAAJ code in my web service application
> and I am getting the following exceptions
> 
> Please provide solution for this too..
> 
> javax.xml.soap.SOAPException: Unable to create SOAP
> Factory: org.apache.axis2.sa
> aj.SOAPFactoryImpl
>         at
> javax.xml.soap.SOAPFactory.newInstance()Ljavax.xml.soap.SOAPFactory;(
> Unknown Source)
> 

-- 
View this message in context: http://www.nabble.com/-Axis2-How-to-invoke-web-service-from-another-tf4055013.html#a11549923
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
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 web service from another

Posted by vittal nangunoori <nv...@yahoo.com>.
hi Joe Nathan,
I have put the SAAJ code in my web service application
and I am getting the following exceptions

Please provide solution for this too..

javax.xml.soap.SOAPException: Unable to create SOAP
Factory: org.apache.axis2.sa
aj.SOAPFactoryImpl
        at
javax.xml.soap.SOAPFactory.newInstance()Ljavax.xml.soap.SOAPFactory;(
Unknown Source)
        at
com.publix.broker.ivr.IVRBroker.secondService()V(IVRBroker.java:194)
        at
com.publix.broker.ivr.IVRBroker.submitRefillOrder([Lcom.publix.broker
.ivr.RefillOrder_Type101;)[Lcom.publix.broker.ivr.OrderResponse_Type102;(IVRBrok
er.java:114)
        at
jrockit.reflect.NativeMethodInvoker.invoke0(Ljava.lang.Object;ILjava.
lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown
Source)
        at
jrockit.reflect.NativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.l
ang.Object;)Ljava.lang.Object;(Unknown Source)
        at
jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[
Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
        at
java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;
I)Ljava.lang.Object;(Unknown Source)
        at
org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(Lorg.apache
.axis2.description.AxisMessage;Ljava.lang.reflect.Method;Ljava.lang.Object;Ljava
.lang.String;Lorg.apache.axiom.om.OMElement;Lorg.apache.axis2.context.MessageCon
text;)Ljava.lang.Object;(RPCUtil.java:192)
        at
org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic
(Lorg.apache.axis2.context.MessageContext;Lorg.apache.axis2.context.MessageConte
xt;)V(RPCMessageReceiver.java:98)
        at
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusines
sLogic(Lorg.apache.axis2.context.MessageContext;)V(AbstractInOutMessageReceiver.
java:37)
        at
org.apache.axis2.receivers.AbstractMessageReceiver.receive(Lorg.apach
e.axis2.context.MessageContext;)V(AbstractMessageReceiver.java:92)
        at
org.apache.axis2.engine.AxisEngine.receive(Lorg.apache.axis2.context.
MessageContext;)Lorg.apache.axis2.engine.Handler$InvocationResponse;(AxisEngine.
java:159)
        at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReq
uest(Lorg.apache.axis2.context.MessageContext;Ljava.io.InputStream;Ljava.io.Outp
utStream;Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)Lorg.apache.axis
2.engine.Handler$InvocationResponse;(HTTPTransportUtils.java:227)
        at
org.apache.axis2.transport.http.AxisServlet.doPost(Ljavax.servlet.htt
p.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(AxisServlet.java
:115)
        at
javax.servlet.http.HttpServlet.service(Ljavax.servlet.http.HttpServle
tRequest;Ljavax.servlet.http.HttpServletResponse;)V(HttpServlet.java:760)
        at
javax.servlet.http.HttpServlet.service(Ljavax.servlet.ServletRequest;
Ljavax.servlet.ServletResponse;)V(HttpServlet.java:853)
        at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
()Ljava.lang.Object;(ServletStubImpl.java:996)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servle
t.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.Filte
rChainImpl;)V(ServletStubImpl.java:419)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servle
t.ServletRequest;Ljavax.servlet.ServletResponse;)V(ServletStubImpl.java:315)
        at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run()Ljava.lang.Object;(WebAppServletContext.java:6452)
        at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.se
curity.subject.AbstractSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Objec
t;(AuthenticatedSubject.java:321)
        at
weblogic.security.service.SecurityManager.runAs(Lweblogic.security.ac
l.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSub
ject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(SecurityManager.java:11
8)
        at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogi
c.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponse
Impl;)V(WebAppServletContext.java:3661)
        at
weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel
.ExecuteThread;)V(ServletRequestImpl.java:2630)
        at
weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest
;)V(ExecuteThread.java:219)
        at
weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
        at
java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown
Sourc
e)

--- vittal nangunoori <nv...@yahoo.com> wrote:

> Thankyou for the resolution.
> I will try with the SAAJ and get back with the
> result.
> 
> Thanking you,
> Vittal
> 
> --- Joe Nathan <jo...@yahoo.com> wrote:
> 
> > 
> > Use SAAJ for client side. You do not need stub in
> > SAAJ!
> > The following is a fully-tested code example. You
> > can copy it and
> > change for your purpose;
> > =======================
> > SOAPConnectionFactory connectionFactory =
> > SOAPConnectionFactory.newInstance(); 
> > SOAPConnection connection =
> > connectionFactory.createConnection(); 
> > 
> > MessageFactory mf = MessageFactory.newInstance(); 
> > SOAPMessage smsg = mf.createMessage(); 
> > SOAPBody body = smsg.getSOAPBody(); 
> > 
> > QName bodyName = new
> > QName("http://ws.apache.org/axis2/xsd", 
> > 					"YourServiceMethodName", "m"); 
> > SOAPBodyElement bodyElement =
> > body.addBodyElement(bodyName); 
> > 
> > // build arguments: three in this case;
> > QName name = new QName("inputarg"); 
> > SOAPElement symbol =
> > bodyElement.addChildElement(name); 
> > symbol.addTextNode("your input data"); 
> > 			
> > name = new QName("user"); 
> > symbol = bodyElement.addChildElement(name); 
> > symbol.addTextNode("your userid"); 
> > 			
> > name = new QName("password"); 
> > symbol = bodyElement.addChildElement(name); 
> > symbol.addTextNode("blashblah"); 
> > 
> > // call the service;
> > URL endpoint = new
> >
>
URL("http://localhost/axis2/services/YOURsoapServiceName");
> > 
> > 		SOAPMessage sresponse = connection.call(smsg,
> > endpoint); 
> > connection.close();
> > 			
> > // Get the return text;
> > SOAPBody soapBody = sresponse.getSOAPBody();
> > SOAPElement node =
> >
>
(SOAPElement)soapBody.getFirstChild().getFirstChild();
> > String msg = node.getValue();
> > 
> > -- 
> > View this message in context:
> >
>
http://www.nabble.com/-Axis2-How-to-invoke-web-service-from-another-tf4055013.html#a11530555
> > Sent from the Axis - User mailing list archive at
> > Nabble.com.
> > 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail:
> > axis-user-help@ws.apache.org
> > 
> > 
> 
> 
> 
>      
>
____________________________________________________________________________________
> Park yourself in front of a world of choices in
> alternative vehicles. Visit the Yahoo! Auto Green
> Center.
> http://autos.yahoo.com/green_center/ 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail:
> axis-user-help@ws.apache.org
> 
> 



       
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
http://farechase.yahoo.com/

---------------------------------------------------------------------
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 web service from another

Posted by vittal nangunoori <nv...@yahoo.com>.
Thankyou for the resolution.
I will try with the SAAJ and get back with the result.

Thanking you,
Vittal

--- Joe Nathan <jo...@yahoo.com> wrote:

> 
> Use SAAJ for client side. You do not need stub in
> SAAJ!
> The following is a fully-tested code example. You
> can copy it and
> change for your purpose;
> =======================
> SOAPConnectionFactory connectionFactory =
> SOAPConnectionFactory.newInstance(); 
> SOAPConnection connection =
> connectionFactory.createConnection(); 
> 
> MessageFactory mf = MessageFactory.newInstance(); 
> SOAPMessage smsg = mf.createMessage(); 
> SOAPBody body = smsg.getSOAPBody(); 
> 
> QName bodyName = new
> QName("http://ws.apache.org/axis2/xsd", 
> 					"YourServiceMethodName", "m"); 
> SOAPBodyElement bodyElement =
> body.addBodyElement(bodyName); 
> 
> // build arguments: three in this case;
> QName name = new QName("inputarg"); 
> SOAPElement symbol =
> bodyElement.addChildElement(name); 
> symbol.addTextNode("your input data"); 
> 			
> name = new QName("user"); 
> symbol = bodyElement.addChildElement(name); 
> symbol.addTextNode("your userid"); 
> 			
> name = new QName("password"); 
> symbol = bodyElement.addChildElement(name); 
> symbol.addTextNode("blashblah"); 
> 
> // call the service;
> URL endpoint = new
>
URL("http://localhost/axis2/services/YOURsoapServiceName");
> 
> 		SOAPMessage sresponse = connection.call(smsg,
> endpoint); 
> connection.close();
> 			
> // Get the return text;
> SOAPBody soapBody = sresponse.getSOAPBody();
> SOAPElement node =
>
(SOAPElement)soapBody.getFirstChild().getFirstChild();
> String msg = node.getValue();
> 
> -- 
> View this message in context:
>
http://www.nabble.com/-Axis2-How-to-invoke-web-service-from-another-tf4055013.html#a11530555
> Sent from the Axis - User mailing list archive at
> Nabble.com.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail:
> axis-user-help@ws.apache.org
> 
> 



      ____________________________________________________________________________________
Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center.
http://autos.yahoo.com/green_center/ 

---------------------------------------------------------------------
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 web service from another

Posted by Joe Nathan <jo...@yahoo.com>.
Use SAAJ for client side. You do not need stub in SAAJ!
The following is a fully-tested code example. You can copy it and
change for your purpose;
=======================
SOAPConnectionFactory connectionFactory =
SOAPConnectionFactory.newInstance(); 
SOAPConnection connection = connectionFactory.createConnection(); 

MessageFactory mf = MessageFactory.newInstance(); 
SOAPMessage smsg = mf.createMessage(); 
SOAPBody body = smsg.getSOAPBody(); 

QName bodyName = new QName("http://ws.apache.org/axis2/xsd", 
					"YourServiceMethodName", "m"); 
SOAPBodyElement bodyElement = body.addBodyElement(bodyName); 

// build arguments: three in this case;
QName name = new QName("inputarg"); 
SOAPElement symbol = bodyElement.addChildElement(name); 
symbol.addTextNode("your input data"); 
			
name = new QName("user"); 
symbol = bodyElement.addChildElement(name); 
symbol.addTextNode("your userid"); 
			
name = new QName("password"); 
symbol = bodyElement.addChildElement(name); 
symbol.addTextNode("blashblah"); 

// call the service;
URL endpoint = new
URL("http://localhost/axis2/services/YOURsoapServiceName"); 
		SOAPMessage sresponse = connection.call(smsg, endpoint); 
connection.close();
			
// Get the return text;
SOAPBody soapBody = sresponse.getSOAPBody();
SOAPElement node = (SOAPElement)soapBody.getFirstChild().getFirstChild();
String msg = node.getValue();

-- 
View this message in context: http://www.nabble.com/-Axis2-How-to-invoke-web-service-from-another-tf4055013.html#a11530555
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
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 web service from another

Posted by vittal nangunoori <nv...@yahoo.com>.
In the second web service (pojo) method, i have
intialised the stub(adb) of the first service and
invoked its method.
Can you provide me code for invoking web service in
the second web service


Here is the web service method of the second web
service


public OrderResponse_Type102[]
submitRefillOrder(RefillOrder_Type101[]
refillOrderArray)
    {
    	System.out.println("Inside the refillOrderRequest
FIRST"+refillOrderArray);    	
    	
		String rxNumber = null;
    	String storeNumber = null;
    	String lastName = null;
    	String phoneNumber = null;
    	String pickupDateTime = null;
    	String message = "Not OK";
    	
    	OrderResponse_Type102[] responseArray = new
OrderResponse_Type102[refillOrderArray.length];
    	

    	    	for(int i=0;i<refillOrderArray.length;i++)
    	{
    		RefillOrder_Type101 refillOrder =
refillOrderArray[i];
    		lastName = refillOrder.getPatientLastName();
        	phoneNumber = refillOrder.getPhoneNumber();
        	pickupDateTime =
refillOrder.getPickupDateTime();
        	rxNumber = refillOrder.getRxNumber();
        	storeNumber = refillOrder.getStoreNumber();
        	System.out.println("Inside the
refillOrderRequest THIRD-"+i);
        	
        	
        	
        	OrderResponse_Type102 respInfo = new
OrderResponse_Type102();
        	respInfo.setStoreNumber(storeNumber);
        	respInfo.setRxNumber(rxNumber);
        	respInfo.setPatientLastName(lastName);
        	respInfo.setMessage("yes");  
        	System.out.println("Inside the
refillOrderRequest FOURTH");
        	System.out.println("message from
RxInfoRequest FIVE "+message);    
        	
        	responseArray[i] = respInfo;
    	}
    	
    	
    	IVRClient ivrclient =  new IVRClient();
    	ivrclient.executeIVRPharmacyInfoReq();
    		System.out.println("message="+message);
    		
    	
    	
    	
    		
    	return responseArray;
    	
    }

--- Sameera Jayasoma <sa...@gmail.com>
wrote:

> Hi vittal,
> 
> You can invoke a Web service from another Web
> service.
> 
> Can you provide some more information regarding this
> issue. Such as some
> code that you have tried.
> 
> Regards,
> Sameera
> 
> -- 
> Sameera Jayasoma
> http://sameera-jayasoma.blogspot.com/
> http://www.flickr.com/photos/sameera-jayasoma
> 



       
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
http://farechase.yahoo.com/

---------------------------------------------------------------------
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 web service from another

Posted by Sameera Jayasoma <sa...@gmail.com>.
Hi vittal,

You can invoke a Web service from another Web service.

Can you provide some more information regarding this issue. Such as some
code that you have tried.

Regards,
Sameera

-- 
Sameera Jayasoma
http://sameera-jayasoma.blogspot.com/
http://www.flickr.com/photos/sameera-jayasoma