I just tried the sample AddressBook service using WGET, with this test.xml

<ser:findEntry xmlns:ser="http://service.addressbook.sample";>
         <ser:param0>paul</ser:param0>
      </ser:findEntry>

and it worked. It worked with both content-type was application/xml
and text/xml.

Here was the command line:
wget --post-file=test.xml
http://localhost:8081/axis2/services/AddressBookService
--header="Content-Type: text/xml"

and here was my trace:
POST /axis2/services/AddressBookService HTTP/1.0
User-Agent: Wget/1.10.2
Accept: */*
Host: 127.0.0.1:8081
Connection: Keep-Alive
Content-Type: application/xml
Content-Length: 127

<ser:findEntry xmlns:ser="http://service.addressbook.sample";>
   <ser:param0>paul</ser:param0>      </ser:findEntry>

response:
HTTP/1.0 200 OK
Date: Wed, 09 Jul 2008 15:36:53 GMT
Server: Simple-Server/1.1
Content-Type: application/xml; charset=UTF-8
Connection: Close

<ns:findEntryResponse xmlns:ns="http://service.addressbook.sample";>
   <ns:return xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:nil="true" /></ns:findEntryResponse>

I have the following in my axis2.xml
<parameter name="disableREST" locked="true">false</parameter>

Paul

On Wed, Jul 9, 2008 at 2:53 PM, David <[EMAIL PROTECTED]> wrote:
> I'm using Axis2 version 1.3, for the content-type it's "application/xml"
>
> This is the exception :
>
> <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Body><soapenv:Fault><faultcode/><faultstring>First
> Element must contain the local name, Envelope , but found
> identification</faultstring><detail><Exception>org.apache.axis2.AxisFault:
> First Element must contain the local name, Envelope , but found nr1
>     at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
>     at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:277)
>     at
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120)
>     at
> com.efluid.edk.commun.webservice.servlet.EDKAxis2Servlet.doPost(EDKAxis2Servlet.java:37)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>     at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
>     at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
>     at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
>     at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>     at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>     at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
>     at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>     at
> org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
>     at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
>     at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>     at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
>     at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
>     at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>     at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
>     at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
>     at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
>     at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
>     at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
>     at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
>     at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>     at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
>     at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>     at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>     at
> org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
>     at
> org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
>     at java.lang.Thread.run(Thread.java:534)
> Caused by: org.apache.axiom.soap.SOAPProcessingException: First Element must
> contain the local name, Envelope , but found nr1
>     at
> org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:219)
>     at
> org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:177)
>     at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:163)
>     at
> org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:161)
>     at
> org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.&lt;init&gt;(StAXSOAPModelBuilder.java:110)
>     at
> org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:53)
>     at
> org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:160)
>     at
> org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:111)
>     at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:270)
>     ... 34 more
> </Exception></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
>
>
> David
>
>
> ----- Message d'origine ----
> De : Paul Fremantle <[EMAIL PROTECTED]>
> À : [email protected]
> Envoyé le : Mercredi, 9 Juillet 2008, 15h36mn 24s
> Objet : Re: Re : Re : [Axis2] Soap Protocol
>
> Can you post your exception? And also which version of Axis2 are you using?
> You don't normally have to do anything to handle xml. One more
> question - what is the content-type of the HTTP POST?
>
> Paul
>
> On Wed, Jul 9, 2008 at 2:07 PM, David <[EMAIL PROTECTED]> wrote:
>> To be more precise, I must develop a Web service with Axis2 which must be
>> able to receive a message like this :
>>
>> <?xml version="1.0" encoding="utf-8"?>
>>
>> <nr1:recupererDonneesPCEOperation
>> xmlns:nr1="urn:recpce:wsathena.omega.france.com"
>> xmlns:nr2="urn:types:mapping.demande.omega.com">
>>
>> <nr1:pRequete>
>>
>> <nr2:Utilisateur>
>>
>> <nr2:Login>aumont_a</nr2:Login>
>>
>> </nr2:Utilisateur>
>>
>> <nr2:NumeroVersion>1.0</nr2:NumeroVersion>
>>
>> <DonneesPceRecuperer>
>>
>> <nr2:NumeroPCE>01506512227601</nr2:NumeroPCE>
>>
>> </DonneesPceRecuperer>
>>
>> </nr1:pRequete>
>>
>> </nr1:recupererDonneesPCEOperation>
>>
>> But i have a SOAPProcessingException...
>>
>> Any idea, how to configure Axis2 to accept this message which doesn't
>> respect the SOAP protocol???
>>
>> Thanks a lot,
>>
>> David
>>
>>
>>
>> ----- Message d'origine ----
>> De : David <[EMAIL PROTECTED]>
>> À : [email protected]
>> Envoyé le : Mercredi, 9 Juillet 2008, 13h27mn 37s
>> Objet : Re : [Axis2] Soap Protocol
>>
>> is there a parameter to indicate in axis2.xml to handle the body XML
>> without
>> the SOAP Enveloping?
>> which is handling has to make?
>>
>> thanks
>>
>> David
>>
>> ----- Message d'origine ----
>> De : Paul Fremantle <[EMAIL PROTECTED]>
>> À : [email protected]
>> Envoyé le : Mercredi, 9 Juillet 2008, 12h29mn 44s
>> Objet : Re: [Axis2] Soap Protocol
>>
>> David
>>
>> No. Axis2 will also handle the body XML without the SOAP Enveloping.
>>
>> Paul
>>
>> 2008/7/9 David <[EMAIL PROTECTED]>:
>>>
>>> Hello,
>>>
>>> With Axis2, one is obliged to respect this formalism ?
>>>
>>> <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"; >
>>>  <env:Body>
>>>    ...
>>>  </env:Body>
>>> </env:Envelope>
>>>
>>> Thank you for your help,
>>>
>>> David
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ________________________________
>>> Envoyé avec Yahoo! Mail.
>>> Une boite mail plus intelligente.
>>> ________________________________
>>> Envoyé avec Yahoo! Mail.
>>> Une boite mail plus intelligente.
>>
>>
>>
>> --
>> Paul Fremantle
>> Co-Founder and CTO, WSO2
>> Apache Synapse PMC Chair
>> OASIS WS-RX TC Co-chair
>>
>> blog: http://pzf.fremantle.org
>> [EMAIL PROTECTED]
>>
>> "Oxygenating the Web Service Platform", www.wso2.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> ________________________________
>> Envoyé avec Yahoo! Mail.
>> Une boite mail plus intelligente.
>> ________________________________
>> Envoyé avec Yahoo! Mail.
>> Une boite mail plus intelligente.
>
>
>
> --
> Paul Fremantle
> Co-Founder and CTO, WSO2
> Apache Synapse PMC Chair
> OASIS WS-RX TC Co-chair
>
> blog: http://pzf.fremantle.org
> [EMAIL PROTECTED]
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ________________________________
> Envoyé avec Yahoo! Mail.
> Une boite mail plus intelligente.



-- 
Paul Fremantle
Co-Founder and CTO, WSO2
Apache Synapse PMC Chair
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
[EMAIL PROTECTED]

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to