Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Parameter values not reaching the web service methods

 
akhil achuthan
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a web service deployed as war in my jboss. I can communicate with the web methods, but whatever parameters that along does not reach there. It is always null or 0.
What could be the reason. I tried rewriting and redeploying my web service class, but for no use...


please help
 
Fred Hamilton
Ranch Hand
Posts: 684
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
akhil achuthan wrote:Hi,

I have a web service deployed as war in my jboss. I can communicate with the web methods, but whatever parameters that along does not reach there. It is always null or 0.
What could be the reason. I tried rewriting and redeploying my web service class, but for no use...


please help


I am not certain this applies to your situation, but it is my understanding that all parameters passed from HTML to java are passed as Strings. very specific rules of syntax must be followed in HTML, and you also need to deal with type conversion in the applet init() method.

Hopefully this has some bearing on your situation, I don't know JBoss.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
You say you have developed the web service, have you also developed the client program?
I recommend the following approach, if you haven't tried already:
1. Use soapUI or some other web service testing tool to issue requests to the service.
Examine the (SOAP) messages sent to and received from the web service to make sure they are correct.
2. If you are unable to isolate the problem after step 1, try deploying your webservice to another container and test it there.
3. If you still are unable to find the problem, start developing from a known good webservice, for instance some tutorial.
Step by step modify the webservice known to be good and test after each step.
This way you will (hopefully) end up with a good web service or the knowledge of what the problem with your original web service was.
4. If Step 1 was completed without problems, then investigate the client using a packet sniffer/TCP monitor or similar to verify that the (SOAP) messages it sends out are indeed correct.
Best wishes!
 
akhil achuthan
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for responding......

I am using soapUI as my client. The packet sniffers shows the value passed correct... But the web service method does not receive it..

Is there any configuration files apart from web.xml and webservice.xml that would probably have something to do with this?

As the last choice i would try thse from scratch.... any useful tutorial links for an apt example???


Thanks


 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Try this: http://www.mastertheboss.com/en/web-interfaces/101-jboss-web-services-part-1.html
Alternatively, google for the following words (or others you come to think of): jboss web service tutorial.
Best wishes!
 
akhil achuthan
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A new twist. I tried changing a lost of stuff.... On the go I changed the @SOAPBinding style from DOCUMENT to RPC. Now while accessing the web methods with parameters, i am thrown the following exception. Other methods without arguments works just fine as before.....

20:55:20,328 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
org.jboss.ws.WSException: Cannot find child element: arg0
at org.jboss.ws.core.CommonSOAPBinding.getParameterFromMessage(CommonSOAPBinding.java:917)
at org.jboss.ws.core.CommonSOAPBinding.unbindRequestMessage(CommonSOAPBinding.java:361)
at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:197)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:474)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:295)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:205)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Have you tried to deploy your web service to another container, like GlassFish?
I've seen somewhere that people have had problems similar to the ones you have and that, at least in some cases, it was a problem related to the JBoss container, not to the web service implementation.
If you deploy to another container and it works, then you at least know that the problem is not related to your web service.
Best wishes!
 
akhil achuthan
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems like a problem with the wsdl generated by ant build- axis.

The communication worked just fine with passing parameters, when instead of using the wsdl file generated by the axis build, i used the wsdl generated by jboss ( for jboss4 the location is <JBOSS_HOME>server\default\data\wsdl\<deploy_name>)on deployment of the web service...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic