You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by rm...@montefiore.ch on 2007/04/21 14:40:14 UTC
Problems with my service
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/services/StockService/getAvailability?tipo=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>
And I cannot understand why, even if I make the request null with
http://localhost:8080/axis2/services/StockService/getAvailability?tipo=
I got back the same error
The second thing that I would ask you, is why when I put my wsdl file in
the META-INF folder to include in the .aar file & then I make the request
http://localhost:8080/axis2/services/StockService?wsld
I cannot see my one but the one generated by Axis. And last question...
should I create a xsd file to put it in the META-INF folder as well?
Thanx in adavance
Ciao
Roberto
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Problems with my service
Posted by rm...@montefiore.ch.
Ok I'll try to follow your counsel, as you said my example is not so much
different from the quickstart guide's one.
Using the browser is the way they show in the POJO examples, but anyway
there was a problem I used to write:
http://localhost:8080/axis2/services/StockService/getAvailability?strType=Nylon
instead of
http://localhost:8080/axis2/rest/StockService/getAvailability?strType=Nylon
unfortunately I got always the same feedback.
I'll let you know after trying the quickstartguide example
Thanx
Cheers
Roberto
> OK, I see...in that case, I would follow the quickguide precisely and
> make sure it works for you before coming up with your own example. (If
> you can't get the quickguide example to work, that's probably a better
> place to first start asking Q's on this mailing list.) At any rate, the
> quickguide example is quite similar to what you are attempting, so it
> should not be that much lost effort.
>
> Also, I'm not certain of the types of clients you are using--just via
> browser currently, or another one listed in that guide?
>
> Glen
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Problems with my service
Posted by Glen Mazza <gr...@verizon.net>.
Yes, axis2.war always comes with the Version service, I would ignore it
for your purposes.
BTW, you may also be incurring problems reinstalling new compilations of
the same web service (rebuilding it and having Axis2.war use the
new .aar file instead of the previous one you sent it), what I have done
in those cases is just drop axis2.war and reinstall the war file, and
then put the new .aar file in. [If anyone could give me a better way of
doing this on Apache Geronimo using Tomcat--how to remove (not disable,
but permanently delete) a previous .aar service and reinstall a new
version of the service without needing to drop & reinstall axis2.war it
would be most appreciated!]
The inconsistency you get below I believe is because you are making a
REST-type request (just adding URL parameters) but getting a SOAP-type
response. They're different protocols and are hence incompatible.
In your shoes, I would stay with SOAP right now (ignore my previous
suggestion otherwise ;) and try to get a better (non-browser) client
working. Maybe look at the other types of client examples on the bottom
of the quickstart page. Also, if you ever figure out what was poorly
stated or confusing for you in the quickstart guide (what one or two
sentences, if added, would have gotten everything working for you),
please submit a rewording suggestion on JIRA[1] so others won't have to
experience the same headaches in the future.
HTH,
Glen
[1] http://issues.apache.org/jira/browse/AXIS2
Am Samstag, den 21.04.2007, 16:36 +0200 schrieb rmarra@montefiore.ch:
> I did... I follow the example and you know what ... I got the same
> "error", and more... when you install axis2.war is alredy a service
> there...called "Version", trying to use that service same... stuff
>
> request:
> http://localhost:8080/axis2/rest/StockQuoteService/getPrice?symbol=IBM
>
> answer
>
> <soapenv:Fault>
> <faultcode/>
> <faultstring>
> Required element null defined in the schema can not be found in the request
> </faultstring>
> <detail/>
> </soapenv:Fault>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Problems with my service
Posted by rm...@montefiore.ch.
I did... I follow the example and you know what ... I got the same
"error", and more... when you install axis2.war is alredy a service
there...called "Version", trying to use that service same... stuff
request:
http://localhost:8080/axis2/rest/StockQuoteService/getPrice?symbol=IBM
answer
<soapenv:Fault>
<faultcode/>
<faultstring>
Required element null defined in the schema can not be found in the request
</faultstring>
<detail/>
</soapenv:Fault>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Problems with my service
Posted by Glen Mazza <gr...@verizon.net>.
OK, I see...in that case, I would follow the quickguide precisely and
make sure it works for you before coming up with your own example. (If
you can't get the quickguide example to work, that's probably a better
place to first start asking Q's on this mailing list.) At any rate, the
quickguide example is quite similar to what you are attempting, so it
should not be that much lost effort.
Also, I'm not certain of the types of clients you are using--just via
browser currently, or another one listed in that guide?
Glen
Am Samstag, den 21.04.2007, 15:31 +0200 schrieb rmarra@montefiore.ch:
> Im just doing some test following the quickguide of Axis2, BTW the problem
> still the same even changing the parameter from "tipo" to "strType"...
>
> > Offhand, it's not clear to me why a GET URL parameter named "tipo"
> > should automatically populate a Java parameter named "strType" anyway,
> > so I'm not seeing the problem here.
> >
> > For the type of work you are doing (and given the GET calls you are
> > making), I wonder if using the REST style of web services
> > (http://www.xfront.com/REST-Web-Services.html), might be easier for
> > you--Axis2 supports REST also.
> >
> > Glen
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Problems with my service
Posted by rm...@montefiore.ch.
Im just doing some test following the quickguide of Axis2, BTW the problem
still the same even changing the parameter from "tipo" to "strType"...
> Offhand, it's not clear to me why a GET URL parameter named "tipo"
> should automatically populate a Java parameter named "strType" anyway,
> so I'm not seeing the problem here.
>
> For the type of work you are doing (and given the GET calls you are
> making), I wonder if using the REST style of web services
> (http://www.xfront.com/REST-Web-Services.html), might be easier for
> you--Axis2 supports REST also.
>
> Glen
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Problems with my service
Posted by Glen Mazza <gr...@verizon.net>.
Offhand, it's not clear to me why a GET URL parameter named "tipo"
should automatically populate a Java parameter named "strType" anyway,
so I'm not seeing the problem here.
For the type of work you are doing (and given the GET calls you are
making), I wonder if using the REST style of web services
(http://www.xfront.com/REST-Web-Services.html), might be easier for
you--Axis2 supports REST also.
Glen
Am Samstag, den 21.04.2007, 14:40 +0200 schrieb rmarra@montefiore.ch:
> 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/services/StockService/getAvailability?tipo=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>
>
> And I cannot understand why, even if I make the request null with
> http://localhost:8080/axis2/services/StockService/getAvailability?tipo=
> I got back the same error
>
>
> The second thing that I would ask you, is why when I put my wsdl file in
> the META-INF folder to include in the .aar file & then I make the request
> http://localhost:8080/axis2/services/StockService?wsld
> I cannot see my one but the one generated by Axis. And last question...
> should I create a xsd file to put it in the META-INF folder as well?
>
> Thanx in adavance
> Ciao
> Roberto
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org