I am developing a spring boot application which contains wsdl file, here is my declaraion in pom.xml :
<wsdlUrls>
<wsdlUrl>src/main/resources/logging_service.wsdl</wsdlUrl>
</wsdlUrls>
Its working in local workspace as the webservice is creating with local directory structure for wsdl file.
But after generating war from pom.xml and if i place the war file in server, the webservice is not taking server path instead it is still taking local directory for wsdl.
Can someone tell me how to resolve this.
Related
I have a question regarding the WSO2 ESB callout mediator using an individual Axis2 configuration file. I would like to have the individual Axis2 configuration to be deployed using a carbon application. Unfortunately the callout mediator doesn't seem to be able to read the Axis2 configuration from the registry. I'm getting an error that the file axis2_blocking_client_proxy.xml can't be resolved when I deploy the carbon application that contains the mediation with my callout mediator.
The deployment works when I Quote a relative file path that points to the configuration file. Does anybody know if there is a way to tweak carbon application files so that distinct resources will be written to a dedicated directory on the WSO2 ESB Server?
Best regards,
Heiko
AFAIU, your requirement is to deploy an axis2 configuration file using a CAR (carbon application) file. This is not a recommended approach. If you need to deploy a configuration file in to the ESB, you can deploy that during the server creation time. CAR files are used to deploy the actual implementation code rather than the static configuration files.
I'm using a contract first approach to build JAX-WS Webservices. The clients pick the wsdl and xsd resources from a client jar as specified in this SO answer - https://stackoverflow.com/a/18323853/775467 by using the wsdlLocation attribute.
Is it possible to do the same on the server side. i.e is it possible to use wsdls and referred xsds from a jar in sun-jaxws.xml
<endpoint name='TestService'
implementation='provider.server.AddNumbersImpl'
wsdl='WEB-INF/wsdl/Test.wsdl'
service='{http://example.org}TestService'
port='{http://example.org}TestServicePort'
url-pattern='/test'/>
I know that I can refer to wsdls in the WEB-INF directory as in the above snippet but I don't want to package the wsdls and xsds into the WAR but would like to pick them up from a shared library jar deployed to the server in the same way how the client code picks the wsdl.
There's no possibility to change the location of the wsdl file. The wsdl attribute at sun-jaxws.xml must have the prefix "WEB-INF/wsdl". Else JAX-WS generates and publishes a new WSDL. If you take a look at the source code of jaxws-ri, you can find the implementation at the class com.sun.xml.ws.transport.http.DeploymentDescriptorParser, method getPrimaryWSDL:
...
if (wsdlFile != null) {
if (!wsdlFile.startsWith(JAXWS_WSDL_DD_DIR)) {
logger.log(Level.WARNING, "Ignoring wrong wsdl={0}. It should start with {1}. Going to generate and publish a new WSDL.", new Object[]{wsdlFile, JAXWS_WSDL_DD_DIR});
return null;
}
...
}
I am trying to deploy carbon archieve file (*.car) in wso2 ESB server.For this purpose First I am creating carbon application project in my wso2 dev studio.Then after selecting this project tried to create a web application(war file).But not able to see in the context menu options either to create a new war file or to import an existing war file.
Can somebody clarify me is it possible to deploy .war file (packaged as .car file) in the wso2 ESB server? (After configuring the server role for Application Server in the WSO2 ESB).
WSO2 ESB (Enterprise Service Bus ) is middle-ware product which is used for message routing , mediation and transformation etc. I think you can use WSO2 Application Server for deploying WAR file and use as Web/application server in your back-end.
You can download WSO2AS from http://wso2.com/products/application-server/
Also how to deploy WAR file in WSO2AS is explained here.
http://wso2.com/library/articles/2012/09/develop-deploy-web-applications-using-wso2-developer-studio/
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.
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.