Re: Generating Stubs
have to regenerate code). Experienced Axis folks: please set me straight on that if I've got it wrong or explain it in more depth - thanks. __ Steve Gruverman IntelliCare, Inc. | A Medco Health Solutions Company O Aiken [EMAIL PROTECTED] wrote on 03/27/2008 05:47:50 PM: Hi, When generating stubs with Axis2 1.3 -- some of the class files are generated twice, once with a number appended. ie. this wsdl snippit : == wsdl:message name=loginRequest wsdl:part element=wsv:loginRequest name=loginRequest/ /wsdl:message == will result in 2 classes : LoginRequest.java LoginRequest15.java Does anybody know why ? thank you regards, -O Aiken
Re: Generating Stubs
here your have not attached the schema. or the part you referring? thanks, Amila. On Sat, Mar 29, 2008 at 3:14 AM, [EMAIL PROTECTED] wrote: I'm too new to Axis to explain why this happens, but I can tell you that this is the intended behavior and that both files are needed. Basically one is an inner bean that lets you get and set the parameters for that operation. The other is an outer bean that lets you get and set the inner bean. (I rename the outer one something like loginRequestWrapper to make it less confusing for me, although that gets lost whenever the WSDL changes and I have to regenerate code). Experienced Axis folks: please set me straight on that if I've got it wrong or explain it in more depth - thanks. __ Steve Gruverman IntelliCare, Inc. | A Medco Health Solutions Company O Aiken [EMAIL PROTECTED] wrote on 03/27/2008 05:47:50 PM: Hi, When generating stubs with Axis2 1.3 -- some of the class files are generated twice, once with a number appended. ie. this wsdl snippit : == wsdl:message name=loginRequest wsdl:part element=wsv:loginRequest name=loginRequest/ /wsdl:message == will result in 2 classes : LoginRequest.java LoginRequest15.java Does anybody know why ? thank you regards, -O Aiken - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc.
Re: Generating Stubs
Here it is : soapinterface.wsdl Description: Binary data any ideas much appreciated. thx, -oa On 27 Mar 2008, at 17:10, samir shaikh wrote: you might want to paste the complete wsdl. --- O Aiken [EMAIL PROTECTED] wrote: Hi, When generating stubs with Axis2 1.3 -- some of the class files are generated twice, once with a number appended. ie. this wsdl snippit : == wsdl:message name=loginRequest wsdl:part element=wsv:loginRequest name=loginRequest/ /wsdl:message == will result in 2 classes : LoginRequest.java LoginRequest15.java Does anybody know why ? thank you regards, -O Aiken - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Generating Stubs
I'm too new to Axis to explain why this happens, but I can tell you that this is the intended behavior and that both files are needed. Basically one is an inner bean that lets you get and set the parameters for that operation. The other is an outer bean that lets you get and set the inner bean. (I rename the outer one something like loginRequestWrapper to make it less confusing for me, although that gets lost whenever the WSDL changes and I have to regenerate code). Experienced Axis folks: please set me straight on that if I've got it wrong or explain it in more depth - thanks. __ Steve Gruverman IntelliCare, Inc. | A Medco Health Solutions Company O Aiken [EMAIL PROTECTED] wrote on 03/27/2008 05:47:50 PM: Hi, When generating stubs with Axis2 1.3 -- some of the class files are generated twice, once with a number appended. ie. this wsdl snippit : == wsdl:message name=loginRequest wsdl:part element=wsv:loginRequest name=loginRequest/ /wsdl:message == will result in 2 classes : LoginRequest.java LoginRequest15.java Does anybody know why ? thank you regards, -O Aiken - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Generating Stubs
Hi, When generating stubs with Axis2 1.3 -- some of the class files are generated twice, once with a number appended. ie. this wsdl snippit : == wsdl:message name=loginRequest wsdl:part element=wsv:loginRequest name=loginRequest/ /wsdl:message == will result in 2 classes : LoginRequest.java LoginRequest15.java Does anybody know why ? thank you regards, -O Aiken - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Generating Stubs
you might want to paste the complete wsdl. --- O Aiken [EMAIL PROTECTED] wrote: Hi, When generating stubs with Axis2 1.3 -- some of the class files are generated twice, once with a number appended. ie. this wsdl snippit : == wsdl:message name=loginRequest wsdl:part element=wsv:loginRequest name=loginRequest/ /wsdl:message == will result in 2 classes : LoginRequest.java LoginRequest15.java Does anybody know why ? thank you regards, -O Aiken - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to preserve bean package names when generating stubs from wsdl?
In short: wsdl2java produces duplicate copies of my JavaBean classes, but using a generated (different) package name. Hi, In an effort to learn web services + axis, I wrote a simple standalong java-client - to - web service app. The idea is that Client uses JavaBean classes to display some info and do some work, it also uses those beans as input args to the Web Service; and Service uses those same JavaBeans as return params. The package structure of my app is as follows: computeservice.beans - contains two JavaBean classes (InputValue, and OutputValue) used throughout client and server classes to do internal work, also used as args/return types with web service. computeservice.service.ComputeService - server side class. Methods of these classes are exposed as web service operations (using WSDL file) computeservice.client.ServiceClientApp - client side standalone app, accumulates user input into InputValue, passes InputValue as arg to web service operation, gets OutputValue in return, displays that locally. I'd like to distribute this app in two packages: .WAR file for server-side deployment, and a .JAR for desktop java client app. It is my understanding that I should package computeservice.beans into both archives, since both .client and .service classes use them. Here's the problem: On the server side, SEI defines operation: public computeservice.beans.OutputValue doMultiply(computeservice.beans.InputValue inputValue) When I use wsdl2java to generate client-side classes necessary to talk to the service, InputValue and OutputValue are also generated (even though I already have them computeservice.beans). But their package names are incorrect: package ComputeServiceWS; public class InputValue implements java.io.Serializable { (similarly OutputValue) public ComputeServiceWS.OutputValue doMultiply(ComputeServiceWS.InputValue inputValue_1) throws java.rmi.RemoteException; This precludes the following from working in my standalone app: computeservice.beans.InputValue inputFromUserGUI = gui.getInput(); computeservice.beans.OutputValue retValue = service.doMultiply(inputFromUserGUI); //this won't work, as service expects ComputeServiceWS.InputValue, not computeservice.beans.InputValue, and I can't just cast one to another. gui.displayOutput(retValue); //declaration public void displayOutput(computeservice.beans.OutputValue) Here are my questions: -How did wsdl2java decide on package name ComputeServiceWS for InputValue/OutputValue instead of computeservice.beans? -Since I already have source code for InputValue and OutputValue included with client, any chance of precluding wsdl2java from generating these classes (avoid code duplication)? -If generation of InputValue and OutputValue source is inevitable, can I force wsdl2java to produce correct package names. Or is that a setting in WSDL file itself? Ant task used to produce stubs: !-- generate WS stubs -- target name=gen-ws-client axis-wsdl2java output=scratch testcase=true verbose=true url=http://localhost:8081/ComputeWeb/ComputeServiceWS?WSDL; /axis-wsdl2java /target I'm attaching some relevant files. thanks a lot, -nikita ?xml version=1.0 encoding=UTF-8? java-wsdl-mapping version=1.1 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2eehttp://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd; package-mapping package-typecomputeservice.service/package-type namespaceURIurn:ComputeServiceWS/types/namespaceURI /package-mapping package-mapping package-typecomputeservice.service/package-type namespaceURIurn:ComputeServiceWS/wsdl/namespaceURI /package-mapping java-xml-type-mapping java-typecomputeservice.service.ComputeServiceWSSEI_doMultiply_ResponseStruct/java-type root-type-qname xmlns:typeNS=urn:ComputeServiceWS/typestypeNS:doMultiplyResponse/root-type-qname qname-scopecomplexType/qname-scope variable-mapping java-variable-nameresult/java-variable-name xml-element-nameresult/xml-element-name /variable-mapping /java-xml-type-mapping java-xml-type-mapping java-typecomputeservice.beans.OutputValue/java-type root-type-qname xmlns:typeNS=urn:ComputeServiceWS/typestypeNS:OutputValue/root-type-qname qname-scopecomplexType/qname-scope variable-mapping java-variable-namename/java-variable-name xml-element-namename/xml-element-name /variable-mapping variable-mapping java-variable-namevalue/java-variable-name xml-element-namevalue/xml-element-name /variable-mapping /java-xml-type-mapping java-xml-type-mapping java-typecomputeservice.beans.InputValue/java-type root-type-qname xmlns:typeNS=urn:ComputeServiceWS/typestypeNS:InputValue/root-type-qname qname-scopecomplexType/qname-scope variable-mapping java-variable-namename/java-variable-name xml-element-namename/xml-element-name /variable-mapping variable-mapping