axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roberto (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-2576) WebService dosn't work wih parameter in the method
Date Sun, 22 Apr 2007 09:20:15 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-2576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490694
] 

Roberto commented on AXIS2-2576:
--------------------------------

Seems I understood what's going on...

1.I used to create the wsdl file with the tool java2wsdl & this create
...
<xs:element name="getAvailability">
<xs:complexType>
<xs:sequence>
<xs:element name="param0" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
...

the same I did for the POJO quickstart guide... Reading again the
quickstart guide I realize that the only different was that in the guide
they use ant to generate the .aar file. So I tried with ant & when I
deployed as before and when I wrote
http://localhost:8080/axis2/services/StockService?wsdl (myservice) I saw
that generated wsdl file was different instead of param0 there the name of
my parameter
...
<xs:element name="getAvailability">
<xs:complexType>
<xs:sequence>
<xs:element name="strType" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
...

And now it works properly. So as I said Im a newbie & sorry if I bother
you with this stuff but I thought that "param0" was just like a variable.

Regards
Roberto





> WebService dosn't work wih parameter in the method
> --------------------------------------------------
>
>                 Key: AXIS2-2576
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2576
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 1.1.1
>         Environment: windows xp. Last version of axis2.war (april 21, 2007)
>            Reporter: Roberto
>            Priority: Critical
>
> Hi experts (Im a newbie),
> I got a little problems that I cannot solve by myself... I got this simple
> service:
> public class StockService {
>    private String datiBack=null;
>    public String getAvailability(){
>    //public String getAvailability(String strType){
>      datiBack = "Sembra funzionare";
>      return datiBack;
>    }
> }
> I compile it I create an .aar file I upload it in Axis2 everything works
> properly I make the request thru browser
> http://localhost:8080/axis2/services/StockService/getAvailability
> and I got the "Sembra funzionare" wrapped in soap tag.
> If I uncomment & change the getAvailability method with the one that need
> a String parameter, I compile everything I upload in Axis2, same as
> before, everything is ok but when I make the request
> http://localhost:8080/axis2/rest/StockService/getAvailability?strType=Nylon
> I got this back:
> <soapenv:Fault>
>  <faultcode/>
>    <faultstring>
>      Required element null defined in the schema can not be found in the
> request
>    </faultstring>
>    <detail/>
> </soapenv:Fault>
> The same problem is following the POJO example under the quickstart guide (http://ws.apache.org/axis2/1_1_1/quickstartguide.html#deploy)
> So if somebody can explain me that could be great
> Thanx in adavance
> Ciao
> Roberto

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message