I'm trying to create a web service, as I am new to web service development I followed the following post.
I am using Ecplise Helios,Windows 7 32 bit,Tomcat v6.0
There are three steps:
1.Create Dynamic Web project.
2. Create Web Service Provider Java Class.
3.Create a Web Service.
At point 3.create a Web service I am getting two error:
1.Several ports (8080, 8009) required by Tomcat v6.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).
This error has been resolved using one of the community post.
2.IWAB0014E Unexpected exception occurred.
The char '0x0' after 'return code: 400
Cycle Detected
Cycle Detected
Description: Your request is prohibited because it would cause a cycle.
' is not a valid XML character.
java.lang.IllegalArgumentException: The char '0x0' after 'return code: 400
<HEAD><TITLE>Cycle Detected</TITLE></HEAD>
<BODY BGCOLOR="white" FGCOLOR="black"><H1>Cycle Detected</H1><HR>
<FONT FACE="Helvetica,Arial"><B>
Description: Your request is prohibited because it would cause a cycle.</B></FONT>
This error is some what similar to this post but the error code returned is different in my case it is "400"
Any tips on how to resolve this would be greatly appreciated.
This is happening because of improper setup of Axis2.
Steps:
Download Axis2 : Link--> http://ws.apache.org/axis2/download.cgi
Point the Axis2 runtime dir in eclipse : Menu--> Windows--> Preference --> Web Services--> Axis2 Preferences
Follow this link for more details: http://www.eclipse.org/webtools/community/tutorials/BottomUpAxis2WebService/bu_tutorial.html
Related
We have implemented webservice call using JAX-WS RI 2.1.6 in JDK 6 now problem comes when we enable https webservice call stops reaching server and java reports following error,
javax.xml.ws.WebServiceException: java.io.IOException: Async IO
operation failed (3), reason: RC: 55 The specified network resource
or device is no longer available.
Now I have tested this within SoapUI and response from the service is received there.
Looked into various solution where it tells us to provide timeout settings but nothing seems work.
#WebEndpoint(name = "RulesSoap")
public RulesSoap getRulesSoap() {
((BindingProvider)super.getPort(new QName("urn:decision:Rules", "RulesSoap"), RulesSoap.class)).getRequestContext().put("com.sun.xml.internal.ws.connect.timeout", 1000);
((BindingProvider)super.getPort(new QName("urn:decision:Rules", "RulesSoap"), RulesSoap.class)).getRequestContext().put("com.sun.xml.internal.ws.request.timeout", 1000);
return super.getPort(new QName("urn:decision:Rules", "RulesSoap"), RulesSoap.class);
}
And just for information JAX-WS implementation is following few simple lines,
of course we submit all necessary data into respective stubs and all but I am not submitting here because our http calls are getting through,
Rules rules = new Rules(new URL(url), new QName("urn:decision:Rules", "Rules"));
RulesSoap rulesSoap = rules.getRulesSoap();
CorticonResponse response = rulesSoap.processRequest(request);
Note : Our application server WebSphere Application Server and Version 7.0.0.19
Thanks in Advance.
After lots of efforts we resolved this. I will provide steps if anything related to this happens how to find root cause,
Step 1 :
First of all we enabled soap tracing in WebSphere Application Server by following setting,
Admin Console > Servers > Server Types > WebSphere Application Servers >
{your server} > Troubleshooting > Change Log Detail Levels > Runtime
In run time please put this , *=info: com.ibm.ws.websvcs.*=all: org.apache.axis2.jaxws.*=all
This step will create trace.log file in your logs folder.
Now any web service request which goes out of your server will add logs to this file and necessary props like endpoint, request, response etc.
Step 2 :
Reading this trace.log file we found following endpoint,
PropertyValid 1 org.apache.axis2.jaxws.client.PropertyValidator validate validate property=(javax.xml.ws.service.endpoint.address) with value=(http://uxm.solutions.lnet.com:9445/axis/dswsdl/Rules/1/0)
HTTPConnectio 3 resetConnection : http://uxm.solutions.lnet.com:9445/axis/dswsdl/Rules/1/0 Persistent : true
Now if you notice here that our soap has endpoint address javax.xml.ws.service.endpoint.address where protocol is still using http which causes to fail ssl handshake.
Step 3 :
Solution for this is to override endpoint inside your soap stubs which can be implemented by adding following line,
RulesSoap rulesSoap = rules.getRulesSoap();
((BindingProvider)rulesSoap).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "https://uxm.solutions.lnet.com:9445/axis/dswsdl/Rules/1/0");
Conclusion :
So here is what i think even we pass https url while we are creating objects but still does not take this https url on runtime, to me this looks like stubs creation issue with JAX-WS.
Thanks.
What protocol /ciphers are you using? You have mentioned there is connection to webservice on WAS7 with JDK6 and Java 6 does not support TLS1.2 (and TLS1.1 only from certain fixpack).
See this:
How to use TLS 1.2 in Java 6
Yesterday if was opening http://my-ip:3000/solr then the home page is opening of Solr.
But today I restarted VM after that is showing me like that.
HTTP ERROR: 404
Problem accessing /solr. Reason:
Not Found
Powered by Jetty://
If I run this URL http://my-ip:3000 then it shows me
Error 404 - Not Found.
No context on this server matched or handled this request.
Contexts known to this server are:
Powered by Jetty:// Java Web Server
I checked Jetty and it is running fine.
Now I'm confused whats not running. I'm new to Solr. Please help me?
Solr page is now opening on this URL http://my-ip:3000/solr
And showing me 4.4
I killed java process then it starts working
You may need going to the Solr directory: cd solr-6.2.0/ and launching it: bin/solr start The Solr admin UI will run on the port 8983 by default: http://localhost:8983/solr/. However, the support for deploying Solr 5.0 and newer on Jetty is unsuported, so you might consider another solution, without Jetty.
In Eclipse,
"org.apache.axis2.AxisFault: Transport error: 403 Error: Forbidden"
Error occured while trying to check out a project from svn.
I colud not achieve this error and therefore I checked out the project from terminal using "svn -co" command.
But, the funny side is that, when I try to run the application from within Eclipse, I've faced w/ same error again right after I entered my credentials (username and passwd) and pressed "Login" button. The response was Invalid username/password on the JFrame, but credentials was not wrong.
This happens only in Eclipse. I can access SVN through web browser with same credentials.
And I set proxies same as web browser.
I am not able to overcome this situation furthermore.
As to give info, I am on a virtual machine(MAC OS X Lion) through win7
Please provide some solutions to me asap.
Thanks.
Here is the full stack-trace :
org.apache.axis2.AxisFault: Transport error: 403 Error: Tunnel or SSL Forbidden
at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:310)
~[axis2-transport-http-1.6.2.jar:na]
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:194)
~[axis2-transport-http-1.6.2.jar:na]
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
~[axis2-transport-http-1.6.2.jar:na]
atorg.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:404)
~[axis2-transport-http-1.6.2.jar:na]
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:231)
~[axis2-transport-http-1.6.2.jar:na]
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
~[axis2-1.6.2.jar:na]
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
~[axis2-1.6.2.jar:na]
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
~[axis2-1.6.2.jar:na]
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
~[axis2-1.6.2.jar:na]
at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:555)
~[axis2-1.6.2.jar:na]
at org.apache.rahas.client.STSClient.requestSecurityToken(STSClient.java:154)
~[rampart-trust-1.6.2.jar:1.6.2]
at tr.org.abc.sts.client.ESBSTSClient.issueToken(ESBSTSClient.java:103)
[ServiceClient-1.1.0.7-SNAPSHOT.jar:na]
at tr.org.abc.sts.client.ESBSTSClient.validateUser(ESBSTSClient.java:92)
[ServiceClient-1.1.0.7-SNAPSHOT.jar:na]
I see this post is from a while ago. Not sure if you have resolved it yet.
I had a similar situation today with the same error via Eclipse, but it was on an app calling a SOAP WS endpoint through SSL, instead of SVN.
On further debugging, I found that was indeed the problem - null or wrong credentials. I would suggest you look back into your login credentials, SVN connectivity and other environmental issues with a notion that your credentials aren't reaching the SVN server.
"org.apache.axis2.AxisFault: Transport error: 403 Error: Forbidden"
Error occured while trying to check out a project from svn.
Are you trying to checkout a project from SVN server using Axis2?
From Wikipedia:
Apache HTTP Server as network server, WebDAV/Delta-V for protocol.
There is also an independent server process called svnserve that uses
a custom protocol over TCP/IP.
Apache Axis2 is designed for working with Web Services / SOAP / WSDL engine (client, server) is not intended for WebDAV services.
If you only want to checkout a project from a WebDAV SVN server in eclipse you can use Subversive with SVNKit. If you are developing a SVN client to perform operations like checkout you can use a Java library like SVNKit or JSVN, both have an implementation of authenticators to login and work with SVN servers.
Hi I'm develping a web app in Java for a local bank and they have a SOAP Web Service that my app consumes. The app is deployed on GlassFish 3.1.2 and the web service was generated on .Net (I don't know the specifics, I'm new to the project) and everything is connected through a peer to peer VPN.
Now the issue I have is when I try to log in I get an EJBException:
javax.faces.el.EvaluationException: javax.ejb.EJBException
Caused by: com.sun.xml.ws.fault.ServerSOAPFaultException: Client received SOAP Fault from server: Server was unable to process request. ---> Changes to this object and its sub-objects have been disabled (Exception from HRESULT: 0x8011042A) Please see the server log to find more detail regarding exact cause of the failure.
Now I'm trying to determine what exactly is the problem with the web service, or even better what should the guys at the bank check to determine what's wrong.
If anyone knows or has some ideas on what we should check please let me know. Thanks
Seems to be server problem. Send them exactly time stamp of request and all the request details, and they will probably guide you to the problem
I am trying to invoke a web service that I have just hosted on out linux redhat server but it throws the error {http://xml.apache.org/axis/}stackTrace:Exception occurred while trying to invoke service method + "methodname"
I host the service in apache tomcat webserver
The same service works fine when i host it in the windows xp environment with the same apache web server...
Is there anyone who has experienced a similar problem.
thanks..
in the axis2.xml ...
<parameter name="sendStacktraceDetailsWithFaults">false</parameter>
set the sendStacktraceDetailsWithFaults parameter to true and you should get a copy of the stacktrace in the response (reset to false for production)
I have experienced something similar. Our dev environment was running JBoss and Ubuntu, and prod/test was running Red Hat, Apache in front and JBoss.
Prod/test was running https with certificates, and our problem was that our certificates where out of date. When we fixed that, the webservice calls got through.
Maybe thats your problem?
Another thing you should do to debug is see if the wsdl is deployed and check what the webservice address it is deployed under. Maybe the address is very different in prod?
For instance in JBoss if you go to
http://localhost:8080/jbossws/services you will see all the services that are deployed and what url they have.