axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pseudo Nym <infoeng2...@yahoo.com>
Subject SOAP with attachments problem
Date Wed, 04 Aug 2004 04:52:16 GMT
Hello, 
   I am trying to get my SOAP with attachments
application working, but the attachment that is
supposed to be passed to the application (in a
DataHandler) is null.  The method involves sending an
arbitrary document in an attachment, with several
parameters in the SOAP body.  

   The WSDL elements involved in the operation are:

-----WSDL Elements for certifyDocumentAccount-----

<wsdl:portType name="InfoEngServerImpl">
      <wsdl:operation name="certifyDocumentAccount"
parameterOrder="accountID accountPass
issuanceParameters documentInfo">
         <wsdl:input
message="impl:certifyDocumentAccountRequest"
name="certifyDocumentAccountRequest"/>
         <wsdl:output
message="impl:certifyDocumentAccountResponse"
name="certifyDocumentAccountResponse"/>
      </wsdl:operation>
</wsdl:portType>

   <wsdl:message name="certifyDocumentAccountRequest">
      <wsdl:part name="accountID" type="xsd:string"/>
      <wsdl:part name="accountPass"
type="xsd:string"/>
      <wsdl:part name="issuanceParameters"
type="xsd:string"/>
      <wsdl:part name="documentInfo"
type="xsd:base64Binary"/>
   </wsdl:message>

   <wsdl:message
name="certifyDocumentAccountResponse">
      <wsdl:part name="certificateSeries"
type="xsd:string"/>
   </wsdl:message>

<wsdl:binding name="InfoEngWSSoapBinding"
type="impl:InfoEngServerImpl">
      <wsdl:operation name="certifyDocumentAccount">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input
name="certifyDocumentAccountRequest">
            <mime:multipartRelated>
               <mime:part>
                  <wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:InfoEngWS" use="encoded"/>
               </mime:part>
               <mime:part>
                  <mime:content part="documentInfo"
type="*/*"/>
               </mime:part>
            </mime:multipartRelated>
         </wsdl:input>
         <wsdl:output
name="certifyDocumentAccountResponse">
            <wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:InfoEngWS" use="encoded"/>
         </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>


   <wsdl:service name="InfoEngServerImplService">
 
      <wsdl:port binding="impl:InfoEngWSSoapBinding"
name="InfoEngWS">
         <wsdlsoap:address
location="http://localhost:8443/axis/services/InfoEngWS"/>
      </wsdl:port>
   </wsdl:service>

---- End WSDL elements. ----

Here is the message that is sent to 

---- Message delivered to SOAP server. ----

------=_Part_0_4999541.1091590723183
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: binary
Content-Id: <67F3D33433AB2342CBC04CC366217B50>
                                                      
                                                      
                                 
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <ns1:certifyDocumentAccount
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="urn:InfoEngWS"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
   <ns1:accountID></ns1:accountID>
   <ns1:accountPass></ns1:accountPass>
   <ns1:issuanceParameters></ns1:issuanceParameters>
  </ns1:certifyDocumentAccount>
 </soapenv:Body>
</soapenv:Envelope>
------=_Part_0_4999541.1091590723183
Content-Type: text/plain
Content-Transfer-Encoding: binary
Content-Id: <CCB1FDEFD3CA13EA7448068C94D554D9>
                                                      
                                                      
                                 
Nov. 19, 1863
                                                      
                                                      
                                 
"Fourscore and seven years ago our fathers brought
forth on this continent a new nation, conceived in
liberty and dedicated to the proposition that all men
are created equal.
                                                      
                                                      
                                 
Now we are engaged in a great civil war, testing
whether that nation or any nation so conceived and so
dedicated can long endure. We are met on a great
battlefield of that war. We have come to dedicate a
portion of it as a final resting place for those who
died here that the nation might live. This we may, in
all propriety do. But in a larger sense, we cannot
dedicate, we cannot consecrate, we cannot hallow this
ground. The brave men, living and dead who struggled
here have hallowed it far above our poor power to add
or detract. The world will little note nor long
remember what we say here, but it can never forget
what they did here.
                                                      
                                                      
                                 
It is rather for us the living, we here be dedicated
to the great task remaining before us--that from these
honored dead we take increased devotion to that cause
for which they here gave the last full measure of
devotion--that we here highly resolve that these dead
shall not have died in vain, that this nation shall
have a new birth of freedom, and that government of
the people, by the people, for the people shall not
perish from the earth."
                                                      
                                                      
                                 
                                                      
                                                      
                                 
------=_Part_0_4999541.1091590723183--

---- End message delivered to SOAP Server. ----

   The code that is processing the message is
generated by WSDL2Java, with this method:

public java.lang.String certifyDocumentAccount( String
accountID, String accountPass, String
issuanceParameters, javax.activation.DataHandler
documentInfo ) throws java.rmi.RemoteException {
return iesi.certifyDocumentAccount(accountID,
accountPass, issuanceParameters,documentInfo);
}

and iesi.certifyDocumentAccount(String, String,
String, DataHandler) returns an AxisFault when the
DataHandler object is null.  

---- Response from SOAP server. ----

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <soapenv:Fault>
  
<faultcode>soapenv:Server.generalException</faultcode>
   <faultstring>documentInfo is null!</faultstring>
   <detail/>
  </soapenv:Fault>
 </soapenv:Body>
</soapenv:Envelope>

---- End of response from SOAP server. ----

   Can anyone help?  Thanks in advance!

   Patrick



		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

Mime
View raw message