Hi Brian,
it works! Thanks a lot! Best regards nicholas Von: Brian De Pradine [mailto:[EMAIL PROTECTED] Gesendet: Montag, 15. Januar 2007 11:54 An: [email protected] Betreff: Re: [Axis2] A required header representing a Message Addressing Property is not present Hello Nicholas, I believe that you need to explicitly add an action in your client code. options.setAction("urn:doWork"); Cheers Brian DePradine Web Services Development IBM Hursley External +44 (0) 1962 816319 Internal 246319 If you can't find the time to do it right the first time, where will you find the time to do it again? "korges" <[EMAIL PROTECTED]> wrote on 14/01/2007 20:36:59: > 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.getRepo(),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><wsa:To>mail: > [EMAIL PROTECTED]/axis2/services/PAService</wsa:To><wsa: > ReplyTo><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><wsa:To>http://www.w3. > org/2005/08/addressing/anonymous</wsa:To><wsa:ReplyTo><wsa: > Address>http://www.w3.org/2005/08/addressing/none</wsa: > Address></wsa:ReplyTo><wsa:MessageID>urn:uuid: > 4C2B6D41577BC6294D11687875529684</wsa:MessageID><wsa:RelatesTo wsa: > RelationshipType="http://www.w3.org/2005/08/addressing/reply">urn: > uuid:456A6FA9785DE40833116878753628125</wsa:RelatesTo><wsa: > FaultDetail><wsa:ProblemHeaderQName>wsa:Action</wsa: > ProblemHeaderQName></wsa:FaultDetail></soapenv:Header><soapenv: > Body><soapenv:Fault><faultcode>wsa: > MessageAddressingHeaderRequired</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 -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.432 / Virus Database: 268.16.11/627 - Release Date: 15.01.2007 07:54 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.432 / Virus Database: 268.16.11/627 - Release Date: 15.01.2007 07:54
