It's not a secret anymore!*
The moose likes Web Services and the fly likes consuming a webservice using java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "consuming a webservice using java" Watch "consuming a webservice using java" New topic
Author

consuming a webservice using java

Ramesh Sahu
Ranch Hand

Joined: Jul 14, 2008
Posts: 32
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

Joined: Aug 19, 2005
Posts: 2922
    
    5
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

Joined: Jul 14, 2008
Posts: 32
thanks,
but i don't think that is the problem.
can you suggest any other solution?
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
How to Get Help with SOAP web services
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12760
    
    5
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

Joined: Jul 14, 2008
Posts: 32
thank you for your help
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: consuming a webservice using java
 
Similar Threads
Having problem with Web service Response fields: org.xml.sax.SAXException: Invalid element
Need Help regarding -- org.xml.sax.SAXException: Invalid element
URGENT- Rename or Regenerate Axis Classes
Trouble renaming an existing element in Axis.
Attachments prob using Axis