Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Webservice not receiving values for attributes defined in wsdl  RSS feed

 
Janardhan Kotha
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

My web service is deployed on WAS 6.1.x and we are using webservices runtime from websphere. I am testing my web service with Eclipse -> Web services explorer. I set up a TCPMON and I can see the soap message contains the value for attribute, but when I receive the corresponding java object in server, I dont see the value for that.

Eg:- Here is the soapy body
<q0:AddZIP>
<q0:source>SRC</q0:source>
<q0:state stateCode="NJ">
<q0:zipCode>08902</q0:zipCode>
</q0:state>
</q0:AddZIP>

corresponding java obj is

public class State {
private java.lang.String stateCode; // attribute
private java.lang.String[] zipCode;
}

When I receive the request, I dont see the value for stateCode, it is being passed as null. Thinking that there could be some bug in IBM.
If anyone come across this kind of problem, please help me.

Thanks,
Janardhan.
 
Janardhan Kotha
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found that there is a bug in IBM WAS6.1.x and we raised a PMR to IBM. I can see the soap message with the attribute & value in the trace.log file but when it converts the soap xml to java object, it is not setting the value.

Thanks,
Janardhan.
 
Janardhan Kotha
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It was problem in Eclipse Web services explorer. Eclipse was not using namespace for attributes and WAS runtime is not able to understand and not setting the values for those attributes. Use WAS generated client classes for testing or prefix the attributes with appropriate namespace when using Eclipse Web services explorer.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!