Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Ilya Zverev
SOAP and WSDD from Service Builder w/o ext environment
March 31, 2009 7:06 AM
Answer

Ilya Zverev

Rank: Junior Member

Posts: 26

Join Date: November 25, 2008

Recent Posts

I'm using service.xml editor in NetBeans and it seems that web services generated with ServiceBuilder are usable only from inside liferay portal. That is, no soap/http/json classes are generated, wsdd deploy/undeploy descriptors are also missing.

Is there a way to generate those so portlet's web services would be available externally?
I mean a normal way, without rebuilding liferay core files, using some ext environment and all.
Ilya Zverev
RE: SOAP and WSDD from Service Builder w/o ext environment
April 18, 2009 4:26 AM
Answer

Ilya Zverev

Rank: Junior Member

Posts: 26

Join Date: November 25, 2008

Recent Posts

Just in case someone is writing their portlet in a regular way, without tweaking Liferay, there's a relatively simple solution.
1. Create service using ServiceBuilder;
2. Create new package apart from your portlet and create an interface there with all service methods;
3. Use Apache Axis' Java2WSDL and WSDL2Java to create all soap classes and deploy.wsdd;
4. Find YourServiceSoapBindingImpl.java and write implementations for all methods to call corresponding YourServiceUtil methods, generated by ServiceBuilder;
5. Build this package and put it into tomcat/webapps/ROOT/WEB-INF/lib folder;
6. Take <service> tag from generated deploy.wsdd file and copy-paste it into tomcat/webapps/tunnel-web/WEB-INF/server-config.wsdd near other services;
7. Copy the jar generated with ServiceBuilder into tomcat/common/lib/ext;
8. Stop, then start tomcat, deploy your portlet;
9. Check http://localhost:8080/tunnel-web/axis for your service. It should be there.

This is too tricky, still. There has to be a way to execute 'build-wsdd' task and to generate all soap classes and wsdd files.
Brant Levinson
RE: SOAP and WSDD from Service Builder w/o ext environment
April 24, 2009 12:14 PM
Answer

Brant Levinson

Rank: Junior Member

Posts: 48

Join Date: July 12, 2008

Recent Posts

Thanks for sharing,
I don't understand why this isn't automated yet. It should create the JSON, SOAP, and REST interfaces for this.
Ilya Zverev
RE: SOAP and WSDD from Service Builder w/o ext environment
April 29, 2009 7:01 AM
Answer

Ilya Zverev

Rank: Junior Member

Posts: 26

Join Date: November 25, 2008

Recent Posts

Also, I've found a way to use model hints with Portal Pack (and w/o ext env) and added it to wiki.