my dog learned polymorphism*
The moose likes Web Services and the fly likes wsdl: how do i generate wsdl that places the type info in the main body instead of using xsd:import? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "wsdl: how do i generate wsdl that places the type info in the main body instead of using xsd:import?" Watch "wsdl: how do i generate wsdl that places the type info in the main body instead of using xsd:import?" New topic
Author

wsdl: how do i generate wsdl that places the type info in the main body instead of using xsd:import?

mat buckland
Greenhorn

Joined: Sep 01, 2009
Posts: 24
I've created a webservice, which I'm trying to access using an Actionscript 3.0 client.

Unfortunately the client cannot parse the wsdl since it trips up on the import here:

<xsd:schema>
<xsd:import namespace="http://test.co.uk/" schemaLocation="http://localhost:9875/TestServer?xsd=1"/>
</xsd:schema>

However the AS3 client can access the Amzon SOAP service fine, which I've noticed does not do the import.

Thanks for any help
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Is it an option to generate the WSDL, then copy and paste the associated type information into the WSDL?
If so, then:
1. Place the modified WSDL in the WEB-INF/wsdl directory of your web service project.
2. Specify the WSDL of the web service in the @WebService annotation, using the wsdlLocation attribute.

Another alternative would be to deploy to GlassFish, which fixes WSDL and XSD locations on the fly, as the WSDL is requested.
Hope this helps!
Best wishes!
Ashish Yadav
Greenhorn

Joined: Sep 09, 2009
Posts: 3
Hi,

You can generate a single WSDL instead of a wrapped one. For me the server was generating 2 wsdls due to difference in name space of SEI and implementation classes, if you carefully define namespaces, server will generate only one wsdl.

Thanks
Ashish
Prasanna Wamanacharya
Ranch Hand

Joined: Apr 24, 2001
Posts: 143
Hello,

I'm facing a similar problem on Websphere Application Server (WAS) 7. If I run wsimport on the machine which is running WAS, the client-side artifacts get generated properly. However, if I run wsimport on the client machine, it gives foll. error -



The wsimport command on the client machine is able to access the generated WSDL, but is not able to find the XSD.

Any help in fixing this would be much appreciated.

TIA
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: wsdl: how do i generate wsdl that places the type info in the main body instead of using xsd:import?