Hi,

 

I try to get a asynchronous webservice via smtp working. But I get a “A
required header representing a Message Addressing Property is not present”
exception during the predispatch phase.

AxisEngine.sendfault() sents me a faultmessage back. It seems that no
Message Addressing Header is provided. How / where do I add such a header?
Do I have to modify the wsdl?

Does a Message Addressing refer to <wsdl:port
name="PAServiceSOAP11port_mail1"
binding="axis2:PAServiceSOAP11Binding"><soap:address location="
mail:[EMAIL PROTECTED]/services/PAService"/ "/></wsdl:port>?

 

Please take a look at the code bellow.

 

Thanks a lot!

 

Best regards

 

Nicholas

 

************ sending the request on the client side ***********************

 

ConfigurationContext configurationContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(set.get
Repo(),set.getXml());

                

HttpTransportProperties.MailProperties mailProps  = new
HttpTransportProperties.MailProperties();

 
mailProps.addProperty("mail.smtp.host",set.getSmtpProps()[0]);

 
mailProps.addProperty("mail.smtp.user",set.getSmtpProps()[1]);

                mailProps.setPassword(set.getSmtpProps()[2]);

  

                ServiceClient sender = new
ServiceClient(configurationContext, null);

                Options options = new Options();

                options.setProperty(HTTPConstants.MAIL_SMTP, mailProps);

                options.setTo(targetEPR);

                options.setTransportInProtocol(Constants.TRANSPORT_HTTP);

  

                sender.setOptions(options);

                

                sender.fireAndForget(payload);

 

************ the request  sent from the client by
email***********************

<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:wsa="http://www.w3.org/2005/08/addressing";
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Header><w
sa:To>mail:[EMAIL PROTECTED]/axis2/services/PAService</wsa:To><wsa:Repl
yTo><wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address
></wsa:ReplyTo><wsa:MessageID>urn:uuid:1E0F17FB3C4D0EEECC11688059456521</wsa
:MessageID></soapenv:Header><soapenv:Body><tns:doWork
xmlns:tns="http://localhost:8080/axis2/services/PAService";><tns:symbol></tns
:symbol><tns:n1>548452</tns:n1><tns:n2>444239</tns:n2></tns:doWork></soapenv
:Body></soapenv:Envelope>

 

 

************ the answer message sent back by the server   by email
***********************

 

<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:wsa="http://www.w3.org/2005/08/addressing";
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Header><w
sa:To>http://www.w3.org/2005/08/addressing/anonymous</wsa:To><wsa:ReplyTo><w
sa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address></wsa:Repl
yTo><wsa:MessageID>urn:uuid:4C2B6D41577BC6294D11687875529684</wsa:MessageID>
<wsa:RelatesTo
wsa:RelationshipType="http://www.w3.org/2005/08/addressing/reply";>urn:uuid:4
56A6FA9785DE40833116878753628125</wsa:RelatesTo><wsa:FaultDetail><wsa:Proble
mHeaderQName>wsa:Action</wsa:ProblemHeaderQName></wsa:FaultDetail></soapenv:
Header><soapenv:Body><soapenv:Fault><faultcode>wsa:MessageAddressingHeaderRe
quired</faultcode><faultstring>A required header representing a Message
Addressing Property is not present</faultstring><detail
/></soapenv:Fault></soapenv:Body></soapenv:Envelope>

 


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.10/625 - Release Date: 13.01.2007
17:40
 

Reply via email to