留言板

Service Builder to call Soap Service liferay 6.2

thumbnail
Mohammed Azam,修改在9 年前。

Service Builder to call Soap Service liferay 6.2

Regular Member 帖子: 159 加入日期: 09-11-6 最近的帖子
Hi Team

I have created a service.xml run ant->build-service and in the <Entity>serviceImpl I created one method which makes call to the webservices (Soap) based.

When I want to call this method REST based then I get the following error. The Webservices are working independetly and I am getting the results but when I can ir from serviceImpl classe I face this issue.

"interface com.sun.xml.ws.developer.WSBindingProvider is not visible from class loader"


Appreciate your support .
thumbnail
Meera Prince,修改在9 年前。

RE: Service Builder to call Soap Service liferay 6.2

Liferay Legend 帖子: 1111 加入日期: 11-2-8 最近的帖子
Hi

May be conflict in jar files... we are using soap and rest two web service in one place and there may be common jar file which making conflict

see the following links of error causes

http://stackoverflow.com/questions/12199732/interface-is-not-visible-from-class-loader

http://stackoverflow.com/questions/2927622/interface-com-sun-xml-ws-developer-wsbindingprovider-is-not-visible-from-class-l

try to add following jar in portlet lib and try it
jaxws-rt-2.1.7.jar



Regards,
Meera Prince
thumbnail
Mohammed Azam,修改在9 年前。

RE: Service Builder to call Soap Service liferay 6.2

Regular Member 帖子: 159 加入日期: 09-11-6 最近的帖子
Thanks Meera

I tried using your approach but still its giving the same issue. Dowloaded the jaxws-rt-2.1.7.jar and kept in portlet lib folder.



Thanks
thumbnail
David H Nebinger,修改在9 年前。

RE: Service Builder to call Soap Service liferay 6.2

Liferay Legend 帖子: 14914 加入日期: 06-9-2 最近的帖子
Are you using a non-sun JDK? Note that is never supported under Liferay.
thumbnail
Mohammed Azam,修改在9 年前。

RE: Service Builder to call Soap Service liferay 6.2

Regular Member 帖子: 159 加入日期: 09-11-6 最近的帖子
David H Nebinger:
Are you using a non-sun JDK? Note that is never supported under Liferay.



Thanks David

I am using the Sun JDK 1.7. I am able to make call from my portlet controller
for eg:

[quote]public void serveResource(ResourceRequest resourceRequest,
			ResourceResponse resourceResponse) throws IOException,
			PortletException {
		String name = <entity>Serviceutil.getName();

	}
	[/quote]</entity>



But when the same service is exposed as REST and try to consume from http://localhost:8080/api/jsonws?contextPath=/My-services-portlet.


It throws the error emoticon

emoticon
thumbnail
Mohammed Azam,修改在9 年前。

RE: Service Builder to call Soap Service liferay 6.2

Regular Member 帖子: 159 加入日期: 09-11-6 最近的帖子
David H Nebinger:
Are you using a non-sun JDK? Note that is never supported under Liferay.



Hi David

Please find the attachment for the stack trace.


Thanks
Hardik Pathak,修改在9 年前。

RE: Service Builder to call Soap Service liferay 6.2

New Member 帖子: 12 加入日期: 13-10-11 最近的帖子
Hi,

Could you solve this issue? As I am also struggling with the same issue and have no clue.

Would be great help.

Thank you
Hardik
Hardik Pathak,修改在9 年前。

RE: Service Builder to call Soap Service liferay 6.2

New Member 帖子: 12 加入日期: 13-10-11 最近的帖子
Okay. After spending few days on this. I conclude few things. ( I may be wrong and if so better someone corrects me ! ).

At last after so much debugging and googling, I have come to conclusion that there is some bug ( or inherent behaviour) in liferay and hence the way we check the web service client from the liferay URL http://localhost:8080/api/jsonws/ is not working for custom webservice service.

BTW, I could connect to remote Webservice to get data from my portlet, if I deploy it on a page. But that test Utility /jsonws is not working!

What I think is that, because that utility is part of Portal codebase/classloader, the dependent jars which are inside our custom developed war and the classes which this application (jsonws) are conflicting and causing issues.

So, I am not sure even if it’s advisable to test the custom developed webservice client service through that utility. May be it is best suited only for portal provided services, which I guess is part of Portal classloader.

I hope my understanding is correct and useful.

I am novice to Liferay and it's possible that this understand is wrong and I might have done something wrong so correct me if I have concluded something wrong.

Regards,
Hardik
Lukas Labaj,修改在8 年前。

RE: Service Builder to call Soap Service liferay 6.2

New Member 帖子: 4 加入日期: 15-9-10 最近的帖子
Hello,

is this right answer? Or do you have some new solution?

Thx
Lukas
thumbnail
David H Nebinger,修改在8 年前。

RE: Service Builder to call Soap Service liferay 6.2

Liferay Legend 帖子: 14914 加入日期: 06-9-2 最近的帖子
No, it's not the right answer.

/api/jsonws works for Liferay and custom services.

The OP for this thread was having a completely different problem reported in his stack trace. If your error doesn't match then this thread does not apply to you.
Lukas Labaj,修改在8 年前。

RE: Service Builder to call Soap Service liferay 6.2

New Member 帖子: 4 加入日期: 15-9-10 最近的帖子
Hello David,

I have same issue as describe first post in this thread... what is the right solution for the issue? You can find my stack trace in attachments.

Thx
Lukas
thumbnail
David H Nebinger,修改在8 年前。

RE: Service Builder to call Soap Service liferay 6.2

Liferay Legend 帖子: 14914 加入日期: 06-9-2 最近的帖子
If you read the details in the attached link it suggests either removing the jaxws-rt.jar or ensure cxf's cxf-rt-frontend-jaxws.jar comes up in the class path before jaxws-rt, not that this may be possible under Liferay.

It's likely due to a mix of CXF and jaxws and your custom service.

Are you trying to proxy a call to another web service that you implemented using CXF? If so, if you could proxy under axis or pure jaxws you may be fine.