tomcat soapui mock web services - web-services

I have a .war file which was created from a soapui mock service via the 'deployaswar' option and deployed to Tomcat 5.5. I can successfully view the WSDL in firefox but noticed the the schemaLocation attribute for my xsd import is invalid. Here is the current URL format:
http://localhost:8080/?WSDL&interface=UserServicePortBinding&part=User.xsd
It's missing the web application name in tomcat. I verified this by constructing the correct URL and viewing the xsd:
http://localhost:8080/wartest?WSDL&interface=UserServicePortBinding&part=User.xsd
I also noticed the other references in the xsd have the same issue. How can I correct this?
thanks.

I figured this out for myself. It was a matter of using "Deploy directory or WAR file located on server" to deploy the war and setting the context path to: /
That allowed everything to work correctly.

Related

Wsdl file changed on new server

We have deployed our webservice in liberty server.Earlier it was on IBM WAS. After deploying in liberty, we came to know that Webservices is running on CXF webservice framework. In WAS, it was Axis framework.
Another difference is that , changes happened in wsdl url & content. The old wsdl url is http://localhost:8080/Hello/HelloServices/Helloservices.wsdl and it contains xsd schema definition.
In the liberty server above wsdl url is not working and throwing file not found. But if we try to invoke http://localhost:8080/Hello/HelloServices?wsdl it's working.
Could anyone tell why old url is not working in New server. Is it due to server or inbuilt cxf framework in server.
Another team is using wsdl url to consume this webservice, with this new url they are not able to achieve it.
Any thoughts or suggestions are appreciated..
Thanks in Advance
The main reason for this is the change in the JAX-WS implementations used by the different WebSphere profiles. CXF, unfortunately, hard codes the WSDL url to append ?wsdl in several locations and so this is something that is not possible to change in configuration. The easiest solution would to add a ServletFilter to check the incoming request url for http://localhost:8080/Hello/HelloServices/Helloservices.wsdl and then redirect the request to http://localhost:8080/Hello/HelloServices/Helloservices?wsdl.
There's a good SO post that shows how to write a ServletFilter to redirect here:
How to use a servlet filter in Java to change an incoming servlet request url?
The other option would be to have the client side update either their code or configuration to account for the change to the WSDL URL.

Web service not accessible after changing application name in Grails

I have a SOUP web service in my Grails application. It was accessible before changing application name in application.properties from localhost:8080/appName/Services/ but now this gives page not found error after changing the appName. I don't know why this is happening.
Are you providing the same appName in the url as in application.properties ?

Mule Service Proxy Issue

I'mm trying to proxy a service but somehow its not working the way other services did, what am I doing wrong?
This is the original service http://webservicesh.sc.gov.br/SEA/Materiais/Fardamento/WS_Materiais_v1.wsdl
What I did was:
<pattern:web-service-proxy name="BiometriaRH"
inboundAddress="http://LocalIP/services/BiometriaRH/WS_BiometriaRH_v1"
outboundAddress="http://webservicesh.sc.gov.br/SEA/RecursosHumanos/biometria/WS_BiometriaRH_v1.asmx"
wsdlFile="BiometriaRH.wsdl"/>
It does access the WSDL file but I can't load the service any place like soapUI or Eclipse...
Why do you configure wsdlFile="BiometriaRH.wsdl"? Did you manually customize it?
If not, and assuming a WSDL is served at this URL http://webservicesh.sc.gov.br/SEA/RecursosHumanos/biometria/WS_BiometriaRH_v1.asmx?wsdl , then you only need:
<pattern:web-service-proxy name="BiometriaRH"
inboundAddress="http://LocalIP/services/BiometriaRH/WS_BiometriaRH_v1"
outboundAddress="http://webservicesh.sc.gov.br/SEA/RecursosHumanos/biometria/WS_BiometriaRH_v1.asmx" />

WSO2 Governance Registry fails to deploy uploaded CAR

I created a simple CAR project that contains Proxy Service, WSDL and 2 XSDs. Proxy Service is marked with EnterpriseServiceBus server role, while WSDL and XSDs - with GovernanceRegistry role.
I am able to upload this CAR to ESB and it deploys Proxy Service as expected.
However when I try to upload the same CAR to a standalone GReg, it shows "Succesfully uploaded CAR" message but does not deploy any of the artifacts. I have the following path configured for my artifacts in artifact.xml: "/_system/governance/services/cqproxy".
Please let me know what I am missing.
Thank you!
The default configuration in Governance Registry (G-Reg) has a WSDL handler that deploys all WSDL files into /_system/governance/trunk/wsdls/..... Pls check if your WSDL is deployed into this location.
To deploy the WSDL in the registry path defined in your artifact.xml you will need to disable the handler function. This can be done in repository/conf/registry.xml file of your G-Reg distribution. Comment out the WSDL handler section that commences with
Hope this helps!
Regards,
Gillian

GlassFish, set context-path of webservice

I have EAR with my web-service. No war module in my application.
I mean
http://[host]:[port]/[context-path]/MyWebService?wsdl
For JBoss I am using jboss.xml
For WebLogic I am using weblogic-webservices.xml
What about GlassFish?
It looks like this document says to use the endpoint-address-uri to set the context-root for your web service on GlassFish... That element would go into the glassfish-ejb-jar.xml file.