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 File Attachement WebService issue using Datahandler Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "File Attachement WebService issue using Datahandler" Watch "File Attachement WebService issue using Datahandler" New topic
Author

File Attachement WebService issue using Datahandler

Vijay Anand
Greenhorn

Joined: Jan 15, 2002
Posts: 3
Hi All,

I am developed webservice which is help to receive file attachement.

here javax.activation.DataHandler i am using.

fileUpload(String filename, DataHandler dh) - WebMethod in my Webservice.

i able to create WSDL also i able to receive file successfully in my local env.

When i put my WSDL in SoapScope or x Ray(Webservice testing tool)

i am received below Error

**************************



Invalid schema format: src-resolve.4.2: Error resolving component 'att atahandler'. It was detected that 'att atahandler' is in namespace 'http://www.bea.com/servers/wls90/wsee/attachment', but components from this namespace are not referenceable from schema document. If this is the incorrect namespace, perhaps the prefix of 'att atahandler' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added.

**************************************************

Please let me know the soluation or some idea regarding this.

Thanks and Regards,
VijayAnand
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60041
    
  65

"vijayanand",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Doshi Milan
Ranch Hand

Joined: May 29, 2001
Posts: 112
Hi,

I am not much familiar with Webmethods but I know and I had created webservices in WebMethods using Flow Services and than publishing it as web service. This way WebMethods hides the complexity of Schema / WSDL from the developer.

Thus, what I would like to know is : Did you create the Schema /WSDL in webmethods or did the tool did it on ots own ? My guess would be the later and what I further guess is you just picked up that Schema and / or WSDL and tried it in some other tool. Thats ok, provided you pick up ALL relavant schemas. Just as a Java Class referring some other Java Class in some other library would require the other library to be present as well, I feel you are NOT importing ALL the schemas in your new tool.

Note : I am guessing here based on whatever information you have provided. As a thumb rule, I treat namespace issues in Schemas / wsdl like package issues in Java src code

Hope this helps...

Milan Doshi
Vijay Anand
Greenhorn

Joined: Jan 15, 2002
Posts: 3
Hi Milan Doshi,

Thanks for Reply.

i done this webservice using Weblogic workshop 9.2. when i used datahandler as a parameter in my webmethod in webservice corresponsing schema created atomatically like as below

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.bea.com/servers/wls90/wsee/attachment" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="datahandler">
<xs:annotation>
<xs ocumentation>Internal type created by WebLogic - Do not edit!</xs ocumentation>
</xs:annotation>
</xs:complexType>
</xs:schema>

can you please let me know how we import the corrersponding package.


Thanks and Regards,
Vijay Anand
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: File Attachement WebService issue using Datahandler
 
Similar Threads
To pass file object to webservice
Passing binary files in webservices
File Attachement WebService issue using Datahandler
Axis 2 - MTOM Service problem
Complex Data Type Axis