-
1. Re: WStools; Parameter names (Newbie question)
sosopk Jun 21, 2006 12:10 PM (in response to bcguitar33)It would be interesting for me too to know how to avoid these ugly parameter names. There must be some way to tell wstools that it should retain parameter names from class file
-
2. Re: WStools; Parameter names (Newbie question)
jason.greene Jun 22, 2006 3:36 PM (in response to bcguitar33)The problem is that Java does not store the paramter names in the class file. If the class is compiled with debugging, then they can be derrived, but the differing behavior would be confusing, so tools consistently goes with the type_position format.
You can however use the configuration file to change the name to whatever you like (for both parameters and the return value).
For example:<configuration xmlns="http://www.jboss.org/jbossws-tools" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd"> <java-wsdl> <service name="AccountSignupService" endpoint="org.jboss.test.ws.wsse.signup.AccountSignup" style="document"> <operation name="signup" return-xml-name="SignupResponse"> <parameter xml-name="accountInfo" type="org.jboss.test.ws.wsse.signup.AccountInfo"/> <parameter xml-name="discountAmount" type="float"/> <parameter xml-name="signupTime" type="java.util.Date"/> </operation> </service> <namespaces target-namespace="http://org.jboss.test.ws/wsse" type-namespace="http://org.jboss.test.ws/wsse/types" /> <mapping file="jaxrpc-mapping.xml"/> <webservices servlet-link="AccountSignup"/> </java-wsdl> </configuration>
-Jason -
3. Re: WStools; Parameter names (Newbie question)
jason.greene Jun 22, 2006 3:37 PM (in response to bcguitar33)I should also note that we are working with sun to try and get parameter information included in the byte code.
-Jason -
4. Re: WStools; Parameter names (Newbie question)
opepin Jul 19, 2006 10:20 AM (in response to bcguitar33)Hello,
Do you have a JIRA ticket attached to this task ?
- Olivier -
5. Re: WStools; Parameter names (Newbie question)
sbalmos Jul 20, 2006 9:06 AM (in response to bcguitar33)I believe Jason and everyone are completely forgetting the usefulness of @WebParam here. See below:
@Remote @WebService @SOAPBinding(style = SOAPBinding.Style.RPC) public interface CoreBackend { @WebMethod public String startSession(@WebParam(name = "clientID") long clientID); @WebMethod public void endSession(@WebParam(name = "sessionToken") String sessionToken); @WebMethod public boolean login(@WebParam(name = "sessionToken") String sessionToken, @WebParam(name = "username") String username, @WebParam(name = "password") String password); @WebMethod public void logout(@WebParam(name = "sessionToken") String sessionToken); }
--Scott -
6. Re: WStools; Parameter names (Newbie question)
scobiej Aug 21, 2006 5:22 PM (in response to bcguitar33)This may be a very silly question (and I apologise if it is), but can't the tools look at the source code instead of the byte code? WSAD (websphere application studio) seems to get it right, so I am guessing it interogates the source for this information.
-
7. Re: WStools; Parameter names (Newbie question)
lowecg2004 Nov 2, 2006 7:41 AM (in response to bcguitar33)Jason,
re: getting parameter information included in the byte code.
Is there a bug/rfe database ID that we can add our votes to? This would be incredibly useful.
Chris.