Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to see the envelope and payload of SOAP web service I created in Eclipse.  RSS feed

 
Monica Shiralkar
Ranch Hand
Posts: 886
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created a simple hello world web service in Eclipse.I did right click on the service implementation class and clicked on "create web service" option in Eclipse. It created the webservice and its WSDL. How can I see the envelope and payload of this newly created hello world web service?

thanks
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That would depend on what version of Eclipse you are using and the web services plugins installed. Usually you get a "Generate" -> "XML file" option when you right click the XSD used in the WSDL.
Right clicking the WSDL gives an option to test it with the installed web service testing plugin. You can see the SOAP envelope and request there as well.
Payload would be the actual data that goes in the request. Eclipse cannot know that and puts in junk values for generated XMLs.
 
Monica Shiralkar
Ranch Hand
Posts: 886
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.

I am not using XSD.

The below are the only steps I followed:


STEP 1: Create java class HelloWorld.java




STEP 2:


Did Right click on the above class and did : New >> Other >> Web Service >> Next >> Finish


The below WSDL got created:





I am trying to figure out where is my payload and envelope and how to see them.

thanks
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The WSDL you showed has the XML elements which will be coming in the request and response.
Eclipse also shows the visual representation of the WSDL when you open it.
 
Monica Shiralkar
Ranch Hand
Posts: 886
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The WSDL you showed has the XML elements which will be coming in the request and response.



Thanks. What I am trying to see is the payload and the envelope. How can I see them?
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote: Payload would be the actual data that goes in the request. Eclipse cannot know that and puts in junk values for generated XMLs.

You send the payload and there is nothing added in the SOAP envelope except the name spaces.
 
Monica Shiralkar
Ranch Hand
Posts: 886
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You send the payload and there is nothing added in the SOAP envelope except the name spaces.


Thanks. I was thinking the I have created web services and now I can see the payload and envelope which was incorrect. The payload and envelope will be created when user sends a request to this web service and the web service sends the response. I think the next step for me is to create a web service client and examine the payload/envelope or do this in SOAPUI.

thanks again.
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Monica Shiralkar wrote: I think the next step for me is to create a web service client and examine the payload/envelope or do this in SOAPUI.

There you go!!
SOAP-UI is your best bet IMO. You just import the WSDL and create sample requests, see request response headers, test cases and even mock responses.
Generating +writing your own client is also not a biggie, but I would not rely much on my own client for testing purposes.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!