Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

consuming a webservice using java

 
Ramesh Sahu
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a wsdl file . I want to access access the web service using a normal java program . For that I have used WSDL2Java in the Apache Axis.

I am able to generate the proxy files, but when I try to run my program I get an error

....
....
.....

Caught remote exception: org.xml.sax.SAXException: Invalid element in com.myorg.CCR - SubscriberID
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXException: Invalid element in com.myorg.CCR - SubscriberID
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace rg.xml.sax.SAXException: Invalid element in com.myorg.CCR - SubscriberID
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement..
....
.....
.....

What could be the possible reason???
[ December 13, 2008: Message edited by: Ramesh Sahu ]
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ramesh Sahu:
Hi all,

I have a wsdl file .


Could it be that the WSDL or one of the XML schemas that it references has been updated recently (... and you only have older versions)?
[ December 13, 2008: Message edited by: Peer Reynders ]
 
Ramesh Sahu
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks,
but i don't think that is the problem.
can you suggest any other solution?
 
Peer Reynders
Bartender
Posts: 2968
6
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this was my problem I would use SoapUI or TCPMON to trap the full text of the request your code is generating. This might reveal some obvious problem.

Bill
 
Ramesh Sahu
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you for your help
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic