wood burning stoves 2.0*
The moose likes Web Services and the fly likes Attachments prob using Axis Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Attachments prob using Axis" Watch "Attachments prob using Axis" New topic
Author

Attachments prob using Axis

Anand Patwari
Greenhorn

Joined: Aug 12, 2003
Posts: 10
Hi all,
Could you help me out with this prob, i will put down the steps what i am trying to do : -

Input is a WSDL file.(I have only wsdl file as the starting point.. )
====================
1.Using Axis1.2 (WSDL2Java commandline utility) I generate java stubs, as in :
java org.apache.axis.wsdl.WSDL2Java -o. -d Session -s -p fibonacci.ws fib.wsdl

2.The webservice is deployed on tomcat5.5.15, and webservice method expects an object(user defined) and an attachment(zip file in this case) as parameters.

3.theres a standalone client prog which sends the required parameters, (the obj and an attachment) to the web service using the stubs generated through WSDL2JAVA

4.The service is getting deployed, and listing along with other deployed web services, deploying webservice using the .wsdd which was generated through WSDL2JAVA.

5.BUT, when i am running the standalone client program, i get foll exp :

Caught RemoteException1AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXException: Invalid element in Some.package.UserDefinedObject - uploadDataNotification
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:somehostname

org.xml.sax.SAXException: Invalid element in Some.package.UserDefinedObject - uploadDataNotification
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at inventory3.stubs.InventoryCallbackBindingStub.uploadInventoryData(InventoryCallbackBindingStub.java:196)
at TestMainCls.main(TestMainCls.java:67)

===================
basically I am trying to send an attachment/zip file along with some other params inside another object to a web service, Any info regarding this or sending attachments in web service or SAxExceptions cases in web service or any related info (i hope i am not asking too questions )would be of great help, thanks,
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39549
    
  27
It's a bit hard to say what might be going on in your code without seeing either the WSDL or a relevant code excerpt. An introduction to using attachments with JAX-RPC can be found here.


Ping & DNS - updated with new look and Ping home screen widget
Anand Patwari
Greenhorn

Joined: Aug 12, 2003
Posts: 10
Hi There,
thanks for the reply, was following the URL u sent, got some useful tips from it, cheers
anand
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Attachments prob using Axis
 
Similar Threads
AXIS Web Service Client unable to call WebSphere 5.0 Deployed EJB
AXIS Web Service Client unable to call WebSphere 5.0 Deployed EJB
Axis Client Classes and Web Service
Unable to download attachments using axis 1.2 web services when the attachment size is large
deserialization problem from soap response to object