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 17:00:18 GMT

Davide, thanks a lot for your help.

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