incubator-agila-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davide Ling <lin...@libero.it>
Subject Re: get back the response message
Date Sun, 05 Feb 2006 10:24:37 GMT
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();
            
soapMessageHandler.createHeaderElement(message, "partner", "tws",
                   "http://www.apache.org/agila","orderingPL");
soapMessageHandler.createHeaderElement(message, "port", "tws",
                   "http://www.apache.org/agila","orderPT");
soapMessageHandler.createHeaderElement(message, "operation", "tws",
                   "http://www.apache.org/agila","sendOrder");
// ---------------------------------------------------

Sorry
-- 
Davide Ling
Sito Personale - http://davideling.altervista.org
Key fingerprint = 284A 0FB9 F9F6 763C D429  E02B AA5D 483A 7E45 D2A6

Mime
View raw message