• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Javascript problem trying to invoke Axis service

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have javascript in an HTML page with which Im trying to invoke my web service (Axis2 deployed in Tomcat @ port 9090)
The javascript:


And the java function on the other other end that Im trying to call is:



The function gets called fine. And an instance of loginRequest is also provided, but the attributes inside loginRequest are all null. APIWSLoginRequest is a pojo with 3 members: userId, userPassword and an integer array.

If I put a breakpoint in login(), it does hit the breakpoint. If I poke into the call stack, I can see that Axis does have the values that are provided by the Javascript, but they dont get populated inside the loginRequest instance.

Any idea what could be wrong? This worked before, but suddenly stopped working this Monday morning.

Could it be a namespace problem? I had read an article somewhere on the net, on modifying my wsdl to remove namespaces which I had followed initially.
After introducing a new function in the Web Service class, I did regenerate the WSDL, but haven't done the same thing again. I cant find the article again!

 
Dave Pain
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've also tried following the instructions at
http://axis.apache.org/axis2/java/core/docs/json_support.html

And introducing the following line in the Javascript AJAX call (Between line 12 & 13 above):


Still no luck.
 
Sheriff
Posts: 67590
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How big is the request data? Too big for a GET perhaps? Have you checked the request itself to see if it has the data?
 
Dave Pain
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Really small request. LoginId, password and an array of couple of integers

I can see the JSON object string (String form of JSON in the Axis message) on the server side, but it stays as a JSON string. Doesn't convert to a java object. Thus my object (APILoginRequest) ends up keeping null members after the constructor is called. None of the getters are invoked
 
Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic