Optimized soap content

2006-07-12 Thread Taylor, Clarence B



I am attempting to create some web services for existing 
legacy applications.  These applications *CAN* take hundreds of 
parameters but usually any given invocation will only use a few.  My 
initial approach was to create a java class, called InputParms, that have all of 
the parameters defined as private with public getter/setters.  This 
way when the client side, via its UI or other appropriate mechanism could set 
the few parameters needed for this particular service and then invoke the 
web-service with the InputParms class as one of the services parameters.  
The service side of the code would then format the data appropriately for 
the legacy service.
 
However when the InputParms class is serialized into the 
soap body it becomes very large.  I am looking for a technique that is 
"content" driven so that only those parameters specified are sent.  Because 
of the large number of parameters, I hesitate to surface them in WSDL, because 
then the WSDL becomes more unwieldy.
 
I am aware that this is not an "AXIS" issue per se, however 
since the axis is engine is doing the serialization of the classes, I thought 
that perhaps others have run into this issue.  If there are other 
appropriate forums, pointers to them would be appreciated.
 
Thank you 
 
Brad Taylor


RE: Axis fault....where to begin...resolved

2006-06-28 Thread Taylor, Clarence B
I though I would post this out of completeness, just in case anyone else
ever has a similar problem, perhaps my bread crumbs will help.

The bottom line, is that my build environment compiled the java classes
as 1.5, whereas my deployment environment was running java version 1.4.


I got no indication of this until I started paring down the wsdd file,
by incrementally removing first the array-mapping, then the
type-mapping.  It then deployed, but still no indications.  Then when I
tried to do a list services from the axis web page where it says, and
now some services, it came back with nothing.  Then when I looked in
stdout for the tomcat server in my deployment site I saw the following

- Servlet.service() for servlet AxisServlet threw exception

java.lang.UnsupportedClassVersionError:
com/ca/zos/jobs/server/ExecutingJobsSoapBindingSkeleton (Unsupported
major.minor version 49.
0)


I knew from some earlier pain, that this meant I had to provide the
target=1.4 on my javac when I compiled my classes on my development
environment (I had switched to Ant to build the deployment, instead of
just copying the classes from my eclipse environment).

Brad Taylor

-Original Message-
From: Taylor, Clarence B [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 27, 2006 3:54 PM
To: axis-user@ws.apache.org
Subject: Axis faultwhere to begin

I am getting the following axis fault while attempting to deploy via the
admin client and I am not sure where to begin to figure out what is
wrong.  I am not sure how much detail would be helpful, so I'll post the
following 1. the output from the deploy (the axis fault) 2. The
wsdd.deploy file 3. not sure what else?

1.) the output from the deploy

Exception: AxisFault
 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: java.lang.reflect.InvocationTargetException
 faultActor: 
 faultNode: 
 faultDetail: 

2.) the wsdd.deploy file
Here is the deploy.wsdd file









http://xml.apache.org/axis/wsdd/";
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>

  

  
  
  
  
  
  
  
  
  
  
  http://schemas.xmlsoap.org/soap/encoding/";
  />

  http://schemas.xmlsoap.org/soap/encoding/";
  />
  
 

Thank you

Brad Taylor

-
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]



Axis fault....where to begin

2006-06-27 Thread Taylor, Clarence B
I am getting the following axis fault while attempting to deploy via the
admin client and I am not sure where to begin to figure out what is
wrong.  I am not sure how much detail would be helpful, so I'll post the
following
1. the output from the deploy (the axis fault)
2. The wsdd.deploy file
3. not sure what else?

1.) the output from the deploy

Exception: AxisFault
 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: java.lang.reflect.InvocationTargetException
 faultActor: 
 faultNode: 
 faultDetail: 

2.) the wsdd.deploy file
Here is the deploy.wsdd file









http://xml.apache.org/axis/wsdd/";
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>

  

  
  
  
  
  
  
  
  
  
  
  http://schemas.xmlsoap.org/soap/encoding/";
  />

  http://schemas.xmlsoap.org/soap/encoding/";
  />
  
 

Thank you

Brad Taylor

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[newbie howto] Create client under axis/apache/tomcat

2006-06-19 Thread Taylor, Clarence B



I have been able to get my service deployed on my "server" 
tomcat server and can get results when I run a native application, i.e. an 
eclipse Run main, where I specify the appropriate classpaths on the run 
statement.
 
I am looking for the "proper" way to integrate it into my 
"client" tomcat server, which is a different machine than my "server" tomcat 
server.  I am trying put together a JSP that will call my axis 
client.  My axis service serves an array of classes(objects), where each 
class/object consists of 3 simple strings.  I am not sure where to put 
what.  That is on my "client" tomcat server where (what directories) do I 
put a jsp that can call a flavor of the "test 
client" (clientGetMyNames...not shown).  I can probably kluge things 
up by putting everything in the class path, but that feels 
wrong.
 
Any clues or help would be greatly 
appreciated.
 
Sample JSP page
<% MyNames[] mn;
   mn = 
clientGetMyNames("test");
   int l = mn.length();
   for (int i = 0;i mn.length(); i++) 
{  out.println(mn[i].firstName+" 
"+mn[i].lastName);
} %>
 
Details:
the service:
public class MyTestSoapBindingImpl implements 
my.test.package.MyTest {    my.test.package.MyNames[] 
getMyNames(java.lang.String in0) throws java.rmi.RemoteException 
{
    MyNames[] mn = new 
MyNames[5];
 code to fill in the mn array 
   Return mn;
  }
}
package my.test.package;
public 
class MyNames {
   String firstName;
   String lastName;
   String middleName;
}
 
The 
test client:
public 
static void main (String[] args) throws Exception 
{   try 
{   MyTest binding = new 
MyTestServiceLocator().getMyNames();   
MyNames[] value = 
null;   value = 
binding.getMyNames("*");   
if (value == 
null)   
System.out.println("null 
results");   else 
{   
System.out.println("length: 
"+value.length);   
for (int i = 0;i < value.length;i++) 
{   
MyNames mn = 
value[i];   
if (mn != null) 
{   
System.out.println("Struct["+i+"]:= first: 
"+mn.firstName+   ", 
last:"+mn.lastName+    
   ", 
mid:"+mn.middleName);   
}   
else  
{   
System.out.println("String["+i+"]:= 
*novalue*");   
}   
}   
}   }
 
   catch (java.rmi.RemoteException re) 
{   
System.out.println("error"+re.toString());   
}   }
 
Thank 
you
Brad 
Taylor


RE: [newbie howto] Get WSDL2Java to find a referenced class

2006-06-12 Thread Taylor, Clarence B



Anne Thomas Manes said:
 
You 
must add this switch to your java2wsdl command:
-e, --extraClasses 
  A space or comma separated list of class names to be added 
to  the type section
 
 
 
I tried that and it worked 
for the java2wsdl process.  But then I got errors during the wsdl2java 
process.  myNames is the referenced class
 
C:\axis\axis-1_4>c:\axis\java2wsdl  -e 
samples.userguide.myTest.myNames -o myTest.wsdl 
-lhttp:"//localhost:8080/axis/services/myTest -n "urn:myTest" 
-p"samples.userguide.myTest" "urn:myTest" 
samples.userguide.myTest.myTest
 
C:\axis\axis-1_4>java -cp 
.;C:\axis\jaf-1.1\activation.jar;C:\axis\axis-1_4\lib\axis.jar;C:\axis\axis-1_4\lib\commons-discovery-0.2.jar;C:\axis\axis-1_4\lib\commons-logging-1.0.4.jar;C:\axis\axis-1_4\lib\jaxrpc.jar;C:\axis\axis-1_4\lib\saaj.jar;C:\axis\axis-1_4\lib\log4j-1.2.8.jar;C:\axis\axis-1_4\lib\wsdl4j-1.5.1.jar;C:\javamail\javamail-1.4\mail.jar;C:\xerces\xerces-2_8_0\xml-apis.jar;C:\xerces\xerces-2_8_0\xercesImpl.jar; 
org.apache.axis.wsdl.Java2WSDL -e samples.userguide.myTest.myNames -o 
myTest.wsdl -l"http:"//localhost:8080/axis/services/myTest -n "urn:myTest" 
-p"samples.userguide.myTest" "urn:myTest" 
samples.userguide.myTest.myTestlog4j:WARN No appenders could be found 
for logger (org.apache.axis.i18n.ProjectResourceBundle).log4j:WARN Please 
initialize the log4j system 
properly.C:\axis\axis-1_4>..\jw2
 
C:\axis\axis-1_4>c:\axis\wsdl2java -o . -d Session 
-s -S true  -Nurn:myTest -i  samples.userguide.myTest 
myTest.wsdl
 
C:\axis\axis-1_4>java -cp 
.;C:\axis\jaf-1.1\activation.jar;C:\axis\axis-1_4\lib\axis.jar;C:\axis\axis-1_4\lib\commons-discovery-0.2.jar;C:\axis\axis-1_4\lib\commons-logging-1.0.4.jar;C:\axis\axis-1_4\lib\jaxrpc.jar;C:\axis\axis-1_4\lib\saaj.jar;C:\axis\axis-1_4\lib\log4j-1.2.8.jar;C:\axis\axis-1_4\lib\wsdl4j-1.5.1.jar;C:\javamail\javamail-1.4\mail.jar;C:\xerces\xerces-2_8_0\xml-apis.jar;C:\xerces\xerces-2_8_0\xercesImpl.jar; 
org.apache.axis.wsdl.WSDL2Java -o . -d Session -s -S true  -Nurn:myTest 
-i  samples.userguide.myTest myTest.wsdllog4j:WARN No appenders could 
be found for logger (org.apache.axis.i18n.ProjectResourceBundle).log4j:WARN 
Please initialize the log4j system properly.java.io.IOException: Type {urn:myTest}myNames is 
referenced but not 
defined.    at 
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665)    
at 
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)    
at 
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)    
at 
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)    
at 
org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)    
at java.lang.Thread.run(Unknown 
Source)C:\axis\axis-1_4>
 
Newly generated WSDL:
http://xml.apache.org/xml-soap" 
xmlns:impl="urn:myTest" xmlns:intf="urn:myTest" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">   http://www.w3.org/2001/XMLSchema">   
http://schemas.xmlsoap.org/soap/encoding/"/>   
    
    
    
     
 
   
  
   
   
   
   
  
 

 

  

   
   
  http://schemas.xmlsoap.org/soap/http"/>
  
 

 

    
http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:myTest" use="encoded"/>
 

 

        
http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:myTest" use="encoded"/>
 

  

   
   
  
 
http://localhost:8080/axis/services/myTest"/>
  

   

 

On 6/7/06, Taylor, 
Clarence B <[EMAIL PROTECTED]> 
wrote: 

  
  
  I am 
  trying to create a web service the returns an array of objects.  I get an 
  error when running WSDL2Java  "classname referenced  but not 
  defined" where classname is an element in the array of objects I want to 
  return.  Details below
   
   
   
  1). I 
  compile myTest.java to create myTest.class
  2). I run 
  Jav2wsdl as below: to create myTest.wsdl
   
  c:\axis\java2wsdl -o myTest.wsdl 
  -l"http:"//localhost:8080/axis/services/myTest -n "urn:myTest" 
  -p"samples.userguide.myTest" "urn:myTest" 
  samples.userguide.myTest.myTest
   
  
  3). I run 
  wsdl2java as below: and get the the error
   
  c:\axis\wsdl2java -o . -d Session -s -S true  -Nurn:myTest 
  -i  samples.userguide.myTest myTest.wsdl
   
  java.io.IOException: Type {urn:myTest}myNames is referenced but 
  not defined.    at 
  org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665)    
  at 

[newbie howto] Get WSDL2Java to find a referenced class

2006-06-07 Thread Taylor, Clarence B



I am trying to create a web service the returns an array of 
objects.  I get an error when running WSDL2Java  "classname 
referenced  but not defined" where classname is an element in the array of 
objects I want to return.  Details below
 
 
 
1). I compile myTest.java to create 
myTest.class
2). I run Jav2wsdl as below: to create 
myTest.wsdl
 
c:\axis\java2wsdl -o myTest.wsdl 
-l"http:"//localhost:8080/axis/services/myTest -n "urn:myTest" 
-p"samples.userguide.myTest" "urn:myTest" 
samples.userguide.myTest.myTest
 

3). I run wsdl2java as below: and get the the 
error
 
c:\axis\wsdl2java -o . -d Session -s -S true  
-Nurn:myTest -i  samples.userguide.myTest 
myTest.wsdl
 
java.io.IOException: Type {urn:myTest}myNames is 
referenced but not defined.    at 
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665)    
at 
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)    
at 
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)    
at 
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)    
at 
org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)    
at java.lang.Thread.run(Unknown Source)
 
Java source for Java2WSDL:
 
package 
samples.userguide.myTest;
 
public interface myTest extends java.rmi.Remote 
{    public samples.userguide.myTest.myNames[] getmyTest() 
throws java.rmi.RemoteException;}

 
Java source for the class the defines 
myNames:
 
package samples.userguide.myTest;public class 
myNames {    public String 
FirstName;    public String 
LastName;    public String 
Adddress;    public String 
PhoneNumber;    public myNames(String 
sFirstName, String sLastName, String sAdddress, String sPhoneNumber) 
{    
super();
    
FirstName = 
sFirstName;    
LastName = 
sLastName;    
Adddress = 
sAdddress;    
PhoneNumber = sPhoneNumber;    
}
 
}
 
Generated WSDL from java2wsdl:
 
http://xml.apache.org/xml-soap" 
xmlns:impl="urn:myTest" xmlns:intf="urn:myTest" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">   http://www.w3.org/2001/XMLSchema">   
http://schemas.xmlsoap.org/soap/encoding/"/>   
    
    
    
     
 
   
  
   

   
   

   
  
 

 

  

   

   
  http://schemas.xmlsoap.org/soap/http"/>
  
 

 

    
http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:myTest" use="encoded"/>
 

 

    
http://schemas.xmlsoap.org/soap/encoding/" 
namespace="urn:myTest" use="encoded"/>
 

  

   

   
  
 
http://localhost:8080/axis/services/myTest"/>
  

   


 
 
Thank You
 
 
Brad Taylor


newbie question on deployment

2006-06-06 Thread Taylor, Clarence B



I have been 
struggling with using java2wsdl, wsdl2java, admin deploy.wsdd as described in 
the users guide to get a simple test web service deployed and keep running into 
a wall.  I have eclipse, running tomcat under windows.  I have tomcat 
installed in c:\tomcat and axis installed in c:\axis\axis-1_4.  

 
I have used 
axis\axis-1_4\samples\userguide\example6 as a seed for my test.  I 
successfully am able to deploy example6 but not my new test, 
bradexample.   I can run java2wsdl, followed by wsdl2java, followed by 
the admin client.  However I never see the generated java source get 
compiled into .class files.  When I attempt to use the web browser to 
"list" deployed java services, it complains that it can not find the class 
files.  I did not see anything in the doc about compiling the java source 
generated from wsdl2java.  When I try to do it manually I get a java 
compiler error about not being able find symbol.  I believe the example6 
deploys correctly because the class files are in the 
tomcat/.../webapps/axisdirectory.  
 
So I guess the 
question where the .class files come from that correspond to the generated 
.java files from the wsdl2java process.  Do I need to manually compile, 
then copy?  Or is this supposed to be automatic?
 
Brad Taylor
Senior Software Engineer
Workload Automation
 
713 625 9490 (ext 11940)