Davanum,

Yep, looks like you fixed it. I tried the 1.1 release version and get correct 
behavior. 

My request now looks as expected:


  <axis2ns2:firstName>Bob</axis2ns2:firstName>
  <axis2ns2:lastName>Smith</axis2ns2:lastName>
</axis2ns2:findAuthors>

Thanks and good work,

-Chris

----- Original Message ----
From: Davanum Srinivas <[EMAIL PROTECTED]>
To: axis-user@ws.apache.org
Sent: Saturday, November 18, 2006 6:30:20 PM
Subject: Re: [AXIS2] issue converting REST request to XML

Did you try 1.1 release? i think i may have fixed it already.

-- dims

On 11/18/06, Davanum Srinivas <[EMAIL PROTECTED]> wrote:
> Christopher,
>
> This is a bug. Please log a JIRA issue with your complete wsdl/schema
> and soap request / sample code.
>
> thanks,
> dims
>
> On 11/18/06, Christopher Bare <[EMAIL PROTECTED]> wrote:
> >
> > I'm having a problem with the REST feature of Axis2. I hacked up a WSDL 
> > which specifies a "findAuthors" method. I use RawXMLINOutMessageReceiver 
> > so, on the Java side, the method looks like this:
> >
> > public OMElement findAuthors(OMElement parameters);
> >
> > This method works fine when I call it from SOAP. It gets a SOAP body that 
> > looks like this:
> >
> >
> >     <firstName>Bob</firstName>
> >     <lastName>Smith</lastName>
> > </findAuthors>
> >
> > Totally cool... But, calling it through the REST method with the URL:
> >
> > http://localhost:8080/axis2/rest/books/findAuthors?firstName=Bob&lastName=Smith
> >
> > Results in this OMElement:
> >
> >
> >     <firstName>Bob</firstName>
> >     <lastName>Smith</lastName>
> > </axis2ns3:findAuthors>
> >
> > This fails because the firstName and lastName elements are in the wrong 
> > namespace. They need to be in the "http://cbare.org/books-ws/";; namespace 
> > and they're not.
> >
> > I guess calling a RawXML method using REST might be a nutty thing to want 
> > to do. But leaving that aside, is there a problem with the way the 
> > framework generates XML from a REST request? Or am I using it wrong? The 
> > REST binding for that method looks like this:
> >
> >     <wsdl:binding name="booksHttpBinding" type="cbws:booksPortType">
> >         <http:binding verb="POST"/>
> >         <wsdl:operation name="findAuthors">
> >             <http:operation location="findAuthors"/>
> >             <wsdl:input>
> >                 <mime:content type="text/xml"/>
> >             </wsdl:input>
> >             <wsdl:output>
> >                 <mime:content type="text/xml"/>
> >             </wsdl:output>
> >         </wsdl:operation>
> >         ...
> >     </wsdl:binding>
> >
> > Is there something I need to tweak in here to let clue it in about the 
> > namespaces?
> >
> > Finally, for good measure, the WSDL type definition looks like this:
> >
> >
> >     elementFormDefault="qualified">
> >
> >     <xsd:element name="findAuthors">
> >         <xsd:complexType>
> >             <xsd:sequence>
> >                 <xsd:element name="firstName" type="xsd:string" 
> > nillable="true" minOccurs="0" maxOccurs="1"/>
> >                 <xsd:element name="lastName" type="xsd:string" 
> > minOccurs="1" maxOccurs="1"/>
> >             </xsd:sequence>
> >         </xsd:complexType>
> >     </xsd:element>
> >    ...
> >
> > I'm using: Apache Axis2 1.1-SNAPSHOT build (October 31 2006), just in case 
> > that matters. Thanks for any hints,
> >
> > - Chris
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

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





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

Reply via email to