I got this working after much stepping through Axis code with the
debugger. What finally worked was switching the order of the GET and
POST bindings in the wsdl. I noticed that Axis was fetching the POST
binding while processing my GET request so I thought swapping them in
the wsdl might make GET work and break POST but now it seems to get a
generic http binding for all http requests and GET and POST both work.
I don't fully understand it but it works so I'm happy.

-Ben

On Thu, Feb 26, 2009 at 12:18 PM, Ben Williams <[email protected]> wrote:
> Yep, my URL looks just like that. When I look at the OMElement that
> gets passed to my service method, though, it is just an empty tag like
> this:
>
> <axis2ns1:certifyContact xmlns:axis2ns1="http://myhost.com/rest/certify"; />
>
> -Ben
>
> On Thu, Feb 26, 2009 at 11:23 AM, keith chapman <[email protected]> 
> wrote:
>> Hi Ben,
>>
>> What is the URL you used when sending request (including the query
>> parameters).
>>
>> According to your wsdl if you send a request to
>> /certifyContact?clientUserID=someUserID&licenseID=someLicenseID&phoneNumbers=SomePhoneNumbers
>> it should work.
>>
>> Thanks,
>> Keith.
>>
>> On Thu, Feb 26, 2009 at 9:28 PM, Ben Williams <[email protected]>
>> wrote:
>>>
>>> I'm not sure if my wsdl is generated or hand-written (I inherited this
>>> project) but here's what it looks like.
>>>
>>> Operation definition:
>>>
>>> <wsdl:binding name="CertifyChannelHTTPGETBinding"
>>> type="tns:CertifyChannelPortType">
>>>    <http:binding verb="GET"></http:binding>
>>>    <wsdl:operation name="certifyContact">
>>>        <http:operation location="/certifyContact"></http:operation>
>>>        <wsdl:input>
>>>            <http:urlEncoded></http:urlEncoded>
>>>        </wsdl:input>
>>>        <wsdl:output>
>>>            <mime:content type="text/xml"></mime:content>
>>>        </wsdl:output>
>>>    </wsdl:operation>
>>> </wsdl:binding>
>>>
>>> Input message schema:
>>>
>>> <xsd:element name="certifyContact">
>>>    <xsd:complexType>
>>>        <xsd:sequence>
>>>            <xsd:element name="clientUserID" type="xsd:string"
>>> minOccurs="0"/>
>>>            <xsd:element name="licenseID" type="xsd:string"></xsd:element>
>>>            <xsd:element name="phoneNumbers"
>>> type="xsd:string"></xsd:element>
>>>        </xsd:sequence>
>>>    </xsd:complexType>
>>> </xsd:element>
>>>
>>> -Ben
>>>
>>> On Wed, Feb 25, 2009 at 10:18 PM, keith chapman <[email protected]>
>>> wrote:
>>> > Could you post some extracts from your generated wsdl please. The
>>> > extracts
>>> > that I need would be the segment defining the operation and the schema
>>> > of
>>> > the input message.
>>> >
>>> > Thanks,
>>> > Keith.
>>> >
>>> > On Thu, Feb 26, 2009 at 2:08 AM, Ben Williams <[email protected]>
>>> > wrote:
>>> >>
>>> >> Hi,
>>> >> I'm upgrading my Axis2 1.1.1 based service to 1.4.1. REST behavior
>>> >> seems to have changed in 1.4.1. When I made a GET request to my
>>> >> service under 1.1.1 Axis would pass a simple XML OMElement to my
>>> >> service method that looked something like this:
>>> >>
>>> >>
>>> >>
>>> >> <certifyContact><licenseID>blahblahblah</licenseID><clientUserID>blah</clientUserID><phoneNumbers>9999999999</phoneNumbers></certifyContact>
>>> >>
>>> >> where licenseID, clientUserID, etc. were parameters in the query
>>> >> string of my request. Under 1.4.1, Axis seems to pass a valid SOAP
>>> >> request as an OMElement to my service method, but it's an empty one
>>> >> and looks like this:
>>> >>
>>> >> <axis2ns1:certifyContact
>>> >> xmlns:axis2ns1="http://myhost.com/rest/certify";
>>> >> />
>>> >>
>>> >> So the question is, what happened to my request parameters? Do I have
>>> >> to do something special to get 1.4.1 to include the query parameters
>>> >> in the OMElement that it constructs?
>>> >>
>>> >> Thanks,
>>> >> -Ben
>>> >
>>> >
>>> >
>>> > --
>>> > Keith Chapman
>>> > Senior Software Engineer
>>> > WSO2 Inc.
>>> > Oxygenating the Web Service Platform.
>>> > http://wso2.org/
>>> >
>>> > blog: http://www.keith-chapman.org
>>> >
>>
>>
>>
>> --
>> Keith Chapman
>> Senior Software Engineer
>> WSO2 Inc.
>> Oxygenating the Web Service Platform.
>> http://wso2.org/
>>
>> blog: http://www.keith-chapman.org
>>
>

Reply via email to