Consuming webservice from application deployed on websphere - web-services

I have been trying to consume a webservice(WS-JAX) in java.
I have generated JAVA artifacts using wsimport tool. I constructed a standalone test class(on eclipse) and was able to call the webservice successfully.
But when I use the same actifacts and code in my application(deployed on websphere 8) I get below exception
`
[2/5/16 10:54:13:531 MST] FFDC Exception:java.lang.StackOverflowError SourceId:com.ibm.ejs.container.RemoteExceptionMappingStrategy.setUncheckedException ProbeId:200 Reporter:com.ibm.ejs.container.RemoteExceptionMappingStrategy#625fad44
java.lang.StackOverflowError
at java.util.HashMap.<init>(HashMap.java:367)
at com.ibm.wsdl.DefinitionImpl.getAllServices(DefinitionImpl.java:859)
at com.ibm.wsdl.DefinitionImpl.getAllServices(DefinitionImpl.java:873)
at org.apache.axis2.wsdl.util.WSDLWrapperReloadImpl.getAllServices(WSDLWrapperReloadImpl.java:903)
at org.apache.axis2.wsdl.util.WSDLDefinitionWrapper.getAllServices(WSDLDefinitionWrapper.java:478)
at com.ibm.wspolicy.wsdl.internal.subject.DefinitionSubjectProcessor.<init>(DefinitionSubjectProcessor.java:60)
at com.ibm.wspolicy.wsdl.internal.WSDLProcessorImpl.buildWSDLPolicyModel(WSDLProcessorImpl.java:79)
at com.ibm.ws.wspolicy.wsdl.WSDLProcessor.<init>(WSDLProcessor.java:137)
at com.ibm.ws.wspolicy.policyset.WSDLHelperImpl.processWSPolicyInPackagedWSDL(WSDLHelperImpl.java:80)
at com.ibm.ws.websvcs.deployment.WASAxis2PolicySetConfigurator.associatePolicySets(WASAxis2PolicySetConfigurator.java:385)
at com.ibm.ws.websvcs.client.WSClientConfigurationFactory.completeAxis2Configuration(WSClientConfigurationFactory.java:459)
at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.<init>(EndpointDescriptionImpl.java:286)
at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.<init>(EndpointDescriptionImpl.java:223)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.updateEndpointDescription(ServiceDescriptionImpl.java:534)
at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.updateEndpoint(DescriptionFactoryImpl.java:382)
at org.apache.axis2.jaxws.description.DescriptionFactory.updateEndpoint(DescriptionFactory.java:180)
at org.apache.axis2.jaxws.spi.ServiceDelegate.getPort(ServiceDelegate.java:597)
at org.apache.axis2.jaxws.spi.ServiceDelegate.getPort(ServiceDelegate.java:513)
at javax.xml.ws.Service.getPort(Service.java:99)`
Could someone shed some light on why the webservice call is failing when it is originating inside a application server?
Note: I have installed proper server certificates in the application server truststore.

So i found the solution, I had 2 different JRE's installed on my computer. One was from Oracle and the other was the jre bundled with websphere application server. For a application to be deployed on Websphere we have to generate the java artifacts using the IBM jre thats bundled with Websphere.
Thanks,
Harsha

Related

IBM Websphere webservice call from Websphere 8.5.5

