File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Core Java Client vs WebServer Client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Core Java Client vs WebServer Client" Watch "Core Java Client vs WebServer Client" New topic
Author

Core Java Client vs WebServer Client

inr mohan
Ranch Hand

Joined: May 11, 2005
Posts: 61
Hi All,

I am consuming a Webservice which is developed in C#.

I have taken the WSDL file and generated the java proxy and stub classes, when I access the webservice thro a simple java program I am able to access it fine, but when I place the same code in to the Java program which runs under the Tomcat webserver, I am having the below exception: Please help me to solve the issue.

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXException: Bad envelope tag: ACORD
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: Bad envelope tag: ACORD
at org.apache.axis.message.EnvelopeBuilder.startElement(EnvelopeBuilder.java:71)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:626)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3088)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:914)
at com.sun.org.apache.xerces.inter



Inr
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
I would try to look at the messages sent out by the client when it is deployed in Tomcat.
There are two ways to do this: Either you "insert" a proxy between the client and the real service using a program like SOAP Membrane. Alternatively you can use a packet sniffer, like WireShark.
The second alternative is to use soapUI to set up a mock web service and look at the requests it receives.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
inr mohan
Ranch Hand

Joined: May 11, 2005
Posts: 61
Based on the Exception thrown, is it possible to say wether the exception is thrown in the server side or in the client side?

Inr
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
inr mohan wrote:Based on the Exception thrown, is it possible to say wether the exception is thrown in the server side or in the client side?

Give this:
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

My guess would be the server side - check the server logs to be sure!
Best wishes!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Core Java Client vs WebServer Client
 
Similar Threads
access denied (SocketPermission 127.0.0.1:1099 connect,resolve)
Cannot invoke method get() on null object
Connecting to a webservice from a webservice
accessing web service from firefox browser
SOAP processing failure, error id = 1001