incubator-agila-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tngu...@symcor.com
Subject Re: get back the response message
Date Sun, 05 Feb 2006 19:08:27 GMT

Davidee,

I try to send this soap message, but I got this exception:
Feb 5, 2006 2:00:19 PM com.sun.xml.messaging.saaj.soap.MessageImpl
saveChanges
SEVERE: SAAJ0540: Error during saving a multipart message
com.sun.xml.messaging.saaj.SOAPExceptionImpl: Error during saving a
multipart me
ssage
        at
com.sun.xml.messaging.saaj.soap.MessageImpl.saveChanges(MessageImpl.j
ava:1104)
        at
com.symcor.wir.delegate.ESBDelegate.createSOAPMessage(ESBDelegate.jav
a:123)
        at
com.symcor.wir.delegate.ESBDelegate.invokeExceptionService(ESBDelegat
e.java:134)
        at
com.symcor.wir.web.actions.SubmitESBAction.onExecute(SubmitESBAction.
java:95)

I don't need to create the multipart, but it give me the error.  What
version of saaj and what jdk you are using?  I used the jdk 1.5, and the
saaj 1.3 (because it either has runtime exception or compile errors if I
use different version).  Is Saaj 1.3 need us to add the multipart message?

Thanks
Tu


                                                                           
             Davide Ling                                                   
             <lingda@libero.it                                             
             >                                                          To 
                                       agila-user@incubator.apache.org     
             02/05/2006 05:24                                           cc 
             AM                                                            
                                                                   Subject 
                                       Re: get back the response message   
             Please respond to                                             
             agila-user@incuba                                             
              tor.apache.org                                               
                                                                           
                                                                           
                                                                           




Ehm... in the preceding mail the message to send has this schema

<xsd:complexType name="orderRegistrationMessageType">
                         <xsd:sequence>
                                                 <xsd:element name="name"
type="xsd:string" />
                                                 <xsd:element
name="surname" type="xsd:string" />
                                                 <xsd:element
name="address" type="tns:addressType" />
                                                 <xsd:element
name="itemList"

type="tns:itemListType" />
                                                 <xsd:element
name="shipMode" type="xsd:string" />
                                                 <xsd:element
name="taxNumber" type="xsd:string" />
                                                 <xsd:element
name="emailAddress" type="xsd:string" />
                         </xsd:sequence>
</xsd:complexType>

And I forgot to remove (in the headers creation section):
    SOAPHeader header = message.getSOAPHeader();
since method createHeaderElement doesn't need a SOAPHeader object
but needs a SOAPMessage object:

public void createHeaderElement(SOAPMessage message,
           String headerElementName, String prefix,
           String namespace, String headerElementText)
        throws SOAPException {

        SOAPHeader header = message.getSOAPHeader();
        SOAPHeaderElement operationElement =    header.addHeaderElement(

soapFactory.createName(headerElementName,prefix,namespace));
        operationElement.addTextNode(headerElementText);

    }

So ...

// ----------- Headers creation -------------
// ---NO--- SOAPHeader header = message.getSOAPHeader();
Mime
View raw message