Pregunta

I have Eclipse with WTP (http://www.eclipse.org/webtools/ws/), Tomcat and Axis2 installed.

I'm learning webservices. I have a simple Hello class that I use to create both WS server and client.

In Eclipse, I right click Hello.java then go New > Other > Web Service. I set server to 'Start service' and client to 'Test client' and click next twice. Inside this wizard, I end on the 'Test Web Service' screen, that lists Web Services Explorer as the only Test facility available.

Here if I click Launch button, a browser window is opened with the Web Services Explorer, with URL http://127.0.0.1:59981/wse/wsexplorer/wsexplorer.jsp?org.eclipse.wst.ws.explorer=4 where I can select helloName operation to open in the Actions panel a form to test the web Service. It all works, I'm able to send the form to WS client, which sends a message to server, gets its response and show in Status panel both SOAP request and response envelopes.

Back into Eclipse, I still have that wizard window opened (where I clicked Launch button). If I click Finish (or Next a few more times), a new client is built, from an Eclipse project HelloClient, and then it opens from inside Eclipse in the URL http://localhost:8080/HelloClient/sampleHelloProxy/TestClient.jsp, titled Web Services Test Client.

Notice that Web Serces Explorer (that is opened in browser from Launch button) uses port 59981, while Web Services Test Client (that is opened inside Eclipse when the wizard finishes) is in port 8080 (Tomcat main port).

So, 2 different clients are being built. Web Services Explorer's one has better input form, allowing to set nil values from checkboxes, having a CalendarBrowser to select dates, etc, and it shows SOAP envelopes... but for complex responses it doesn't have Web Services Test Client's Result panel to show complex responses in a easier-to-see HTML page.

On the other side, Web Services Test Client fails to build proper form for more complex inputs. For exemple, WSDL's xsd:simpleType with xsd:restriction is just ignored in the form, resulting in server returning error message because a parameter is missing.

My questions are:

1) Is there a way to choose, from inside wizard, which client to open inside Eclipse? A friend that's learning with me is able to open Web Services Explorer from inside Eclipse just by finishing the wizard.

2) Is there any plugin to allow Web Services Explorer's client to build a response page for easier viewing? That's the only thing missing on it that Web Services Test Client's client overcomes Web Services Explorer.

¿Fue útil?

Solución

Got it!

After the Test Web Service screen, I click Next 2 more times, and reach the Web Service Client Test.

In it I have another Test facility field, where I can choose 'JAX-RPC JSPs' or 'Web Services Explorer'. Choosing the second, it opens inside Eclipse as I wanted.

And in its Status panel I have form view that shows a nice HTML of response and Source view that shows highlighted vew of both SOAP request and response envelopes!

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top