Foren

Not valid JAX-WS wsdl file generated by Service Builder

thumbnail
Dimitrios Karageorgopoulos, geändert vor 11 Jahren.

Not valid JAX-WS wsdl file generated by Service Builder

New Member Beiträge: 18 Beitrittsdatum: 01.06.12 Neueste Beiträge
Dear gurus,

I use Liferay 6.0 Community edition
I have created a web service using Service Builer and a WSDL is successfully generated.
I have created a web proxy with Eclipse and I have successfully tested my web services

However, when I try to generate aJAX-WS web proxy from JDeveloper, it errors out with the following message:

The style/use of at least one binding in this wsdl is rpc/encoded. JAX-WS cannot support this binding

It sees that the WSDL document is not a valid JAX-WS document.

Has anybody else have the same issue and how you overcome it?

I attach the WSDL file
Peter Rodriguez, geändert vor 11 Jahren.

RE: Not valid JAX-WS wsdl file generated by Service Builder

Regular Member Beiträge: 154 Beitrittsdatum: 07.06.10 Neueste Beiträge
Hi Guys, I am getting exactly the same problem (using Liferay 6.1.1 GA CE).
The WSDL generated uses JAX-RPC encoding style. As a result, neither Netbeans and Eclipse can construct any valid java model from the wsdl.
I thought RPC was replaces WAY BACK with the newer JAX-RS and JAX-WS standards for RESTful and SOAP-based web services respectively.
This RPC stuff is surely ancient!
Why then is the latest version of Liferay still generating RPC-binded WSDLs?

Is there a way to change this default behaviour?
I am COMPLETELY unable to work with Web Services generated by Liferay because of this (as I am sure many others are).

I think this derserves some urgent and quick response/resolution. Any votes?

Regards All
thumbnail
Vilmos Papp, geändert vor 11 Jahren.

RE: Not valid JAX-WS wsdl file generated by Service Builder

Liferay Master Beiträge: 529 Beitrittsdatum: 21.10.10 Neueste Beiträge
Hi Guys,

Sorry to hear that, but if you think it's a bug or missing feature, please don't hesitate to open a bug/improvement ticket in our public bug tracker. I guess, the main reason for still use this solution is the backward compatibility, as many of our users are continually upgrading there production systems, and would cause major overhead on the upgrade to modify their client applications as well to change the web service calls in each implementations, regression testing, etc.

Formerly I also wanted to use JAX-WS services in a project in Liferay 5.2 and it's still possible, but the bottleneck is that you have to create the services on your own and service builder cannot do that.

Regards,
Vilmos
thumbnail
Vilmos Papp, geändert vor 11 Jahren.

RE: Not valid JAX-WS wsdl file generated by Service Builder

Liferay Master Beiträge: 529 Beitrittsdatum: 21.10.10 Neueste Beiträge
After searching a bit, I found an interesting article to workaround this problem, maybe you can try it as well : http://www.avadaj.com/2011/12/05/expose-java-classes-as-web-services-in-liferay-using-jaxws/

Anyway, please use it with caution as I haven't tried it, but it makes sense to use a wrapper to provide the requested interface if needed.
David Ilechukwu, geändert vor 11 Jahren.

RE: Not valid JAX-WS wsdl file generated by Service Builder

Regular Member Beiträge: 154 Beitrittsdatum: 07.06.10 Neueste Beiträge
Vilmos Papp:
After searching a bit, I found an interesting article to workaround this problem, maybe you can try it as well : http://www.avadaj.com/2011/12/05/expose-java-classes-as-web-services-in-liferay-using-jaxws/

Anyway, please use it with caution as I haven't tried it, but it makes sense to use a wrapper to provide the requested interface if needed.


Thanks for the link. However, this still is for generating JAX-WS (SOAP-style) web services.
Like you know RESTfull web services accounts for practically over 85% of all web services in use today, being simpler to use (in use by Facebook, Google, Amazon, etc).

Is there no workaround for generating JAX-RS web services in Liferay?

Regards
thumbnail
Vilmos Papp, geändert vor 11 Jahren.

RE: Not valid JAX-WS wsdl file generated by Service Builder

Liferay Master Beiträge: 529 Beitrittsdatum: 21.10.10 Neueste Beiträge
Sorry, recently I didn't have to develop things to use Web Services as I used to do it before joining Liferay.

I haven't used JAX-RS yet, but as far as I can see in JIRA there's no ticket for this issue yet.
Jan Mathauser, geändert vor 10 Jahren.

RE: Not valid JAX-WS wsdl file generated by Service Builder

New Member Beitrag: 1 Beitrittsdatum: 11.06.13 Neueste Beiträge
Hi guys, is this issue somehow resolved? Some config parameter that can be set to enable jax-ws compatible wsdl generation? Thx
Peter Rodriguez, geändert vor 11 Jahren.

RE: Not valid JAX-WS wsdl file generated by Service Builder

Regular Member Beiträge: 154 Beitrittsdatum: 07.06.10 Neueste Beiträge
Vilmos Papp:
Hi Guys,

Sorry to hear that, but if you think it's a bug or missing feature, please don't hesitate to open a bug/improvement ticket in our public bug tracker. I guess, the main reason for still use this solution is the backward compatibility, as many of our users are continually upgrading there production systems, and would cause major overhead on the upgrade to modify their client applications as well to change the web service calls in each implementations, regression testing, etc.

Formerly I also wanted to use JAX-WS services in a project in Liferay 5.2 and it's still possible, but the bottleneck is that you have to create the services on your own and service builder cannot do that.

Regards,
Vilmos


Vilmos -
Thanks for the quick reply!
So according to you - it is a fact that latest version of ServiceBuilder generates JAX-RPC (JSON-style) web services ONLY.
Please could you point me to some kind of sample for using JAX-RS or JAX-WS in Liferay 6.1.1 (even if I have to create the services without Semoticon?

Also - I think SB could be easily modified to generate EITHER JAX-RPC or JAX-RS depending on a user-specified option, maybe something like this:

<entity name="Person" local-service="true" remote-service="true" web-service="jax-rs"> OR
<entity name="Person" local-service="true" remote-service="true" web-service="jax-ws">
</entity></entity>


Of course the default would still be JAX-RPC (so it wouldnt break the builds of those already using JAX-RPC). It would only generate other types if EXPLICITLY SPECIFIED in service.xml.
What do you say we work on this?
I'm going to open an improvement ticket on this...

Please let me know your thoughts.
thumbnail
Prakash Khanchandani, geändert vor 11 Jahren.

RE: Not valid JAX-WS wsdl file generated by Service Builder

Expert Beiträge: 329 Beitrittsdatum: 10.02.11 Neueste Beiträge
This would be a nice improvement without breaking backward compatibility. Hoping to see the development starting soon.

Thanks for bringing this up.