• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Attachments prob using Axis

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Anand Patwari
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi There,
thanks for the reply, was following the URL u sent, got some useful tips from it, cheers
anand
 
Why does your bag say "bombs"? The reason I ask is that my bag says "tiny ads" and it has stuff like this:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic