RE: Question about Soap Message with Attachment

2005-10-18 Thread yuan






Has the fact that http://xml.apache.org/xml-soap is not a valid link (seems has not been valid link for a while) got anything to do with Type {http://xml.apache.org/xml-soap}octet-stream is referenced but not defined. I would assume that there is some kind of definition or schema located at that link and import would pull those definitions in. Is that link simple relocated?






RE: Question about Soap Message with Attachment

2005-10-18 Thread yuan








Firstly, thanks for the response. 

 

If it helps, here is the error
messages outputted when I try to generate server side code using WSDL2WS with
the Attachment1.wsdl file in the testplan. I am using the version that is
currently on the SVN repository. 

 

log4j:WARN No appenders could be
found for logger (org.apache.axis.i18n.ProjectResourceBundle).

log4j:WARN Please initialize the
log4j system properly.

java.io.IOException: Type
{http://xml.apache.org/xml-soap}octet-stream is referenced but not defined.

   at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:631)

   at
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:511)

   at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:485)

   at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:462)

   at
org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:334)

   at
java.lang.Thread.run(Thread.java:595)

org.apache.axis.wsdl.wsdl2ws.WrapperFault:
java.io.IOException: Type {http://xml.apache.org/xml-soap}octet-stream is
referenced but not defined.

   at
org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.(WSDL2Ws.java:113)

   at
org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(WSDL2Ws.java:1151)

Caused by: java.io.IOException:
Type {http://xml.apache.org/xml-soap}octet-stream is referenced but not
defined.

   at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:631)

   at
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:511)

   at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:485)

   at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:462)

   at
org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:334)

   at
java.lang.Thread.run(Thread.java:595)

 

 








Re: Question about Soap Message with Attachment

2005-10-18 Thread John Hawkins

Response from Mark Whitlock cc'd ->

Hi Yuan,
There are at least 2 possible ways of
describing attachments in the WSDL. Attachments can be described using
the WSDL MIME extensions (like mime:multipartRelated) or using elements
under the http://xml.apache.org/xml-soap namespace. WS-I allows either.
Axis C++ currently only supports elements under the http://xml.apache.org/xml-soap
namespace. The Attachment1.wsdl should be correct. 

I don't know why you are having the
"DataHandler not defined" problem. The Attachment1.wsdl has the
line 

which should pull in the DataHandler
definition. What level of code are you running? Does the problem happen
on the latest level?

In the client, request attachments are
supported, but response attachments are not. I added in the attachment
support in the client, and I would have liked to support response attachments,
WSDL MIME extensions, etc, but unfortunately I did not have sufficient
time.

I am not able to spend much time on
Axis C++, so I may not respond immediately to any further questions.
Mark
Mark Whitlock






"yuan" <[EMAIL PROTECTED]>

18/10/2005 01:34



Please respond to
"Apache AXIS C User List"





To



cc



Subject
Question about Soap Message
with Attachment








Hi,

I have been looking at how to write a WSDL file to use Soap Message with
Attachment. I have found examples on the web using ,
example below:


                
                  

                
                  


      
        
          
            
          
          
            
          
        
      

      
        
          
            
          
          
            
          
        
      
    

NOTE: I am not sure this is how you describe parts relate to mime attachment
types, But without this, there will be NULLPointerException in symboltable.

                
                  

This seems to describe the structure of the soap message correctly with
respect to the documentation on W3C. SoapAttachment* files uses similar
structure as well. 
I tried using this with WSDL2WS, but the generated skeleton and stub don't
use Attachments at all. It will just have a function (in this case
addPhoto), it just treats it as having input xsd:hexBinary and output
xsd:string, no attachment functions used.

I have also found the file under tests directory in the repository:
http://svn.apache.org/repos/test/webservices/axis1/trunk/c/tests/auto_build/
testcases/wsdls/Attachment1.wsdl which also uses attachments. When I try
to
run WSDL2WS on it, it returns the following error: "Type
{http://xml.apache.org/xml-soap}DataHandler is referenced but not defined."
(basically for all types using http://xml.apache.org/xml-soap namespace).


I am not sure how this works but is there suppose to be a schema defined
for
the DataHandler or any other attachment type? Am I supposes to define it
myself? 

Also does WSDL2WS handle multiple Attachments as output?

Can anyone point me in the right direction? Any help is greatly appreciated.

Thanks in Advance.

Regards,
Yuan

--
Yuan Liu
[EMAIL PROTECTED]