While calling web service from WebSphere 8.5.5 facing below issue:
at com.ibm.wsdl.DefinitionImpl.getAllServices(DefinitionImpl.java:873)
at org.apache.axis2.wsdl.util.WSDLWrapperReloadImpl.getAllServices(WSDLWrapperReloadImpl.java:903)
at org.apache.axis2.wsdl.util.WSDLDefinitionWrapper.getAllServices(WSDLDefinitionWrapper.java:478)
at com.ibm.wspolicy.wsdl.internal.subject.DefinitionSubjectProcessor.<init>(DefinitionSubjectProcessor.java:60)
at com.ibm.wspolicy.wsdl.internal.WSDLProcessorImpl.buildWSDLPolicyModel(WSDLProcessorImpl.java:79)
at com.ibm.ws.wspolicy.wsdl.WSDLProcessor.<init>(WSDLProcessor.java:137)
at com.ibm.ws.wspolicy.policyset.WSDLHelperImpl.processWSPolicyInPackagedWSDL(WSDLHelperImpl.java:80)
at com.ibm.ws.websvcs.deployment.WASAxis2PolicySetConfigurator.associatePolicySets(WASAxis2PolicySetConfigurator.java:385)
at com.ibm.ws.websvcs.client.WSClientConfigurationFactory.completeAxis2Configuration(WSClientConfigurationFactory.java:459)
at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.<init>(EndpointDescriptionImpl.java:286)
at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.<init>(EndpointDescriptionImpl.java:223)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.updateEndpointDescription(ServiceDescriptionImpl.java:534)
at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.updateEndpoint(DescriptionFactoryImpl.java:382)
at org.apache.axis2.jaxws.description.DescriptionFactory.updateEndpoint(DescriptionFactory.java:180)
at org.apache.axis2.jaxws.spi.ServiceDelegate.getPort(ServiceDelegate.java:597)
at org.apache.axis2.jaxws.spi.ServiceDelegate.getPort(ServiceDelegate.java:513)
at javax.xml.ws.Service.getPort(Service.java:99)
Webservice call is working in java standalone project.
Till WASAxis2PolicySetConfigurator.java am able to debug and not able to find below jar file for class
com.ibm.ws.wspolicy.policyset.WSDLHelperImpl.processWSPolicyInPackagedWSDL

Invoking https web services from Glassfish 4 returns HTTPS 403 Error

I am developing a web service client with NetBeans 7.4 in Glassfish 4.0; The host server runs https (secured). I could access the WSDL in NetBeans successfully and generated the required classes. The problem is that I get a error:
com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code 403: Forbidden
when I deploy my application into Glassfish 4.0. Interestingly, this problem does not occur when I deploy into Tomcat or when I develop, build and run as a Java Desktop application.
Is there some setup I need to do on Glassfish? I noticed the host server I am accessing uses a Verisign Certificate.
Any help will be very much appreciated!
Well, after searching everywhere for a solution; I got the hint from My application on Glassfish 3.1 won't perform client authentication by removing -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as from the default glassfish domain's jvm option
Thanks!

SOAP client in IIS cannot access web services in Tomcat

I have IIS (localhost:443) and Tomcat (localhost:8080) both running on my local machine. The Tomcat contains Java web services and I can remotely debug it in Eclipse IDE. I have an application installed in my IIS and when I access the page of that application, it requests a web service in Tomcat.
The problem is that when I try to load the page (the one deployed in IIS), my Eclipse won't go to the break point, meaning no request was retrieved on the Tomcat side.
But when I try to execute a request using SoapUI, Tomcat receives it and it enters my breakpoint in Eclipse. (meaning that the web services are accessible)
I cannot debug the application in IIS so I cannot determine why it can't call the web service.
Do I need to setup Windows Firewall for it? I'm just running those apps in my local machine.
Any ideas?
I got it working. My problem was permission issues in c:\windows\temp directory. I found my answer here http://nishantrana.wordpress.com/2008/02/06/unable-to-generate-a-temporary-class-result1-error-cs2001-source-file-cwindowstempfilenamecs-could-not-be-found-error-cs2008-no-inputs-specified/

Application server with servlet 3.0 support..?

I need an Application server with Servlet 3.0 support..
Currently I am working on Tomcat but I need to know some other application servers which support Servlet 3.0..
Please help me if known
Tomcat is not an application server, just merely a servlet container. You can try GlassFish.
Jboss Application Server 7 have support for Servlet 3.0. and Few more are there

Why I can not access Axis2 service at localhost?

I am developing a Web Service project using axis2, tomcat and eclipse.
I download axis2 war package and drop it to tomcat/webapps, then I start tomcat , I can access tomcat at http://localhost:8080, but failed to access http://localhost:8080/axis2,please tell me what the problem might be.
Thanks in advance.
Set TOMCAT_HOME environment variable, Set the value to top level directory of your Tomcat install (e.g. D:\programs\apache-tomcat-6.0.29)
what error you are receiving in logs and what version of tomcat using.
If no error is there , please check , the default web services included with Axis2 will be available by visiting http://localhost:8080/axis2/services/
For reference : http://axis.apache.org/axis2/java/core/docs/installationguide.html