[JBossWS] - Re: Generate wsdl from JSR 181 POJO
by allantodd
Hi,
I've been looking at this too over the last few days. The easiest way I can find is to do the following:
1) Compile your annotated JSR 181 pojo
2) Create a war file containing just the pojo class and web.xml
3) Deploy the war file and use your browser to get the WSDL by browsing to, for example, http://localhost:8080/jaxws-samples-jsr181pojo/TestService?wsdl
4) Save the WSDL and use this to generate the endpoint interface, JAX-RPC mapping, etc as per the example in the JBossWS user guide.
If you look at the war file created by the JSR181 POJO example, you will see that it doesn't include the supplied WSDL file. The WSDL file is provided just for use by wstools, and is basically identical to the one you will get from your browser.
| jar tvf output/libs/jaxws-samples-jsr181pojo.war
|
| META-INF/
| META-INF/MANIFEST.MF
| WEB-INF/
| WEB-INF/web.xml
| WEB-INF/classes/
| WEB-INF/classes/org/
| WEB-INF/classes/org/jboss/
| WEB-INF/classes/org/jboss/test/
| WEB-INF/classes/org/jboss/test/ws/
| WEB-INF/classes/org/jboss/test/ws/jaxws/
| WEB-INF/classes/org/jboss/test/ws/jaxws/samples/
| WEB-INF/classes/org/jboss/test/ws/jaxws/samples/jsr181pojo/
| WEB-INF/classes/org/jboss/test/ws/jaxws/samples/jsr181pojo/JSEBean01.class
|
It ought to be possible to get hold of the WSDL some other way, but I haven't figured it out yet. A bit of a shortcoming in the example I think.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022351#4022351
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022351
17 years, 10 months
[JBossWS] - .Net interoperability INFO
by ragsta
Hi all,
maybe this can help someone.
I'm involved in a project task that requires my jboss web application to connect to a remote Microsoft WebService.
The web service signature is:
public System.Xml.XmlElement HelloWorld(Request req)
The Microsoft way to describe this kind of return element in the WSDL is:
<s:element name="HelloWorldResponse">
| <s:complexType>
| <s:sequence>
| <s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult">
| <s:complexType>
| <s:sequence>
| <s:any />
| </s:sequence>
| </s:complexType>
| </s:element>
| </s:sequence>
| </s:complexType>
| </s:element>
This is not well handled by Wstools (wsdl-->java).
The result is that you can call the webservice but the jboss webservice stack cannot handle the response.
To solve the problem you have to manually modify this wsdl fragment in:
<s:element name="HelloWorldResponse" type="s:anyType"/>
Note: this is not a Microsoft fault..infact XmlSpy validate this WSDL and different java web services stacks like Xfire handle it correctly.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021028#4021028
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021028
17 years, 10 months