Cannot find dispatch method for {http://www.ivan.com/additionservicetypes}addValuesRequest
Mark Heron
Greenhorn
Joined: Aug 19, 2010
Posts: 19
posted
0
Hello Folks,
I'm trying example of document style webservice from Ivan's study guide section 9.3. On running client program I'm getting below error.
Adding the values 7.241783721362973 and 1.5793153077945998:
*** A fatal error occurred:
Cannot find dispatch method for {http://www.ivan.com/additionservicetypes}addValuesRequest
SOAP request on TCPMon:
POST /JAX-WS_SchemaToWS/calculationService HTTP/1.1
Content-type: text/xml;charset="utf-8"
Soapaction: "http://www.ivan.com/AdditionService/CalculationService/addValuesRequest"
Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
User-Agent: JAX-WS RI 2.1.6 in JDK 6
Host: 127.0.0.1:37199
Connection: keep-alive
Content-Length: 283
Here you go. I have to modify additionType.xsd to additionTypes.xsd(extra "s" in name) to locate XSD correctly. I assume it is typo in study guide.(Version: July 12, 2010)
I also tried to send requests using aoapUI. I got similar response. See below.
==================================================================================================================
soapUI Request
==================================================================================================================
This message was edited 2 times. Last update was at by Ivan Krizsan
Ivan Krizsan
Bartender
Joined: Oct 04, 2006
Posts: 2160
posted
0
Hi!
Mark Heron wrote:Here you go. I have to modify additionType.xsd to additionTypes.xsd(extra "s" in name) to locate XSD correctly. I assume it is typo in study guide.(Version: July 12, 2010)
Indeed! Thank you for pointing this out!
I pasted the WSDL and the XML schema into my version of the web service and it does look like there are no problems with those two files, since the web service works as expected.
I did generate the JAXB bean classes etc using the Ant-script.
I tried with soapUI and received this response:
If you want me to look further into this, please compress the entire web service project in an archive file and put it somewhere where I can download it.
Best wishes!
This message was edited 1 time. Last update was at by Ivan Krizsan
Mark Heron
Greenhorn
Joined: Aug 19, 2010
Posts: 19
posted
0
Ivan,
Thanks for looking into this. I appreciate your help.
Can you please provide me corresponding HTTP(NOT SOAP) request? Also, Please let me know Glassfish and soapUI version you are using.
I noticed one thing, I can successfully test my webservice using Glassfish test tool. However, it uses diffrent SOAP request than what soapUI and standalone client is using. Moreover, when I compare WSDL within my webservice project with Glassfish version of WSDL they are diffrent in Action and operation name. I guess Glassfish generates WSDL out of implementation class and it doesn't care what mapping is defined within WSDL inside WEB-INF/wsdl folder. I wish Glassfish can validate class and WSDL at deploy time and flag error if something is not matching rather than silently generating own version of wsdl and use it.
Thanks
Mark
Ivan Krizsan
Bartender
Joined: Oct 04, 2006
Posts: 2160
posted
0
Hi!
If GlassFish generates a WSDL instead of using the existing one, then make sure that the endpoint implementation class is properly annotated:
I'll get back later with more information and sample request.
Best wishes!
Ivan Krizsan
Bartender
Joined: Oct 04, 2006
Posts: 2160
posted
0
Hi!
Sorry about the delay.
First of all, I use GlassFish 3.0.1 but originally when developing the sample, I used GlassFish 2.1.
For testing, I have used soapUI 3.5.
I can only supply the request generated by soapUI, which looks like this:
The corresponding response looks like this:
Best wishes!
Mark Heron
Greenhorn
Joined: Aug 19, 2010
Posts: 19
posted
0
Ivan,
Finally, it worked. I was using GlassFishV3 application server. When I moved same code to GlassFish 3.0.1, it worked like charm. Funny Right? The core idea of Webservice is interoperability but it doesn't seem to be portable between two versions of same server.
Anyways, Thanks a lot for your quick followup.
Thanks
Ivan Krizsan
Bartender
Joined: Oct 04, 2006
Posts: 2160
posted
0
Hi!
Good to hear that the matter is resolved.
Did you use v3 or v3 prelude before switching to v3.0.1?
Best wishes!
Mark Heron
Greenhorn
Joined: Aug 19, 2010
Posts: 19
posted
0
Ivan,
I used GlassFish V3(Sun) before switch to V3.0.1(Oracle).
Regards
subject: Cannot find dispatch method for {http://www.ivan.com/additionservicetypes}addValuesRequest