NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Re: jax-ws WSDL from code

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
jyeary



Joined: 21 Oct 2008
Posts: 608
Location: Simpsonville, SC

PostPosted: Tue Dec 06, 2011 3:19 am    Post subject: Re: jax-ws WSDL from code Reply with quote

Why would you want them combined?

2011/11/29 Onur AYGUN <address-removed ([email]address-removed[/email])>
Quote:
Hi!
When we genarate a web service from code, framework generates the web service wsdl file.
But genareted WSDL file seperates into two or more file one for wsdl and others for Schema
and wsdl imports these schema locations.
is it possible to generate a single file with WSDL and schema.

Thanks

Onur AYG
Back to top
Onur AYGUN
Posted via mailing list.





PostPosted: Tue Dec 06, 2011 3:30 pm    Post subject: Re: jax-ws WSDL from code Reply with quote

services may behind a proxy, or a gateway tool,
When users want get wsdl they can only reach wsdl files, but they can't reach referenced schemas in it,
To overcome this problem all references in these wsdl files and schema files must be changed manually and deployed on another channel,
and especially while in development process, this operation may be much expensive for time.

PS : Sorry for my english

Onur AYG
Back to top
malm



Joined: 19 Mar 2010
Posts: 26

PostPosted: Tue Dec 06, 2011 3:54 pm    Post subject: Re: jax-ws WSDL from code Reply with quote

Quote:
When we generate a web service from code, framework generates the web service wsdl file.
But generated WSDL file separates into two or more file one for wsdl and others for Schema
and wsdl imports these schema locations.
is it possible to generate a single file with WSDL and schema.


I believe the recommended workaround is to use wsgen with the -inlineSchemas option to generate your WSDL (requires jax-ws 2.2.1) and then bundle the generated WSDL with your service. When clients request the WSDL the bundled version will be served and the framework will not generate the WSDL on the fly.

See also: http://java.net/jira/browse/JAX_WS-85
Back to top
jyeary



Joined: 21 Oct 2008
Posts: 608
Location: Simpsonville, SC

PostPosted: Tue Dec 06, 2011 6:16 pm    Post subject: Re: jax-ws WSDL from code Reply with quote

You can access the schema by adding ?xsd=1 like

http://localhost:8080/WebService/Hello?xsd=1

John

2011/12/6 Onur AYGUN <address-removed ([email]address-removed[/email])>
Quote:
services may behind a proxy, or a gateway tool,
When users want get wsdl they can only reach wsdl files, but they can't reach referenced schemas in it,
To overcome this problem all references in these wsdl files and schema files must be changed manually and deployed on another channel,
and especially while in development process, this operation may be much expensive for time.

PS : Sorry for my english

Onur AYG
Back to top
Onur AYGUN
Posted via mailing list.





PostPosted: Wed Dec 07, 2011 8:05 am    Post subject: Re: jax-ws WSDL from code Reply with quote

Hi john
Thanks,
I know how can I reach schema files

But my web service client's may not reach schema files with network issues.

Think about this scenario

we deploy a web service to
localserver.xxx.com and port 8080
web service wsdl file address : http://localserver.xxx.com:8080/sampleservice?wsdl
and schema files are located at http://localserver.xxx.com:8080/sampleservice?xsd=1,http://localserver.xxx.com:8080/sampleservice?xsd=2,http://localserver.xxx.com:8080/sampleservice?xsd=3

and network manager said that we can not open port 8080 to outside world, so they made an network config for port 80 to forward request internal server 8080 port
New wsdl address is (for outside web service clients)
http://outside.xxx.com/sampleservice?wsdl
but when they get wsdl, wsdl says referenced schemas are in http://localserver.xxx.com:8080/sampleservice?xsd=1, http://localserver.xxx.com:8080/sampleservice?xsd=2, http://localserver.xx x.com:8080/sampleservice?xsd=3
and the client cant reach internal server.
to overcome this problem I'm saving wsdl file as a local file, changing schema file references (as http://outside.xxx.com/sampleservice?xsd=1, ....), and sending manually to clients

seperating schema files is only done by jax-ws api (framework),
neither .NET, nor Axis does not seperate schema files when generate wsdl from code,
we only facing this problem with jax-ws api (or framework),
is it possible to say to the framework wsdl must include all schema objects.

thanks.


Onur AYG
Back to top
jyeary



