axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maicon Stihler" <stih...@gmail.com>
Subject Re: Webservice Client not working from inside Tomcat5
Date Wed, 23 Jan 2008 17:21:49 GMT
I remember having a similar problem in the past... I'm not sure if it
is the same, but try setting up the Action header on your client to
match that of your target web service (eg.
options.setAction("urn:yourservice") ) and make sure it is the same
that is on your service.xml.

I think it has something to do with ws-addressing.

Best Regards

2008/1/23, Callaway, Pamela <pcallaway@hbs.edu>:
> I turned up the logging to debug level, and now I see an exception in the log:
> - Enter: Call::invoke()
> - MessageContext: setTargetService(ProjectDataSoap)
> - org.apache.axis.i18n.resource::handleGetObject(noService10)
> - Exception:
> org.apache.axis.ConfigurationException: No service named ProjectDataSoap is available
> org.apache.axis.ConfigurationException: No service named ProjectDataSoap is available
>         at org.apache.axis.configuration.FileProvider.getService(FileProvider.java:233)
>         at org.apache.axis.AxisEngine.getService(AxisEngine.java:311)
>         at org.apache.axis.MessageContext.setTargetService(MessageContext.java:756)
>         at org.apache.axis.client.Call.invoke(Call.java:2690)
>         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 com.xxx.www.projectdata.ProjectDataSoapStub.login(ProjectDataSoapStub.java:2981)
>
> Is there something else I need to configure when trying to call the client
> from a JSP?  This doesn't happen when I run the JUnit test on the client.
>
> Thank you!
>
> Pam
>
> -----Original Message-----
> From: Callaway, Pamela [mailto:pcallaway@hbs.edu]
> Sent: Wednesday, January 23, 2008 11:17 AM
> To: axis-user@ws.apache.org
> Subject: RE: Webservice Client not working from inside Tomcat5
>
> Hi, thanks for the response.  Tomcat is running as a service.  I'm not seeing any errors
in the Tomcat logs, nor am I getting any RemoteExceptions or ServiceExceptions.  I just get
back a null response from the call.  I was able to step through in a debugger and inside the
generated WSDL client as far as the stub, and the stub gets a response that is null.   The
IDs come in okay, as far as I can tell, and when I run this locally as a JUnit test it works...
 This is the generated stub - _resp just comes back null.
>
> public com.xxx.www.projectdata.GetResponseResponseGetResponseResult getResponse(int projectId,
long recordId) throws java.rmi.RemoteException {
>         if (super.cachedEndpoint == null) {
>             throw new org.apache.axis.NoEndPointException();
>         }
>         org.apache.axis.client.Call _call = createCall();
>         _call.setOperation(_operations[20]);
>         _call.setUseSOAPAction(true);
>         _call.setSOAPActionURI("http://www.xxx.com/Pdc.WS/GetResponse");
>         _call.setEncodingStyle(null);
>         _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
>         _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
>         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
>         _call.setOperationName(new javax.xml.namespace.QName("http://www.xxx.com/Pdc.WS",
"GetResponse"));
>
>         setRequestHeaders(_call);
>         setAttachments(_call);
>  try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Integer(projectId),
new java.lang.Long(recordId)});
>
>         if (_resp instanceof java.rmi.RemoteException) {
>             throw (java.rmi.RemoteException)_resp;
>         }
>         else {
>             extractAttachments(_call);
>             try {
>                 return (com.xxx.www.projectdata.GetResponseResponseGetResponseResult)
_resp;
>             } catch (java.lang.Exception _exception) {
>                 return (com.xxx.www.projectdata.GetResponseResponseGetResponseResult)
org.apache.axis.utils.JavaUtils.convert(_resp, com.xxx.www.projectdata.GetResponseResponseGetResponseResult.class);
>             }
>         }
>   } catch (org.apache.axis.AxisFault axisFaultException) {
>   throw axisFaultException;
> }
>
> -----Original Message-----
> From: news [mailto:news@ger.gmane.org] On Behalf Of Stephen Souness
> Sent: Sunday, January 20, 2008 4:20 PM
> To: axis-user@ws.apache.org
> Subject: Re: Webservice Client not working from inside Tomcat5
>
> Is there anything showing up in Tomcat's logs?
>
> Is the Tomcat process running as a service, or as a user that may not be
> able to establish network connections?
>
> Are all of the jars that the web service client requires included in
> your web app?
>
>
> --
> Stephen
>
>
> Callaway, Pamela wrote:
> > Hi folks,
> >
> >
> >
> > I am encountering a strange problem with my webservice client that I
> > generated using wsdl2java.  It works fine from the command line or as a
> > JUnit test, but when I try and use it from a JSP file, it doesn't return
> > a result.  Exactly the same code, no differences that I can find, except
> > that I want to call it from the JSP and not a JUnit test case.
> >
> >
> >
> >  I am using Tomcat5 and Java 1.5, doing my development work on a windows
> > box.  I wrapped the webservice up into a JAR file, which I'm then
> > including in the web project, and I made a simple helper class so that I
> > could use exactly the same code to call the webservice from the JUnit
> > test cases or from the JSP.
> >
> >
> >
> > Any thoughts on why this could be?  I am really at my wits end.
> >
> >
> >
> > Thanks,
> >
> >
> >
> > Pam
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message