Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Web service "holder" classes not mapping to out params
Web service "holder" classes not mapping to out params [message #207542] Mon, 28 January 2008 07:44 Go to next message
Eclipse UserFriend
Originally posted by: steven.churchill.ootao.com

Can anyone shed some light:

I'm using Eclipse Europa (3.3.1.1) and trying to generate a bottom up Web
Service using the same approach I used successfully under Eclipse 3.2 (but
now using Axis 1.4 which comes with Europa rather than 1.3 in Eclipse 3.2.)

Now web service generation doesn't do the correct thing for Holders as out
parameters. For example, My code looks like this:

---
import javax.xml.rpc.holders.StringHolder;
import java.rmi.RemoteException;

public class A1 implements java.rmi.Remote {

public String getFoo(
String str, StringHolder outStr) throws RemoteException {
outStr.value = str;
return str;
}
}
---

When I do "Create Web Service", I get a dialog that states:

The service class "A1" does not comply to one or more requirements of
the
JAX-RPC 1.1 specification, and may not deploy or function correctly.

The method "getFoo" on the service class "A1" uses a data
type, "javax.xml.rpc.holders.StringHolder", that is not supported by
the
JAX-RPC specification. Instances of the type may not serialize or
deserialize correctly. Loss of data or complete failure of the Web
service
may result.

It then goes on to generate the WSDL, but the WSDL maps the StringHolder
to up an xsd:anyType in the input paramerters (rather that an xsd:string
in the Response, as it should.)

This problem has me flabbergasted. Anyone have any ideas?

Thanks in advance.

~ Steve

<import namespace="http://holders.rpc.xml.javax"/>
<element name="getFoo">
<complexType>
<sequence>
<element name="str" type="xsd:string"/>
<element name="outStr" type="xsd:anyType"/>
</sequence>
</complexType>
</element>
<element name="getFooResponse">
<complexType>
<sequence>
<element name="getFooReturn" type="xsd:string"/>
</sequence>
</complexType>
</element>
Re: Web service "holder" classes not mapping to out params [message #207825 is a reply to message #207542] Wed, 30 January 2008 22:03 Go to previous message
Kathy Chan is currently offline Kathy ChanFriend
Messages: 93
Registered: July 2009
Member
Hi Steve,

Yes. I'm able to reproduce the problem on WTP 3.0 (which also uses Axis 1.4
JARs) and the problem is not there in WTP 1.5.5 (which uses Axis 1.3 JARs).
Could you please see if the problem exist when calling Java2WSDL using the
Axis 1.4 command line? If the problem could be reproduced on Axis 1.4,
please open a JIRA with Axis development using the URL:

http://issues.apache.org/jira/secure/IssueNavigator.jspa?

If the problem is not in Axis v1.4, then please open a bugzilla defect on
Web Tools, jst.ws component. Thanks!

Regards,
Kathy Chan

"Steve Churchill" <steven.churchill@ootao.com> wrote in message
news:b9ee70f314bdfc1da3a85dbf74a9cab6$1@www.eclipse.org...
>
> Can anyone shed some light:
>
> I'm using Eclipse Europa (3.3.1.1) and trying to generate a bottom up Web
> Service using the same approach I used successfully under Eclipse 3.2 (but
> now using Axis 1.4 which comes with Europa rather than 1.3 in Eclipse
> 3.2.)
>
> Now web service generation doesn't do the correct thing for Holders as out
> parameters. For example, My code looks like this:
> ---
> import javax.xml.rpc.holders.StringHolder;
> import java.rmi.RemoteException;
>
> public class A1 implements java.rmi.Remote {
>
> public String getFoo(
> String str, StringHolder outStr) throws RemoteException {
> outStr.value = str;
> return str;
> }
> }
> ---
>
> When I do "Create Web Service", I get a dialog that states:
>
> The service class "A1" does not comply to one or more requirements of
> the JAX-RPC 1.1 specification, and may not deploy or function correctly.
>
> The method "getFoo" on the service class "A1" uses a data type,
> "javax.xml.rpc.holders.StringHolder", that is not supported by the JAX-RPC
> specification. Instances of the type may not serialize or deserialize
> correctly. Loss of data or complete failure of the Web service may
> result.
>
> It then goes on to generate the WSDL, but the WSDL maps the StringHolder
> to up an xsd:anyType in the input paramerters (rather that an xsd:string
> in the Response, as it should.)
>
> This problem has me flabbergasted. Anyone have any ideas?
>
> Thanks in advance.
>
> ~ Steve
>
> <import namespace="http://holders.rpc.xml.javax"/>
> <element name="getFoo">
> <complexType>
> <sequence>
> <element name="str" type="xsd:string"/>
> <element name="outStr" type="xsd:anyType"/>
> </sequence>
> </complexType>
> </element>
> <element name="getFooResponse">
> <complexType>
> <sequence>
> <element name="getFooReturn" type="xsd:string"/>
> </sequence>
> </complexType>
> </element>
>
>
Previous Topic:Eclipse J2EE Environment
Next Topic:could not remove module
Goto Forum:
  


Current Time: Fri Apr 26 14:08:16 GMT 2024

Powered by FUDForum. Page generated in 0.02719 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top