Websphere 8.5 JAX-WS WSDL redirect - redirect

I got a SOAP web service with code first approach running with the built in JAX-WS implementation in Websphere 6.1.
The service was migrated from Websphere version 6.1 to version 8.5.
Formerly (version 6.1) the WSDL was available directly at the URL
[...]/services/SomeService?wsdl
Since migrating to version 8.5 the WSDL is still available via aforesaid URL, but a redirect is being made to
[...]/services/Services_002f_SomeService.wsdl
A client needs to access the WSDL before each request that is being made to the web service and is not getting on with the redirect (i.e. with the [...]?wsdl-URL), so he needs the redirected URL. (This is something I'm having no bearing on, unfortunately... )
Problem is that the '002f' part in the redirected URL is dynamic and might be changed by Websphere. (It did already in our testing environment.)
Does anybody know an option that prevents Websphere from the aforementioned redirect?

I finally found the reason for the weird '002f' characters in the redirect URL.
It is due to the given serviceName services/SomeService
#WebService (targetNamespace="http://example.net/", serviceName="services/SomeService")
\u002f is the '/' character in UTF8
So redirect goes to [...]/services/SomeService/Services_002fSomeService.wsdl and is reasonable.
The info of a possibly changing redirect URL to ...003f..., ...004f..., etc. which I got is obviously wrong.
Though not redirecting would not have caused any troubles at all and I don't know why the new JAX-WS implementation in WAS 8.5 really has to do that, I' coming to terms with just giving the (as I know know) static '002f' WSDL URL to the client.

Related

Unable to return 301 using TomEE when redirecting from http to https

Currently have a JSF web app deployed on apache-tomee-webprofile-1.7.4. Have setup servlet.xml with the 8080 and 8443 Connectors and transport-guarantee CONFIDENTIAL section in web.xml to redirect all http requests to https. This is working successfully.
Only problem is that it is returning a 302 (temporary) rather than 301 (permanent) response.
A fix is available for Tomcat 7.0.70 and beyond (59399) https://bz.apache.org/bugzilla/show_bug.cgi?id=59399 which allowed you to specify a transportGuaranteeRedirectStatus="301" attribute against the Realm in the server.xml
I setup 7.0.70 with a simple web app, just using a single html file and basic web.xml with the security-constraint added, and this redirected successfully to 301. When I dropped in the tomee.war file, installed tomee, then this reverted to 302.
Have also tried the latest 7.1.0 of TomEE but this also returns a 302.
Hoping that someone has overcome this using TomEE specifically as I know vanilla Tomcat is ok, and hopefully 1.7.4.
Thanks in advance

http status 302 error in tomcat eclipse

I am developing a Telco application (Dyanamic Web application project to send and receive sms) using Eclipse & tomcate version 7
When I try to run it on
http://localhost:8080/SMS1
It gives an error message HTTP-ERROR-CODE:302
What should I do to resolve this error
This is the link to Application and video tutorial what I am following
https://drive.google.com/file/d/0B3VmCeqDC7SDcFZaWVZhRUNmaTQ/edit?usp=sharing
HTTP code 302 is a standard "redirect" message--that is, it tells your web browser that the page was moved and where the new page can be found. I'm guessing whatever you're using as a web browser (Eclipse?) just doesn't handle that type of redirect. Try using a standard web browser like Chrome or Mozilla to see if that helps...
Also a guess, but the redirect may be trying to move you to HTTPS instead of HTTP, and your certificates may not be set up properly, or the port isn't enabled, or there may be some other problem with your HTTPS configuration. If the app is supposed to work over HTTPS, try going directly to the HTTPS version of the link to see if that's the real issue.
A third guess is the app may be trying to redirect you to a login page if you're not logged in, and maybe it can't find it. I'd need to know a lot more about the built product and I really don't want to mess with some guy's shared Eclipse project. Tell them to use a build tool!

Error Parsing WSDL - Worklight 6.1 - Backend Discovery Service

Testing the new backend discovery feature in WL6.1 used for a web service (SOAP) connection, we found a wrong import procedures from WSDL parsing. In particular, for each procedure offered by the SOAP server and exposed in the related WSDL the backend discovery service found only one input/output parameter although the procedures are composed of more than one input parameter. The problem seems to be a misinterpretation of the WSDL associated with the SOAP server.
thanks,
Here the WSDL:
https://dl.dropboxusercontent.com/u/15425546/Ws_StoreSurfer.xml
Is seems that WL v6.1 indeed has a problem with muli-parts and showing only one part of the input/output of a procedure.
Tested it with a new version of WL (not yet released) and it seems like the problem has already been addressed (see below). You will therefore get it solved in the next update of your Worklight Studio.
If you are an IBM business partner or customer you can open a PMR and request an intermittent iFix.

Soap web service client

We are integrating our software with another company using a webservice. They created a SOAP web service which we now need to test.
I'm trying to write a java program with Eclipse IDE. When creating a web service client, I enter the wsdl:
[https://xxxxxxxxx/xxxxxxx/index.php/gt/property/soap?wsdl]*
but I keep getting a message that states: The service definition is invalid.
Any ideas as to why this would be or any links I could check out would be appreciated. I have searched but haven't found anything that helped me yet.
Thanks!
If you are going for a Java program you could use,
Web service client given WSDL
But if you just want to test the web service, you could always use program like SoapUI

JAXWS style Web Service client jar not working inside a webapp

I have created a web service client project with the netbeans 6.9.1. The jar works like a charm when I run it directly from netbeans or from the console with java -jar. But when I put this jar into a webapplication as a library, It doesn't work. Actually, here is the weird thing about it, I have monitored the network traffic and saw that the responses on both sides are the same, but somehow when the jar is inside a webapp or working from an application server it doesn't manages to parse the response I think.
Long story in short,
The web service client code generated inside netbeans jaxws style(2.1) works by itself, But when it's called inside a web application within an application server , the response methods such as getsomething which resides in the response as sdfds doesn't work, but they work when runned separately. And the responses are exactly the same when I monitor the network traffics.
Can anyone help about this weird situation.
Thanks.
Edit: Also I discovered an exception:
com.sun.xml.internal.messaging.saaj.soap.impl.TextImpl cannot be cast to javax.xml.soap.SOAPElement
Which is not thrown anywhere in my local, bu only running at application servers. Tomcat or weblogic , both.
I encountered the exact sample problem in my SOAPHandler class. It turned out that the white space in the SOAP body is what cause this problem. Below are my SOAP request example from SOAPUI:
username
password
1
usa
75044
vn
usa
75034
SOAP request without white space in SOAP body:
username
password
1usa75044vnusa75034