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 sdr <sd...@hotmail.com> on 2008/06/25 15:15:05 UTC
Axis2 return name
Hi,
I'm generating a wsdl out of code with following java code:
public class EmbeddedAxis2Server {
public static void main(String[] args) throws Exception {
ConfigurationContext context =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,
null);
context.setContextRoot("lmpg-ws");
AxisService service =
AxisService.createService(UssdIvrInterface.class.getName(),
context.getAxisConfiguration());
context.getAxisConfiguration().addService(service);
SimpleHTTPServer server = new SimpleHTTPServer(context, 8080);
server.start();
}
}
The wsdl that is generated is as follows:
- <wsdl:types>
- <xs:schema xmlns:ns="http://ws.apache.org/axis2"
attributeFormDefault="qualified" elementFormDefault="unqualified"
targetNamespace="http://ws.apache.org/axis2">
- <xs:element name="Register12Ring">
- <xs:complexType>
- <xs:sequence>
<xs:element minOccurs="0" name="in" nillable="true"
type="ns1:Register12RingRequest" />
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="Register12RingResponse">
- <xs:complexType>
- <xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true"
type="ns1:Common12RingResponse" />
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="Reload12Ring">
- <xs:complexType>
- <xs:sequence>
<xs:element minOccurs="0" name="in" nillable="true"
type="ns1:Reload12RingRequest" />
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="Reload12RingResponse">
...etc
Is there a possibility to change name="return" into something else? We have
troubles creating a c++ client as return is a keyword in c++.
I'm not able to use annotations as I have to use java 1.4
Kind regards,
Sdr
--
View this message in context: http://www.nabble.com/Axis2-return-name-tp18112183p18112183.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Axis2 return name
Posted by sdr <sd...@hotmail.com>.
Hi,
Thanks for the response, but the solution you suggested is only valid for
incoming parameters, not for responses.
public class UssdIvrInterface {
public Common12RingResponse Reload12Ring(Reload12RingRequest in) {
Common12RingResponse out = new Common12RingResponse();
out.setMsisdn(in.getMsisdn());
out.setRequest_id(in.getRequest_id());
out.setService_id(in.getService_id());
out.setStatus(new Integer(1000));
return out;
}
I have indeed an element name equal to in in my wsdl, but no element name
equal to out.
- <xs:element name="Reload12Ring">
- <xs:complexType>
- <xs:sequence>
<xs:element minOccurs="0" name="in" nillable="true"
type="ns1:Reload12RingRequest" />
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="Reload12RingResponse">
- <xs:complexType>
- <xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true"
type="ns1:Common12RingResponse" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Kr,
Sdr.
Charitha Kankanamge wrote:
>
> Hi,
> I think the answer for your question is explained here [1]
>
> [1] http://wso2.org/library/3743
>
> regards
> Charitha
> sdr wrote:
>
>>Hi,
>>
>>I'm generating a wsdl out of code with following java code:
>>
>>public class EmbeddedAxis2Server {
>> public static void main(String[] args) throws Exception {
>> ConfigurationContext context =
>>ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,
>>null);
>> context.setContextRoot("lmpg-ws");
>>
>> AxisService service =
>>AxisService.createService(UssdIvrInterface.class.getName(),
>> context.getAxisConfiguration());
>> context.getAxisConfiguration().addService(service);
>>
>> SimpleHTTPServer server = new SimpleHTTPServer(context, 8080);
>> server.start();
>> }
>>}
>>
>>The wsdl that is generated is as follows:
>>
>>
>>- <wsdl:types>
>>- <xs:schema xmlns:ns="http://ws.apache.org/axis2"
>>attributeFormDefault="qualified" elementFormDefault="unqualified"
>>targetNamespace="http://ws.apache.org/axis2">
>>- <xs:element name="Register12Ring">
>>- <xs:complexType>
>>- <xs:sequence>
>> <xs:element minOccurs="0" name="in" nillable="true"
>>type="ns1:Register12RingRequest" />
>> </xs:sequence>
>> </xs:complexType>
>> </xs:element>
>>- <xs:element name="Register12RingResponse">
>>- <xs:complexType>
>>- <xs:sequence>
>> <xs:element minOccurs="0" name="return" nillable="true"
>>type="ns1:Common12RingResponse" />
>> </xs:sequence>
>> </xs:complexType>
>> </xs:element>
>>- <xs:element name="Reload12Ring">
>>- <xs:complexType>
>>- <xs:sequence>
>> <xs:element minOccurs="0" name="in" nillable="true"
>>type="ns1:Reload12RingRequest" />
>> </xs:sequence>
>> </xs:complexType>
>> </xs:element>
>>- <xs:element name="Reload12RingResponse">
>>...etc
>>
>>
>>Is there a possibility to change name="return" into something else? We
have
>>troubles creating a c++ client as return is a keyword in c++.
>>I'm not able to use annotations as I have to use java 1.4
>>
>>Kind regards,
>>Sdr
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Axis2-return-name-tp18112183p18112853.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Axis2 return name
Posted by Charitha Kankanamge <ch...@wso2.com>.
Hi,
I think the answer for your question is explained here [1]
[1] http://wso2.org/library/3743
regards
Charitha
sdr wrote:
>Hi,
>
>I'm generating a wsdl out of code with following java code:
>
>public class EmbeddedAxis2Server {
> public static void main(String[] args) throws Exception {
> ConfigurationContext context =
>ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,
>null);
> context.setContextRoot("lmpg-ws");
>
> AxisService service =
>AxisService.createService(UssdIvrInterface.class.getName(),
> context.getAxisConfiguration());
> context.getAxisConfiguration().addService(service);
>
> SimpleHTTPServer server = new SimpleHTTPServer(context, 8080);
> server.start();
> }
>}
>
>The wsdl that is generated is as follows:
>
>
>- <wsdl:types>
>- <xs:schema xmlns:ns="http://ws.apache.org/axis2"
>attributeFormDefault="qualified" elementFormDefault="unqualified"
>targetNamespace="http://ws.apache.org/axis2">
>- <xs:element name="Register12Ring">
>- <xs:complexType>
>- <xs:sequence>
> <xs:element minOccurs="0" name="in" nillable="true"
>type="ns1:Register12RingRequest" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
>- <xs:element name="Register12RingResponse">
>- <xs:complexType>
>- <xs:sequence>
> <xs:element minOccurs="0" name="return" nillable="true"
>type="ns1:Common12RingResponse" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
>- <xs:element name="Reload12Ring">
>- <xs:complexType>
>- <xs:sequence>
> <xs:element minOccurs="0" name="in" nillable="true"
>type="ns1:Reload12RingRequest" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
>- <xs:element name="Reload12RingResponse">
>...etc
>
>
>Is there a possibility to change name="return" into something else? We have
>troubles creating a c++ client as return is a keyword in c++.
>I'm not able to use annotations as I have to use java 1.4
>
>Kind regards,
>Sdr
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org