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 <[EMAIL PROTECTED]> wrote:
> Thankyou for the resolution.
> I will try with the SAAJ and get back with the
> result.
>
> Thanking you,
> Vittal
>
> --- Joe Nathan <[EMAIL PROTECTED]> 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:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
>
>
>
>
>
____________________________________________________________________________________
> 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:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo!
FareChase.
http://farechase.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]