The context:
I am involved with porting an application from running on WebSphere 7.0 to WebSphere 8.5.5.10. The application is calling web services.
The pattern:
When the web service endpoint is called first time it works just fine.
But on the subsequent calls it fails receiving the same SOAP request.
The error:
java.lang.IllegalArgumentException: The value for the "java.lang.Object" parameter cannot be null.
org.springframework.remoting.jaxws.JaxWsSoapFaultException:
java.lang.IllegalArgumentException: The value for the "java.lang.Object" parameter cannot be null.; nested exception is javax.xml.ws.soap.SOAPFaultException: java.lang.IllegalArgumentException: The value for the "java.lang.Object" parameter cannot be null.
at org.springframework.remoting.jaxws.JaxWsPortClientInterceptor.doInvoke(JaxWsPortClientInterceptor.java:503)
at org.springframework.remoting.jaxws.JaxWsPortClientInterceptor.invoke(JaxWsPortClientInterceptor.java:487)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
The error is inside the spring-web-3.2.17.RELEASE.jar.
Any ideas will be appreciated.
You are connecting via IHS? Maybe you have a cluster and first request is served by other WAS instance.
You might also check JDK version between WAS 7.0 and 8.5.5.10 - if both are the same like java6.
(By the way, instal Fixpack to latest 8.5.5.11)
Related
I'm getting the below exception when the JAXWS Java consumer stub constructor is invoked. When I try via. SOAPUI everything is working fine and able to get correct response. It is a web server to multiple app server (Websphere 7.x clustered) setup. Consumer code looks fine. Provider code is fine, since it works in SOAPUI. There is some problem with Web Server and web server may respond with a HTML rather then XML. App Server doesn't get the request when trying via Java consumer and no logs are there. We tested in local app server without web server setup, it works. Don't know where the problem lies? Anybody can help? I'm using Axis2 that comes with WebSphere for hosting web service. Web Sphere reads annotations in implementation class to deploy web service. Generate WSDL automatically. WSDL Location I've not specified in implementation file, if it specified not works. No configuration file (web.xml, etc.,) i provide. It is not an HTTPS web service. I'm able to telnet to the web service server and get the WSDL via telnet.
javax.xml.ws.WebServiceException: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://ip:port/AppName/ServiceName'.: (http://ip:port/AppName/ServiceName%27.:) org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.
at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:175)
at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:70)
at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:128)
at org.apache.axis2.jaxws.util.WSDL4JWrapper.loadDefinition(WSDL4JWrapper.java:754)
at org.apache.axis2.jaxws.util.WSDL4JWrapper.getDefinition(WSDL4JWrapper.java:670)
at org.apache.axis2.jaxws.util.WSDL4JWrapper.commonPartsURLConstructor(WSDL4JWrapper.java:224)
at org.apache.axis2.jaxws.util.WSDL4JWrapper.<init>(WSDL4JWrapper.java:156)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.setupWsdlDefinition(ServiceDescriptionImpl.java:1191)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.<init>(ServiceDescriptionImpl.java:245)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.<init>(ServiceDescriptionImpl.java:168)
at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(DescriptionFactoryImpl.java:142)
at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(DescriptionFactoryImpl.java:79)
at org.apache.axis2.jaxws.description.DescriptionFactory.createServiceDescription(DescriptionFactory.java:76)
at org.apache.axis2.jaxws.spi.ServiceDelegate.<init>(ServiceDelegate.java:212)
at org.apache.axis2.jaxws.spi.Provider.createServiceDelegate(Provider.java:71)
at javax.xml.ws.Service.<init>(Service.java:67)
at somepackage.servicename.<init>(servicename.java:42)...more are here hidden to maintain confidential
Caused by:
javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://ip:port/AppName/ServiceName'.: (http://ip:port/AppName/ServiceName%27.:) org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.
at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2315)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2390)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2356)
at org.apache.axis2.jaxws.util.WSDL4JWrapper$13.run(WSDL4JWrapper.java:745)
at org.apache.axis2.java.security.AccessController.doPrivileged(AccessController.java:132)
at org.apache.axis2.jaxws.util.WSDL4JWrapper.loadDefinition(WSDL4JWrapper.java:742)
... 70 more
Caused by:
org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2305)
... 75 more </pre>
I'm not sure what's going wrong with wsdl retrieval for you, but if you can extract the wsdl (and any files it imports) from the remote service and just package them with your client directly, that will avoid retrieving the wsdl from the remote service for each invocation, which besides not working in your case, also degrades performance. Your client wsdllocation would change to file:///(something). If you're using a developer tool like RAD or WDT, it has an option to automatically retrieve the wsdl and package it with the client.
I am facing problem in calling webservice in my project which is deployed in weblogic, but the same application works fine in tomcat deployment.
Error:
javax.xml.ws.WebServiceException: Failed to access the WSDL at: XXXservices?wsdl. It failed with:
Response: '401: Unauthorized' for url: '://xxx.xxx.xxx.xx:8111/xxx/services?wsdl'.
But same works fine in Tomcat deployment.
I search in the net. people said, we need to force weblogic to use sun http handler, so written something like below. but its not works for me.
sun.net.www.protocol.http.Handler handler = new sun.net.www.protocol.http.Handler();
URL wsdlURL = new URL(null, "http://xxx.xxx.xxx.xx:8111/xxx/services?wsdl", handler);
HttpResponse code 401 denotes that authorization has been refused for the credentials. By default, Weblogic has basic authentication enabled. You can disable it as follows
Setting the enforce-valid-basic-auth-credentials Flag
To set the e enforce-valid-basic-auth-credentials flag, perform the following steps:
Add the <enforce-valid-basic-auth-credentials> element to config.xml within the <security-configuration> element :
<enforce-valid-basic-auth-credentials>
false
</enforce-valid-basic-auth-credentials>
Start or restart all of the servers in the domain. Please go through this link for good understanding
now I have this new problem. I´m using Glassfish 3.1.2.2 to host an application that has a Web Service to communicate with another application outside the server, mainly a swing desktop application. Every thing works fine, but (always a but), if we need to restart the glassfish for some reason, the destop application didn't find the ws, so we need to redeploy the application in the Glassfish and every thing works fine again.
At the begining we thought that was a problem in the desktop client, so we refresh the connection to the web service, nothing. After that, we tested the web service from the netbeans option to do that and we get this warning:
The solution that we found was to redeploy the application, as you guest, when the application will be in production this is not a aceptable solution.
My application is build with jdk 7.0.21, using Netbeans 7.3, JSF 2.0, PrimeFaces 3.5, JPA 2.0, the web service was constructed following this tutorial.
This is the message received in the log of the desktop test application:
Exception in thread "AWT-EventQueue-0" com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 404: Not Found
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.checkStatusCode(HttpTransportPipe.java:296)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.createResponsePacket(HttpTransportPipe.java:245)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:203)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:122)
at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:95)
at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:626)
at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:585)
at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:570)
at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:467)
at com.sun.xml.internal.ws.client.Stub.process(Stub.java:308)
at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(SEIStub.java:146)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:98)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:129)
at com.sun.proxy.$Proxy30.hello(Unknown Source)
at com.spontecorp.testws.TestWSFrame.invokeWSButtonActionPerformed(TestWSFrame.java:137)
at com.spontecorp.testws.TestWSFrame.access$100(TestWSFrame.java:14)
at com.spontecorp.testws.TestWSFrame$2.actionPerformed(TestWSFrame.java:62)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.awt.EventQueue$3.run(EventQueue.java:686)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:702)
at java.awt.EventQueue$4.run(EventQueue.java:700)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
My question is:
- Do I need to setup something in Glassfish after deployment an application that serves a web service?, if so, where?
Had the same problem after refractoring, had to create a new webservice at server (and then just copy the old code), after that I re-imported the new WSDL and made the right changes to the code (to the new name of the webservice).
Problem was, for me at least, that after refractoring I couldn't call
com.package.class.MyWebService_Service service;
Dont know why, and there is probably a better solution for this instead of "recreating".
I don't know if this helps you in your case, but at least the tutorial didn't work for me either out-of-the-box. The error I got was the same: "com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 404: Not Found".
I managed to get the web service client working by re-creating the reference to the web service. The problem was that it referred to http://localhost:8080/FlowerAlbumService/FlowerService?wsdl but the service was running on http://localhost:8080/FlowerServiceService/FlowerService?wsdl (you can see this by testing the web service).
So I deleted the web service in the Client's Web Service References node, created a new web service client, and specified http://localhost:8080/FlowerServiceService/FlowerService?wsdl as the WSDL URL. Perhaps this helps to solve your problem, too.
Web service - Service is on WAS v7. Client is on JBoss v5. We recently upgraded to JBossWS 3.3.1. Since then the client is unable to communicate with the service on WAS.
Without any changes to code, we get the below exception
2012-01-19 14:42:15,317 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS]->error#419 (ajp-cwsappdev01%2F205.132.14.29-8109-1)
SOAP request exception java.io.IOException:
Error initializing socket factory SSL context: Can not find truststore url.
Added the following lines of code to the client:
((BindingProvider) impl).getRequestContext().put(StubExt.PROPERTY_KEY_STORE, "/usr/local/jee/.../cacerts"));
((BindingProvider) impl).getRequestContext().put(StubExt.PROPERTY_KEY_STORE_PASSWORD, "*****"));
((BindingProvider) impl).getRequestContext().put(StubExt.PROPERTY_CHUNKED_ENCODING_SIZE, "0");
After making the code change, am getting the below error:
Caused by: org.jboss.ws.WSException: Invalid HTTP server response [404] - Not Found
Any ideas? I added the chunked encoding property, as WAS does not support it properly. Any other incompatibility between JBoss and WebSphere App Server?
Thanks for your help in advance!
==================
I made some code changes and am now getting the below message. I use JBossWS-Native 3.3.1 and JAX-WS 2.1 versions. Does any one know how I can disable chunked encoding in JBoss?
File standard-jaxws-client-config.xml moved into one of JBoss the core JARS - updating it would need me to 'unjar' - edit file - and jar back again.
2012-01-24 10:35:57,930 WARN [org.jboss.ws.core.client.transport.NettyClient]->warn#352 (ajp-cwsappdev01%2F205.132.14.29-8109-4) Can't set chunk size from call properties, illegal value provided!
2012-01-24 10:35:58,001 ERROR [org.jboss.ws.core.CommonClient]->error#419 (ajp-cwsappdev01%2F205.132.14.29-8109-4) Exception caught while (preparing for) performing the invocation:
java.io.IOException: Could not transmit message
at org.jboss.ws.core.client.transport.NettyClient.invokeInternal(NettyClient.java:229)
at org.jboss.ws.core.client.transport.NettyClient.invoke(NettyClient.java:121)
at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:150)
at org.jboss.ws.core.client.SOAPProtocolConnectionHTTP.invoke(SOAPProtocolConnectionHTTP.java:69)
at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:369)
at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:302)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:181)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:161)
at $Proxy796.getCWSAccount(Unknown Source)
Cause: Although the client had port specified as 8004 in the endpoint URL; when the request hit the service it was coming in for port 443. We moved/"attached" the service to port 443 and the web server was able to map it to the right application. will need to figure out why/where the endpoint was changed fro 8004 to 443..
We are trying to consume an ASP.NET web service from our CF box and are running into odd issues.
<cfinvoke webservice="http://myserver.mine.com/myservice.asmx?WSDL" method="ImportData" returnvariable="ImportDataCompleted">
<cfinvokeargument name="importJobName" value="job1">
<cfinvokeargument name="force" value="false">
If we run this from a version 9 box, it will work just fine, however, when I run on MX, I get the following error:
Could not perform web service invocation "ImportData" because AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}VersionMismatch faultSubcode: faultString: Possible SOAP version mismatch: Envelope namespace http://www.w3.org/2002/12/soap-envelope was unexpected. Expecting http://schemas.xmlsoap.org/soap/envelope/. faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}VersionMismatch faultSubcode: faultString: Possible SOAP version mismatch: Envelope namespace http://www.w3.org/2002/12/soap-envelope was unexpected. Expecting http://schemas.xmlsoap.org/soap/envelope/. faultActor: faultNode: faultDetail: Possible SOAP version mismatch: Envelope namespace http://www.w3.org/2002/12/soap-envelope was unexpected. Expecting http://schemas.xmlsoap.org/soap/envelope/. at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169) at org.ap...
I have cleared the web services in the administrator, and they do repopulate, but still the error. Any ideas?!
It looks like this is happening because the version of MX you're using is running SOAP 1.1 and ColdFusion 9 is running SOAP 1.2. (Note the text in your error: Possible SOAP version mismatch.)
I'm not familiar with SOAP, but it looks like there are some other differences between the two that you might want to read about. There is a related question that suggests that earlier versions of CF, at least, do not (or did not) support 1.2.
If you are using ColdFusion MX 6.1, you will not be able to consume web services using the cfinvoke tag. The engineers at Adobe/Macromedia didn't include that functionality until CFMX 7.
You will be required to use Java stubs. See this link.
Once you have created the stubs you need to compile them using Java 1.4 (you can use ColdFusion's internal jdk to do so). Then, create a jar file and deploy it to you instance of ColdFusion, normally ./runtime/lib/. Restart ColdFusion and create an object using CFObject. Then call the web service's methods using the Java object your just created.