Hi John, Can you use TCP Monitor and track your request please. text/xml is the content type of SOAP 1.1, but some send rest request also as SOAP 1.1 hence we do a bit of a check in Axis2. SOAP 1.1 mandates the soapaction http header. So if the request contentType is text/xml and the request has a soapaction httpheader axis2 will treat it as a SAOP request and hence the SOAPBuilder will get called. On the otherhand if the request contentType is text/xml and there is no soapaction http header then Axis2 wil treat this as a pox request and the ApplicationXMLBuilder will get called.
I presume this is the problem your facing, hence please check your request using TCP Monitor. Thanks, Keith. On Nov 27, 2007 11:11 PM, John Pfeifer <[EMAIL PROTECTED]> wrote: > Keith, > > Thanks for the info. I deployed the axis2.war file and the Version > service works properly. The axis2.xml is identical to the one that I use > in my war file. I am still having the same issue with my web service > however. Perhaps the snippet below may explain what is happening. It looks > like Axis wants to use the SOAPBuilder for the POX request. I have > confirmed that I am sending XML without SOAP Envelope, so I am not sure why > it's attempting to use the SOAPBuilder. Any ideas? > > <11/27/07 12:24:15:389>|[ACTIVE] ExecuteThread: '2' for queue: ' > weblogic.kernel.Default (self-tuning)'|DEBUG|builder.BuilderUtil|Input > contentType (text/xml)| > <11/27/07 12:24:15:389>|[ACTIVE] ExecuteThread: '2' for queue: ' > weblogic.kernel.Default(self-tuning)'|DEBUG|builder.BuilderUtil|CharSetEncoding > defaulted (UTF-8)| > <11/27/07 12:24:15:389>|[ACTIVE] ExecuteThread: '2' for queue: ' > weblogic.kernel.Default(self-tuning)'|DEBUG|transport.TransportUtils|createSOAPEnvelope > using > Builder (class org.apache.axis2.builder.SOAPBuilder) selected from type > (application/xml)| > <11/27/07 12:24:15:389>|[ACTIVE] ExecuteThread: '2' for queue: ' > weblogic.kernel.Default (self-tuning)'|DEBUG|builder.BuilderUtil|char set > encoding set from default =UTF-8| > <11/27/07 12:24:15:390>|[ACTIVE] ExecuteThread: '2' for queue: ' > weblogic.kernel.Default(self-tuning)'|DEBUG|http.AxisServlet|org.apache.axis2.AxisFault: > First > Element must contain the local name, Envelope , but found > PayCaptureRequestServiceRequest| > > > Thanks, > > John > > > > -----Original Message----- > From: keith chapman [mailto:[EMAIL PROTECTED] > Sent: Tue 11/27/2007 11:07 AM > To: [email protected] > Subject: Re: Axis2 1.3 Rest Support > > Hi John, > > Yes both SOAP and REST request are handled by the same endpoint and there > is > no /soap/ or /rest/ in the request URL now. > > Yes REST services don't require a SOAP envelop and you can send the > request > via GET , POST, PUT or DELETE. > > The easiest way to test REST is to go to > http://localhost:8080/axis2/services/version/getVersion on the browser. > This > will send a GET to the version service which would respond using a POX > response. > > If you want true REST behaviour where you can send parameters in the path > segment or as customized query parameters you shpu;d have a look at > WSDL 2.0HTTPBinding. If you deploy a service using WSDL > 2.0 Axis2 can handle request as described in your WSDL. > > for eg. Axis2 default URL to get the version of the version service would > be > http://localhost:8080/axis2/services/version/getVersion but if you > deployed > this service via a WSDL 2.0 you can alter the request URL to suite your > needs. > > If you need more help please let me know. I'll be glad to assist you. > > Thanks, > Keith. > > On Nov 27, 2007 9:07 PM, John Pfeifer <[EMAIL PROTECTED]> > wrote: > > > I recently upgraded from Axis2 1.1 to 1.3. In version 1.1 I configured > > the RestServlet to handle all requests to /rest/*. > > > > The web services themselves aren't truely restful, but I need to be able > > to support both SOAP and POX. Basically what I want is for my web > service > > to support both SOAP and POX without having to modify my code. This was > > working perfectly before as Axis2 stripped off the SOAP Envelop for SOAP > > requests and left Rest requests alone. This is the behavior that I > want, > > but I am having difficulty figuring out how to configure the server > side. > > > > Since upgrading to 1.3, I discovered that the RestServlet no longer > > exists. In addition, I am having difficulty figuring out how to > configure > > the server side. Are SOAP and Rest request handled by a single endpoint > > now? If so, the axis2 documentation says "REST Web Services do not have > > Headers and the payload is sent directly.", does this mean that Rest > > services don't have a SOAP Envelope, or that HTTP SOAP Headers are > absent? > > > > I would appreciate it if someone could point me in the right direction, > or > > refer me to some documentation that has a bit more detail than the > "RESTful > > Web Services Support" page in the Axis2 docs. > > > > Thanks, > > > > John > > > > > > -- > Keith Chapman > WSO2 Inc. > Oxygen for Web Services Developers. > http://wso2.org/ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- Keith Chapman WSO2 Inc. Oxygen for Web Services Developers. http://wso2.org/
