Skip to main content

Accessing wsdl schema via URL

9 replies [Last post]
channegan
Offline
Joined: 2006-11-02
Points: 0

I'm trying to access a web service's wsdl schema via a URL.
I have the web service deployed on Sun App Server 9.0.

I can access the wsdl with this url:
http://localhost:8080/foo/FooService?WSDL

The actual wsdl document is named:
FooService.wsdl

The associated schema document is named:
FooService_schema1.xsd

What would the url be to access this document?

I was able to read the wsdl and the wsdl contained this url:
http://localhost:8080/foo/FooService/__container$publishing$subctx/WEB-INF/wsdl/FooService_schema1.xsd
which provides me with access to the schema document.

However, I dont understand the __container$publishing$subctx part of the url. It isn't pretty.

I was hoping there was a nicer way to access this?

Thanks!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
marlor
Offline
Joined: 2006-02-15
Points: 0

Hello,

I have a similar problem.

our service is split into 3 WSDL files.
service WSDL, bindings WSDL & interfaces WSDL.
service imports bindings, bindings imports interfaces and
inetfaces WSDL import 3 XSDs.

I can browse through the 3 WSDL just fine with their given URLs ending with (?wsdl=1 ...).

But when I get to the interfaces WSDL, the 3 imported XSD still show the local path "../xsd/myxsd.xsd".

regards,

marlor

kohsuke
Offline
Joined: 2003-06-09
Points: 0

I'm not sure if I understand what you mean by:

> But when I get to the interfaces WSDL, the 3 imported XSD still show the local path "../xsd/myxsd.xsd".

... but I still recommend filing this to Glassfish.

sameer_t
Offline
Joined: 2003-09-06
Points: 0

The schemas can be accessed by looking at the location in the WSDL. They will be something like this

http://localhost:8080/NewWebService1Service/NewWebService1?xsd=1

and so on incrementally (xsd=2 etc.)

I believe this is the same notation followed by .NET as well

kohsuke
Offline
Joined: 2003-06-09
Points: 0

If you look inside http://localhost:8080/foo/FooService?wsdl, you'll find references to schemas. I believe those generally get URLs like http://localhost:8080/foo/FooService?xsd1, http://localhost:8080/foo/FooService?xsd2, etc.

channegan
Offline
Joined: 2006-11-02
Points: 0

Thanks for responding, but neither of these work.

When I look inside the wsdl, the url for the schema is:


kohsuke
Offline
Joined: 2003-06-09
Points: 0

Are you deploying on Glassfish or something?
I've never seen __container$publishing$subctx stuff.

I agree that it's not pretty, but does it really matter? I mean, it's only visible inside WSDL.

channegan
Offline
Joined: 2006-11-02
Points: 0

Glassfish...aka Sun App Server 9.0, yes.

It does matter when you're doing custom binding with JaxB with wsimport. You need to provide a schema url and __container$publishing$subctx is not intuitive.

Any other suggestions?

kohsuke
Offline
Joined: 2003-06-09
Points: 0

I think you'd probably want to file a bug in http://glassfish.dev.java.net/ about that. They control the URL<->XSD/WSDL association when JAX-WS runs in GF.

You should cite that you care about it because you need to write JAXB customizations, which forces you to rely on the XSD URLs. It's not immediately obvious why you wanted "cleaner" XSD URLs, and I suspect they'd have the same problem.

Also, you might like the SCD support in JAXB ( http://weblogs.java.net/blog/kohsuke/archive/2006/09/jaxb_customizat.html ), so that you won't have to hard-code path to XSD in your binding.

channegan
Offline
Joined: 2006-11-02
Points: 0

Issue 1534 posted

Thanks.