Joined: 21 Oct 2008
Posts: 608
Location: Simpsonville, SC

PostPosted: Wed Dec 07, 2011 1:45 pm    Post subject: Re: jax-ws WSDL from code Reply with quote

JAX-WS 2.2.1 + allows you to inline the schema as you requested. The latest version is 2.2.5.

http://jax-ws.java.net/nonav/2.2.5/docs/wsgen.html

John

2011/12/7 Onur AYGUN <address-removed ([email]address-removed[/email])>
Quote:
Hi john
Thanks,
I know how can I reach schema files

But my web service client's may not reach schema files with network issues.

Think about this scenario

we deploy a web service to
localserver.xxx.com and port 8080
web service wsdl file address : http://localserver.xxx.com:8080/sampleservice?wsdl
and schema files are located at http://localserver.xxx.com:8080/sampleservice?xsd=1,http://localserver.xxx.com:8080/sampleservice?xsd=2,http://localserver.xxx.com:8080/sampleservice?xsd=3

and network manager said that we can not open port 8080 to outside world, so they made an network config for port 80 to forward request internal server 8080 port
New wsdl address is (for outside web service clients)
http://outside.xxx.com/sampleservice?wsdl
but when they get wsdl, wsdl says referenced schemas are in http://localserver.xxx.com:8080/sampleservice?xsd=1, http://localserver.xxx.com:8080/sampleservice?xsd=2, http://localserver.xx x.com:8080/sampleservice?xsd=3
and the client cant reach internal server.
to overcome this problem I'm saving wsdl file as a local file, changing schema file references (as http://outside.xxx.com/sampleservice?xsd=1, ....), and sending manually to clients

seperating schema files is only done by jax-ws api (framework),
neither .NET, nor Axis does not seperate schema files when generate wsdl from code,
we only facing this problem with jax-ws api (or framework),
is it possible to say to the framework wsdl must include all schema objects.

thanks.


Onur AYG
Back to top
jyeary



Joined: 21 Oct 2008
Posts: 608
Location: Simpsonville, SC

PostPosted: Wed Dec 07, 2011 1:45 pm    Post subject: Re: jax-ws WSDL from code Reply with quote

Original JIRA for feature.

http://java.net/jira/browse/JAX_WS-85

On Wed, Dec 7, 2011 at 8:39 AM, John Yeary <address-removed ([email]address-removed[/email])> wrote:
Quote:
JAX-WS 2.2.1 + allows you to inline the schema as you requested. The latest version is 2.2.5.

http://jax-ws.java.net/nonav/2.2.5/docs/wsgen.html

John

2011/12/7 Onur AYGUN <address-removed ([email]address-removed[/email])>
Quote:
Hi john
Thanks,
I know how can I reach schema files

But my web service client's may not reach schema files with network issues.

Think about this scenario

we deploy a web service to
localserver.xxx.com and port 8080
web service wsdl file address : http://localserver.xxx.com:8080/sampleservice?wsdl
and schema files are located at http://localserver.xxx.com:8080/sampleservice?xsd=1,http://localserver.xxx.com:8080/sampleservice?xsd=2,http://localserver.xxx.com:8080/sampleservice?xsd=3

and network manager said that we can not open port 8080 to outside world, so they made an network config for port 80 to forward request internal server 8080 port
New wsdl address is (for outside web service clients)
http://outside.xxx.com/sampleservice?wsdl
but when they get wsdl, wsdl says referenced schemas are in http://localserver.xxx.com:8080/sampleservice?xsd=1, http://localserver.xxx.com:8080/sampleservice?xsd=2, http://localserver.xx x.com:8080/sampleservice?xsd=3
and the client cant reach internal server.
to overcome this problem I'm saving wsdl file as a local file, changing schema file references (as http://outside.xxx.com/sampleservice?xsd=1, ....), and sending manually to clients

seperating schema files is only done by jax-ws api (framework),
neither .NET, nor Axis does not seperate schema files when generate wsdl from code,
we only facing this problem with jax-ws api (or framework),
is it possible to say to the framework wsdl must include all schema objects.

thanks.


Onur AYG
Back to top
Onur AYGUN
Posted via mailing list.





PostPosted: Wed Dec 07, 2011 8:03 pm    Post subject: Re: jax-ws WSDL from code Reply with quote

thanks john
you are great

Onur AYG
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo