RE: Java2WSDL Enum handling question

2002-12-19 Thread Eirik.Wahl
Hi Rajal!

I'm aiming at doing the same, but have had no time yet to look into this. Since nobody 
else has answered, I wanted to give you this hint (although no solution ... yet):

Maybe a way to go is to try this text in your WSDL file, and use WSDL2Java to see what 
kind of Java code it generates? The output is hopefully something java2wsdl expects as 
input.

On 2002-09-23, 16:35 Harish Prabandham wrote:
Hi,

I defined  a simpleType in wsdl that looks something like this:


  xsd:simpleType name=PlanType
xsd:restriction base=xsd:int
xsd:enumeration name=Gold value=0/
xsd:enumeration name=Silver value=1/
xsd:enumeration name=Bronze value=2/
/xsd:restriction
  /xsd:simpleType

The resulting wsdl2java generated code does not make use of the Gold,
Silver, Bronze.  Is there a way I can associate user defined identifiers
within the generated code instead of value0, value1 etc. that get generated
by default.


Thx.


Harish

Not much to go on, but could be a way out. Would have tried this myself, if it wasn't 
for that I have too little time nowadays. Please let me know if you find something 
usefull out from this.

By the way: The question from Harish is till unanswered (as far as I know).

Regards,
Eirik


 -Original Message-
 From: Rajal Shah [mailto:[EMAIL PROTECTED]]
 Sent: 17. desember 2002 20:02
 To: Axis User Mailing List
 Subject: Java2WSDL Enum handling question
 
 
 I've read the discussion thread on enums on this list.. It 
 still doesn't
 solve my problem.
 
 I am using the type-safe enumeration in my java class (code 
 included below)
 and am hoping to get an enumeration mapping in the WSDL using 
 the java2wsdl
 tool. But I am unable to produce it.. Any help in figuring 
 out what I'm
 doing wrong would be helpful.
 
 public final class SearchType {
 
 //this is the dummy constructor requirement for Java2WSDL to work.
 public SearchType() {
   this.name = COMPANY_SEARCH;
 }
 
 private SearchType(String name) {
   this.name = name;
 }
 
 private final String name;
 
 public static final SearchType COMPANY_SEARCH =
new SearchType(COMPANY_SEARCH);
 public static final SearchType SITE_SEARCH =
 new SearchType(SITE_SEARCH);
 public static final SearchType XYZ_SEARCH = new
 SearchType(XYZ_SEARCH);
 
 public final String toString() {
   return name;
 }
 }
 --
 Rajal
 
 
 



AW: Returning an Array of Strings...quick start pointers

2002-12-19 Thread Sebastian . Beyer
Title: Nachricht



Just 
try to set your Array as returnvalue of your webservice-method. You should get 
an Object[] on client side and can simply cast the elements to 
string

  
  -Ursprüngliche Nachricht-Von: Ken Reek 
  [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 18. Dezember 2002 
  18:57An: [EMAIL PROTECTED]Betreff: Returning an 
  Array of Strings...quick start pointers
  Hi All, 
   I need to retun an array of strings as a result of a call. Any quick 
  start ideas or pointers...?? 
  Thanks, 
  Ken
  
  
  Do you Yahoo!?Yahoo! Mail 
  Plus - Powerful. Affordable. Sign up 
  now


RE: Java2WSDL Enum handling question

2002-12-19 Thread Steve Kinsman
Hi, I missed previous posts on this, and I'm not sure what your exact
problem is but maybe the following will help.  I develop using Java2WSDL
then WSDL2Java, and found that for this to work with enums correctly the
original java source needed to have:

 - a getValue() method - String getValue()
 - a fromValue() method - YourEnumClass fromValue(String)
 - a fromString() method - YourEnumClass fromString(String)

Try defining these in your enum class and see how you go!


Steve




   
   
Eirik.Wahl@b  
   
ravida.no   To: [EMAIL PROTECTED]
   
 cc:   
   
19/12/2002   Subject: RE: Java2WSDL Enum handling 
question
16:16  
   
Please 
   
respond to 
   
axis-user  
   
   
   
   
   



Hi Rajal!

I'm aiming at doing the same, but have had no time yet to look into
this. Since nobody else has answered, I wanted to give you this hint
(although no solution ... yet):

Maybe a way to go is to try this text in your WSDL file, and use
WSDL2Java to see what kind of Java code it generates? The output is
hopefully something java2wsdl expects as input.

On 2002-09-23, 16:35 Harish Prabandham wrote:
Hi,

I defined  a simpleType in wsdl that looks something like this:


  xsd:simpleType name=PlanType
xsd:restriction base=xsd:int
xsd:enumeration name=Gold value=0/
xsd:enumeration name=Silver value=1/
xsd:enumeration name=Bronze value=2/
/xsd:restriction
  /xsd:simpleType

The resulting wsdl2java generated code does not make use of the Gold,
Silver, Bronze.  Is there a way I can associate user defined
identifiers
within the generated code instead of value0, value1 etc. that get
generated
by default.


Thx.


Harish

Not much to go on, but could be a way out. Would have tried this myself,
if it wasn't for that I have too little time nowadays. Please let me
know if you find something usefull out from this.

By the way: The question from Harish is till unanswered (as far as I
know).

Regards,
Eirik


 -Original Message-
 From: Rajal Shah [mailto:[EMAIL PROTECTED]]
 Sent: 17. desember 2002 20:02
 To: Axis User Mailing List
 Subject: Java2WSDL Enum handling question


 I've read the discussion thread on enums on this list.. It
 still doesn't
 solve my problem.

 I am using the type-safe enumeration in my java class (code
 included below)
 and am hoping to get an enumeration mapping in the WSDL using
 the java2wsdl
 tool. But I am unable to produce it.. Any help in figuring
 out what I'm
 doing wrong would be helpful.

 public final class SearchType {

 //this is the dummy constructor requirement for Java2WSDL to work.
 public SearchType() {
  this.name = COMPANY_SEARCH;
 }

 private SearchType(String name) {
  this.name = name;
 }

 private final String name;

 public static final SearchType COMPANY_SEARCH =
   new SearchType
(COMPANY_SEARCH);
 public static final SearchType SITE_SEARCH =
new SearchType(SITE_SEARCH);
 public static final SearchType XYZ_SEARCH = new
 SearchType(XYZ_SEARCH);

 public final String toString() {
  return name;
 }
 }
 --
 Rajal










AW: Stopping the process of invocation by a Handler

2002-12-19 Thread Sebastian . Beyer
Hi toshi,

thanks for that detailed answer. If I understood you right it is like this:
if I want to stop the chain and return with an error message to the client,
this is not possible with the axis-implementation?! So probably I will just
set a session-parameter in my handler, that I have to look for in called
methods. Thats suboptimal, but I do not have to much time :-(
And if I want to use that JAX-rpc, how do I do? All I do at the moment is,
just deploying the handler in the wsdd, but without a hint to axis-impl.
Where would I have to define to use jax-rpc? inside the java-code of the
handler?

And waht about my problem with the throwing of axis-faults. Even with try
catch everywhere on the client side, the stacktrace is printed if the
axis-fault is thrown by a handler. is it normal?

thanks in advance and Greetings from Hamburg/Germany
Seppo

-Ursprüngliche Nachricht-
Von: Toshiyuki Kimura [mailto:[EMAIL PROTECTED]] 
Gesendet: Donnerstag, 19. Dezember 2002 05:01
An: [EMAIL PROTECTED]
Betreff: Re: Stopping the process of invocation by a Handler


Hello Sebastian,

 how can stop the process of invocation with the help of a handler?

  As you may know, AXIS has two implementations of handler; AXIS and
JAX-RPC. The easiest way what you want to do is JAX-RPC imp., I think.

  Because the JAX-RPC ver 1.0 specifies the sequence of HandlerChain
(includes stopping the HandlerChain and the target service endpoint).

  But, please note that the current version of AXIS (1.1 Beta) has a bug
related the way of using above. I've already posted it to Bugzilla (the
Apache bug database). 

 You can refer the detail of the bug at the following site:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15478

  I hope this helps you. 

Best Regards,

  Toshiyuki Kimura [EMAIL PROTECTED]
  RD Headquaters
  NTT DATA Corporation




Re: property PROP_SEND_XSI

2002-12-19 Thread BOURLON Agnès
Hi Dennis,

Thanks for your reply.
I know how configure the client to send envelope without xsi types :
call.setOption(AxisEngine.PROP_SEND_XSI, new Boolean(false));

I just would like to know if we take the decision to authorize the client to
send envelope without xsi types towards our Axis Server (the client will not
be an Axis Client but a Microsoft client) ...if it's a good solution or if
it can bring some problems...
Thanks for your warning about the bug with the multihref... we don't use the
multihref (the property is set to false in the server-config.wsdd) so there
is no problem in our configuration, isn't it???

Do you know if it can work (no xsi type) with GLUE Server or Apache SOAP
Server?

And a last question.. if we set the PROP_SEND_XSI to false in our Axis
Client (that we use to test our service in Axis server) we noticed that some
types in the envelope can contain the xsi types 
For example in the case of the Array  type ..is it for fix the size during
the deserialization?

Best regards,
Agnes


- Original Message -
From: Dennis Sosnoski [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 18, 2002 8:07 PM
Subject: Re: property PROP_SEND_XSI


 Hi Agnes,

 Many older SOAP implementations require the types to be present, though
 with others (such as .NET) the default is to not use the types. Axis
 includes support for generating SOAP without the xsi types, but you have
 to configure it to operate this way. As far as I know, the normal way of
 doing this is through the sendXsiTypes parameter in the configuration -
 I'll paste in an example of a client-side WSDD that does this below.

 That said, there was a problem in the handling of objects being passed
 with sendXsiTypes=false
 (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15219). This was just
 corrected in the CVS code yesterday, so the fix should be included in
 the latest nightly build. I haven't tested it yet, will try to do that
 later today.

   - Dennis

 Dennis M. Sosnoski
 Sosnoski Software Solutions, Inc.
 http://www.sosnoski.com

 client-config.wsdd example with sendXsiTypes=false:

 ?xml version=1.0 encoding=UTF-8?
 deployment xmlns=http://xml.apache.org/axis/wsdd/;
 xmlns:java=http://xml.apache.org/axis/wsdd/providers/java;
  globalConfiguration
   parameter name=sendXsiTypes value=false/
  /globalConfiguration
  transport name=http
 pivot=java:org.apache.axis.transport.http.HTTPSender/
  transport name=java
 pivot=java:org.apache.axis.transport.java.JavaSender/
  transport name=local
 pivot=java:org.apache.axis.transport.local.LocalSender/
  typeMapping encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
 serializer=org.apache.axis.encoding.ser.BeanSerializerFactory
 deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory
 type=java:flightsraw.TimeTableBean qname=ns1:TimeTableBean
 xmlns:ns1=http://flightsraw/
  typeMapping encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
 serializer=org.apache.axis.encoding.ser.BeanSerializerFactory
 deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory
 type=java:flightsraw.CarrierBean qname=ns2:CarrierBean
 xmlns:ns2=http://flightsraw/
  typeMapping encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
 serializer=org.apache.axis.encoding.ser.BeanSerializerFactory
 deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory
 type=java:flightsraw.AirportBean qname=ns3:AirportBean
 xmlns:ns3=http://flightsraw/
  typeMapping encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
 serializer=org.apache.axis.encoding.ser.BeanSerializerFactory
 deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory
 type=java:flightsraw.RouteBean qname=ns4:RouteBean
 xmlns:ns4=http://flightsraw/
  typeMapping encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
 serializer=org.apache.axis.encoding.ser.BeanSerializerFactory
 deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory
 type=java:flightsraw.FlightBean qname=ns5:FlightBean
 xmlns:ns5=http://flightsraw/
 /deployment

 BOURLON Agnès wrote:

 Hello,
 
 I would like to know if a service Axis can work with the property
 PROP_SEND_XSI =false
 If yes, I don't understand what is the advantage to use the xsi types in
the
 envelope?
 Thanks in adavance,
 Agnes
 
 ___
 Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
 Yahoo! Mail : http://fr.mail.yahoo.com
 
 
 

___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com



Is axis support anyType ?

2002-12-19 Thread Dongsheng Song
Hi,

Is axis support anyType ? If so, give me some examples.

Thanks.


Re: property PROP_SEND_XSI

2002-12-19 Thread Dennis Sosnoski
BOURLON Agnès wrote:


Do you know if it can work (no xsi type) with GLUE Server or Apache SOAP
Server?


I haven't tried eliminating xsi type with either of those, but from what 
I've seen I think GLUE supports untyped RPC but Apache SOAP does not. 
Perhaps someone with more experience on these two can comment and 
correct me if I'm wrong.

And a last question.. if we set the PROP_SEND_XSI to false in our Axis
Client (that we use to test our service in Axis server) we noticed that some
types in the envelope can contain the xsi types 
For example in the case of the Array  type ..is it for fix the size during
the deserialization?


As I read the SOAP 1.1 spec the Array type is required, though it can be 
a generic 'SOAP-ENC:arrayType=xsd:ur-type[4]', for instance. When this 
form is used the individual elements all need to give type information. 
From looking at the code I think Axis may put a stronger restriction on 
what can be sent, requiring that the type of the array elements be a 
specific serializable type. Either way some type information is going to 
be required for arrays. I don't know where else you've seen the types, 
if you have specific examples let me know.

Having the types included should never be harmful as far as I know.

 - Dennis



Interoperability Axis with .NET

2002-12-19 Thread Christian Bucholdt



Hi,

Few days ago I've developed an .NET Webservice with 
same Methods.

Now I want to use this Methods from a java client. 
If I call one of the methods without a parameter it works fine.

But, if I want to use a method with a parameter, I 
get a NullPointerException from the services method back.

Know somebody this problem. What can I 
do.

Thanks for help
christian


P.S. Here is the Code:

The .Net method signature: public string 
GetSome(string id)

The java code:

try {

 
URL url = "" URL("http://localhost/GetXmlService/GetXmlService.asmx"); 
Service service = new 
Service(); Call call = 
(Call) service.createCall(); 
call.setTargetEndpointAddress( url 
); call.setOperationName(new 
QName("http://tempuri.org/", 
"get")); 
call.setUseSOAPAction(true); 
call.setProperty(Call.SOAPACTION_URI_PROPERTY,"http://tempuri.org/GetElementContentById");

 
String paraName = "id"; 
boolean b = call.isParameterAndReturnSpecRequired(new QName("http://tempuri.org/", 
"GetElementContentById")); 
System.out.println("Boolean: 
"+b); 
call.addParameter(paraName,org.apache.axis.Constants.XSD_STRING, 
paraName.getClass(), 
ParameterMode.IN); 
call.setReturnType(org.apache.axis.Constants.XSD_STRING); 
String para = "t111";

 
Object ret = call.invoke(new Object[]{para});

 
System.out.println("Der XML-String: "+ret.toString()); 
} catch(Exception e) { 
e.printStackTrace(); }


Re: Stopping the process of invocation by a Handler

2002-12-19 Thread Toshiyuki Kimura
Hi Sepo,
(B
(B  You can find some sample handlers of JAX-RPC implementation
(Bat "axis-1_1beta/samples/jaxrpc/hello" in your system.
(BI recommend you should refer ONLY source code (*.java) in this
(Bdirectory. If you want a sample of HandlerChain definition,
(Byou'd better see "axis-1_1beta/test/wsdl/jaxrpchandler/*.wsdd".
(B
(B  I mean that there're two types of "*.wsdd" for the workflow
(Bdefinition. See below:
(B
(BAXIS style definition:
(B--- CUT - CUT - CUT - CUT - CUT ---
(BrequestFlow
(B handler type="java:org.apache.axis.handlers.JAXRPCHandler"
(B  parameter name="scope" value="session"/
(B  parameter name="className" value="samples.jaxrpc.hello.ClientHandler"/
(B /handler
(B/requestFlow
(BresponseFlow
(B handler type="java:org.apache.axis.handlers.JAXRPCHandler"
(B  parameter name="scope" value="session"/
(B  parameter name="className" value="samples.jaxrpc.hello.ClientHandler"/
(B /handler
(B/responseFlow
(B--- CUT - CUT - CUT - CUT - CUT ---
(B
(BJAX-RPC style definition:
(B--- CUT - CUT - CUT - CUT - CUT ---
(BhandlerInfoChain
(B handlerInfo classname="test.wsdl.jaxrpchandler.ClientHandler"
(B  parameter name="param1" value="value1"/
(B  parameter name="param4" value="value4"/
(B  parameter name="param3" value="value3"/
(B  header qname="ns11:Bob" xmlns:ns11="http://bob.com/stuff"/
(B  header qname="ns12:Fred" xmlns:ns12="http://fred.com/stuff"/
(B  header qname="ns12:Fred" xmlns:ns12="FredNS"/
(B  header qname="ns11:Bob" xmlns:ns11="BobNS"/
(B  header qname="Tom"/
(B /handlerInfo
(B role soapActorName="Mary"/
(B/handlerInfoChain
(B--- CUT - CUT - CUT - CUT - CUT ---
(B
(B  Regarding your question, I don't have sure answer to you. Sorry,
(Bmy interest is JAX-RPC implementation of handler.
(B
(BGreetings from Tokyo/Japan (l.t. 10:20 PM :-)
(BMaybe, see you tomorrow ...
(B
(B  Toshiyuki Kimura [EMAIL PROTECTED]
(B  RD Headquaters
(B  NTT DATA Corporation
(B
(B-Original Message-
(BFrom: [EMAIL PROTECTED]
(B[mailto:[EMAIL PROTECTED]]
(BSent: Thursday, December 19, 2002 5:57 PM
(BTo: [EMAIL PROTECTED]
(BSubject: AW: Stopping the process of invocation by a Handler
(B
(BHi toshi,
(B
(Bthanks for that detailed answer. If I understood you right it is like this:
(Bif I want to stop the chain and return with an error message to the client,
(Bthis is not possible with the axis-implementation?! So probably I will just
(Bset a session-parameter in my handler, that I have to look for in called
(Bmethods. Thats suboptimal, but I do not have to much time :-(
(BAnd if I want to use that JAX-rpc, how do I do? All I do at the moment is,
(Bjust deploying the handler in the wsdd, but without a hint to axis-impl.
(BWhere would I have to define to use jax-rpc? inside the java-code of the
(Bhandler?
(B
(BAnd waht about my problem with the throwing of axis-faults. Even with try
(Bcatch everywhere on the client side, the stacktrace is printed if the
(Baxis-fault is thrown by a handler. is it normal?
(B
(Bthanks in advance and Greetings from Hamburg/Germany
(BSeppo
(B
(B-Urspr$B!&(Bgliche Nachricht-
(BVon: Toshiyuki Kimura [mailto:[EMAIL PROTECTED]] 
(BGesendet: Donnerstag, 19. Dezember 2002 05:01
(BAn: [EMAIL PROTECTED]
(BBetreff: Re: Stopping the process of invocation by a Handler
(B
(BHello Sebastian,
(B
(B how can stop the process of invocation with the help of a handler?
(B
(B  As you may know, AXIS has two implementations of "handler"; AXIS and
(BJAX-RPC. The easiest way what you want to do is JAX-RPC imp., I think.
(B
(B  Because the JAX-RPC ver 1.0 specifies the sequence of HandlerChain
(B(includes stopping the HandlerChain and the target service endpoint).
(B
(B  But, please note that the current version of AXIS (1.1 Beta) has a bug
(Brelated the way of using above. I've already posted it to Bugzilla (the
(BApache bug database). 
(B
(B You can refer the detail of the bug at the following site:
(Bhttp://nagoya.apache.org/bugzilla/show_bug.cgi?id=15478
(B
(B  I hope this helps you. 
(B
(BBest Regards,
(B
(B  Toshiyuki Kimura [EMAIL PROTECTED]
(B  RD Headquaters
(B  NTT DATA Corporation



Reusing Serializer/Deserializer for generic XML loading?

2002-12-19 Thread Joel Grenon
Title: Message



I've used WSDL2Java 
to generate a number of wrappers. Each of those wrappers contains all the code 
to marshall and unmarshall the objectfrom/to XML. I'd like to reuse this 
code to help automate my JUnit tests. I have a bunch of test data in XML, which 
are using the same schema than the one in the WSDL. Instead of using another XML 
persistence layer, I'd like to reuse the Deserializer to read in the XML 
document and populate my wrapper state automaticaly.

I've retrieved a 
Deserializer from the wrapper and integrated it in my SAX event handling but I'm 
missing the DeserializationContext which sounds like hard to generate outisde a 
SOAP Call. Is there an easy way to create a DeserializationContext (an API 
somewhere)? I need it fully configured (with all type mappings and the 
rest...)

Any help 
welcomed.

Joel



Passing a DataHandler as a Parameter and returning a DataHandler

2002-12-19 Thread Shrotriya, Sumit



Hi 
All,

I need to pass a DataHandler as a Parameter and return a 
DataHandler from a service over Axisany quick start pointers or 
ideas?

Thanks,
Sumit



Re: Returning an Array of Strings...quick start pointers

2002-12-19 Thread James Black
Ken Reek wrote:

   I need to retun an array of strings as a result of a call. Any quick
 start ideas or pointers...??

  I use java2wsdl, and in there I return arrays of strings, and it works
fine.





RE: Can't JMS Sample

2002-12-19 Thread David payam
hi Kamesh:

Thanks for your advice, I will try the sun j2ee.
The JMS Jar file was downloaded from SUN website.


Regards

David

 --- Kameshwar Jayaraman [EMAIL PROTECTED]
wrote:  David,
  
 MyCF is an Jndi name for the Connection Facotory and
 I think you are
 using SunOne JMS Provider so please use the Sun J2EE
 RI's admin tool to
 create a Connection factory entry and then
 Try running the sample.
  
 Hope that helps
  
 Thanks
  
 Kamesh
  
 -Original Message-
 From: David payam [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, December 18, 2002 9:26 AM
 To: [EMAIL PROTECTED]
 Subject: Can't JMS Sample 
  
 hi:
When I ran the JMS sample, I got the erro code:
  
 - Exception:
 javax.naming.NameNotFoundException: MyCF
 at

com.sun.jndi.fscontext.RefFSContext.getObjectFromBindings(RefFSContex
 t.java:400)
 at

com.sun.jndi.fscontext.RefFSContext.lookupObject(RefFSContext.java:32
 7)
 at

com.sun.jndi.fscontext.RefFSContext.lookup(RefFSContext.java:146)
 at

com.sun.jndi.fscontext.FSContext.lookup(FSContext.java:127)
 at

javax.naming.InitialContext.lookup(InitialContext.java:350)
 at

org.apache.axis.components.jms.JNDIVendorAdapter.getConnectionFactory
 (JNDIVendorAdapter.java:106)
 at

org.apache.axis.components.jms.JNDIVendorAdapter.getQueueConnectionFa
 ctory(JNDIVendorAdapter.java:86)
 at

org.apache.axis.transport.jms.JMSConnectorFactory.createConnector(JMS
 ConnectorFactory.java:168)
 at

org.apache.axis.transport.jms.JMSConnectorFactory.createServerConnect
 or(JMSConnectorFactory.java:101)
 at

org.apache.axis.transport.jms.SimpleJMSListener.init(SimpleJMSListe
 ner.java:120)
 at
 samples.jms.JMSTest.main(JMSTest.java:116)
 Exception in thread main
 javax.naming.NameNotFoundException: MyCF
 at

com.sun.jndi.fscontext.RefFSContext.getObjectFromBindings(RefFSContex
 t.java:400)
 at

com.sun.jndi.fscontext.RefFSContext.lookupObject(RefFSContext.java:32
 7)
 at

com.sun.jndi.fscontext.RefFSContext.lookup(RefFSContext.java:146)
 at

com.sun.jndi.fscontext.FSContext.lookup(FSContext.java:127)
 at

javax.naming.InitialContext.lookup(InitialContext.java:350)
 at

org.apache.axis.components.jms.JNDIVendorAdapter.getConnectionFactory
 (JNDIVendorAdapter.java:106)
 at

org.apache.axis.components.jms.JNDIVendorAdapter.getQueueConnectionFa
 ctory(JNDIVendorAdapter.java:86)
 at

org.apache.axis.transport.jms.JMSConnectorFactory.createConnector(JMS
 ConnectorFactory.java:168)
 at

org.apache.axis.transport.jms.JMSConnectorFactory.createServerConnect
 or(JMSConnectorFactory.java:101)
 at

org.apache.axis.transport.jms.SimpleJMSListener.init(SimpleJMSListe
 ner.java:120)
 at
 samples.jms.JMSTest.main(JMSTest.java:116)
 So why MyCF can been found?
  
 Regards
 David
  
  
   _  
 
 Post your free ad now! 
 http://ca.personals.yahoo.com/ Yahoo! Canada
 Personals 

__ 
Post your free ad now! http://personals.yahoo.ca



RE: Design question on using Java classes v/s hashes or arrays

2002-12-19 Thread Garbis, Jason
Hi folks,

Rajal, you've hit on one of the difficulties of using WS for building a distributed 
system.
WS is not a design center, it's a set of communication protocols. 

That is, there's no there there.

Unlike OO systems (like CORBA, or COM, or even EJB) there's nothing to hang your hat 
on in terms of solving these kinds of problems. 
If this was a CORBA system, you could address this in a number of ways -- interface 
versioning, namespaces (CORBA modules), Naming Service hierarchies, etc.

With WS, this is more difficult, since the underlying WS implementation is independent 
of the interaction protocol and metadata (SOAP/WSDL).

Your option 1 below, is pretty distasteful, since you're bypassing any typechecking, 
and (more importantly) excluding important information from the WSDL metadata. That 
is, a user would have to consult some external metadata to understand what is and 
isn't valid input. This defeats the purpose of using WSDL.

I believe you will need to construct separate endpoints for each version, since as far 
as WSDL is concerned, these are different entities (the SOAP port and binding 
information is specific to one message type).

Or, could you change the XML type definition for the input message to support optional 
fields? Then, in the handler that receives this invocation, you'll have to figure out 
which set of input parameters are actually in the SOAP message, and dispatch it to the 
appropriate resource (e.g. Java class).
(This assumes you even want to write this dispatching code...)


This is a real challenge in building tightly-coupled distributed systems with WS -- it 
just doesn't provide all the QoS that we're used to in other distributed computing 
technologies. Another example is session management...

good luck
Jason



 -Original Message-
 From: Rajal Shah [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 17, 2002 5:10 PM
 To: Axis User Mailing List
 Subject: Design question on using Java classes v/s hashes or arrays
 
 
 Folks
 
 I'm been struggling to find a good design approach to building our web
 services and wanted to explore options with everyone.
 
 Suppose we have a web service which takes in say 3 parameters 
 as input and
 it returns a list of records of a database with specific column/field
 information.
 
 Now in a future version, I might have to enhance this service 
 to take in 4
 parameters as input. Also, in this new version the service 
 would return the
 list of records with more column/field information then the previous
 version.
 
 What I would like to do, is to publish the service interface 
 now (generating
 the client stub using WSDL2Java) such that when we come out 
 with the new
 version of the service - with 4 params and more column info - 
 I still want
 the apps with the old client stub to still work as is and 
 retrieve the old
 information from this updated web service.
 
 How can we achieve this?
 
 Here are some of the thoughts I had:
 1. One way to deal with this is to take input parameters as 
 an array or hash
 and similarly each output record will be a hash/array with 
 the column name
 and value. I don't like this idea simply cause we're 
 publishing the API and
 by putting everything as an array/hash makes it look as if we're not
 thinking enough.. (though this could be a viable option). 
 Plus I don't know,
 if the XML-Java conversion will work for old client, when 
 there is more
 information then what was published earlier?
 
 2. Build the signature of the service method with 3 params 
 for now and then
 provide another service method with 4 params later. This 
 overloading will do
 the trick for the inputs. (I don't know if SOAP will allow that..)
 
 3. Build a separate endpoint for every version. (yikes)
 
 
 I hope someone can guide me on the right path with regards 
 the design of web
 services. Thanks.
 --
 Rajal
 
 
 



Re: Design question on using Java classes v/s hashes or arrays

2002-12-19 Thread Bill de hÓra
Garbis, Jason wrote:


Your option 1 below, is pretty distasteful, since you're bypassing any typechecking, and (more importantly) excluding 
important information from the WSDL metadata. That is, a user would 
have to consult some external metadata to understand what is and 
isn't valid input. This defeats the purpose of using WSDL.

I belive a dictionary/data driven approach is a good choice when the 
interface is unstable or likely to change. Typechecking depends on 
the nature of the keys used and the argument being passed in.


Or, could you change the XML type definition for the input message to support optional fields? Then, in the handler that receives this invocation, you'll have to figure out which set of input parameters are actually in the SOAP message, and dispatch it to the appropriate resource (e.g. Java class).
(This assumes you even want to write this dispatching code...)


That would be one approach- it sounds very like a generic method, 
the most specific version of the.method is selected for the 
arguments supplied. It's a way to work around the fact that 
SOAP/WSDL doesn't offer much by the way of polymorphism. It's not 
btw, a million miles away from using a dictionary. Another option is 
not to use a custom interface, instead see if the service can be 
described in terms of HTTP methods, which are stable, polymorphic 
and highly generic and bind the WSDL to that.


This is a real challenge in building tightly-coupled distributed systems with WS 

It is, but, the point of using WS is to build loosely coupled 
systems with coarse grained messages. Another take is that tightly 
coupling systems through fine grained method calls is not a good 
approach for building web distributed systems the problems Rajal is 
running into simply reflect that it's an antipattern at best.

(As an aside, not using a finegrained approach is no evidence of 
'not thinking enough'- far from it)

Bill de hÓra
--
Propylon
www.propylon.com





Re: Is axis support anyType ?

2002-12-19 Thread Benjamin Tomasini
In my understanding, the serialization / deserialization depends on
knowing what the type is.

Asking Axis to deserialize anyType is just not possible.  You would open
the door to a large amount of runtime errors.

I think your last email said that the method would always return null. 
If so, I would make a new wrapper class that omits that method.  And
also make them normal JavaBeans and use the standard bean serializer.

Ben

On Thu, 2002-12-19 at 04:42, Dongsheng Song wrote:
 Hi,
 
 Is axis support anyType ? If so, give me some examples.
 
 Thanks.





Problems with PROP_SEND_XSI

2002-12-19 Thread Brian Ewins
I am trying to get Axis to talk to a web service written by a third 
party which uses the 1999 Schema. I seem unable to convince Axis to use 
the 1999 schema, or to turn off sending the xsi:type info, which is 
causing a validation error at the other end.

This whole PROP_SEND_XSI/SEND_TYPE_ATTR issue seems to be almost 
entirely undocumented, but there are more mailing list posts about it 
than 'setSchemaVersion()' so I'm hoping someone might have had some success.

Trawling through the code, it appears to me that I should be doing:
_call.getMessageContext().setProperty(_call.SEND_TYPE_ATTR, Boolean.FALSE);

(in 'createCall' in a binding stub generated from WSDL[1])
However, I've also seen people try most of these variations:
// first one is in the 'TestXsiType' test case for Axis
// so should work!!
_call.getMessageContext().setProperty(Call.SEND_TYPE_ATTR, false);
_call.setOption(Call.SEND_TYPE_ATTR,Boolean.FALSE);
_call.setProperty(Call.SEND_TYPE_ATTR,Boolean.FALSE);
_call.setScopedProperty(Call.SEND_TYPE_ATTR,Boolean.FALSE);
_call.setOption(AxisEngine.PROP_SEND_XSI,Boolean.FALSE);
_call.setProperty(AxisEngine.PROP_SEND_XSI,Boolean.FALSE);
_call.setScopedProperty(AxisEngine.PROP_SEND_XSI,Boolean.FALSE);
_call.getMessageContext().setProperty(AxisEngine.PROP_SEND_XSI, 
Boolean.FALSE);
_call.getService().getAxisEngine().setOption(AxisEngine.PROP_SEND_XSI, 
Boolean.FALSE);

(Also lots of examples with new Boolean(false). Which just creates new 
Boolean objects for no reason?) None of these are working for me. 
Digging further I found this code in SerializationContextImpl:
// Send the xmlType if indicated or if
// the actual xmlType is different than the
// prefered xmlType
if (shouldSendType ||
(xmlType != null 
(!xmlType.equals(actualXMLType.value {
 attributes = setTypeAttribute(attributes,
 actualXMLType.value);
}

Hmmm I think that going against the explicitly set value of 
'shouldSetType' deserves a log message...but anyway I think this is the 
crux of my problem. My generated code had :
_call.addParameter(new javax.xml.namespace.QName(, XMLRequest), new 
javax.xml.namespace.QName(http://www.w3.org/1999/XMLSchema;, string), 
java.lang.String.class, javax.xml.rpc.ParameterMode.IN);

however the fragment from Axis above suggests I need to use this instead:
_call.addParameter(new javax.xml.namespace.QName(, XMLRequest), new 
javax.xml.namespace.QName(http://www.w3.org/2001/XMLSchema;, string), 
java.lang.String.class, javax.xml.rpc.ParameterMode.IN);

to prevent axis from writing the type I don't want to see in the call. 
Fine, I'll accept any level of insanity if the code works ;) However, 
this doesnt work either:

15273 [Thread-4] DEBUG org.apache.axis.client.Call  - Enter: 
Call::invoke(ns, meth, args)
15303 [Thread-4] DEBUG org.apache.axis.client.Call  - operation=name: 
   null
returnQName: null
returnType:  {http://www.w3.org/2001/XMLSchema}string
returnClass: class java.lang.String
elementQName:null
soapAction:  null
style:   rpc
numInParams: 1
method:null
 ParameterDesc[0]:
  name:   XMLRequest
  typeEntry:  null
  mode:   IN
  isReturn:   false
  typeQName:  {http://www.w3.org/2001/XMLSchema}string
  javaType:   class java.lang.String
[...snip...]
15453 [Thread-4] DEBUG org.apache.axis.client.Call  - ?xml 
version=1.0 encoding=UTF-8?
soapenv:Envelope 
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; 
xmlns:xsd=http://www.w3.org/2001/XMLSchema; 
xmlns:xsi=http://www.w3.org/2001/XMLSc
hema-instance
 soapenv:Body
  ns1:XMLListForms 
soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; 
xmlns:ns1=/jetforms/soap/Server.xml
   XMLRequest xsi:type=xsd:string[data snipped]/XMLRequest
  /ns1:XMLListForms
 /soapenv:Body
/soapenv:Envelope

(NB the operation name and method appear to be null above because axis 
doesnt set them, eg Call uses 'operationName' rather than set the name 
of 'operation'; this doesnt look like an error in my code)

Anyway, I'm off to run this under a debugger to see if there is some 
/other/ way the code can ignore me telling it not to send xsi:types. Has 
anyone got any idea how to get shot of the xsi:type? Or how to get 
setSchemaVersion to work?

-Baz


[1]the author of the other service is still using SDL to spec it. In 
previous releases of the service the WSDL I've written to match it has 
worked from axis because it didn't check my xsi:types. I know from 
checking network traces against another client that the code I'm sending 
is entirely correct apart from the xsi:type.





RE: Reusing Serializer/Deserializer for generic XML loading?

2002-12-19 Thread David Altenburg
Title: RE: Reusing Serializer/Deserializer for generic XML loading?





Joel,


I've done exactly what you're describing, for the purpose of testing. We've found that using XML tools that can automaticall populate an instance document (such as XML spy), we're able to generate a lot of test data really quickly. Unfortunately, it turned out to be more difficult that would be expected. 

Here is an example of the DeserializationContext creation:



 // Get the xml source from our string that we've read from a file
 Reader reader = new StringReader(xmlString);
 InputSource xmlSource = new InputSource(reader);


 // Get an engine configuration and let that populate the type mappings for us
 EngineConfigurationFactory configFactory = EngineConfigurationFactoryDefault.newFactory(null);
 EngineConfiguration engineConfig = configFactory.getServerEngineConfig();
 AxisServer server = new AxisServer(engineConfig);
 MessageContext msgContext = new MessageContext(server);


 // Some voodoo here. We need the message context we use to create the deserializer to use our type mapping registry

 TypeMappingRegistry tmr = engineConfig.getService(new QName(,OurWebService)).getTypeMappingRegistry();
 msgContext.setTypeMappingRegistry(tmr);


 // finally! we can create the deserialization context
 DeserializationContextImpl dser = new DeserializationContextImpl(
 xmlSource,
 msgContext,
 org.apache.axis.Message.REQUEST);



This is based on the 1.0 release source, so it may need to change for the latest source. I haven't tried that yet.
This is also dependent on the server-config.wsdd since that is where the type mappings reside. We also had to create our own serializer to use this, but I'm not sure if you'll need to in order to use it, depending on the structure of your WSDL. When we used a wrapped doc/lit style WSDL, we had to do some more voodoo with the type mappings, explicitly inserting the type mapping with our types into the chain of type mappings. With SOAP/RPC, however, we didn't have to do that.

I don't expect that you'll be able to take this code and get it working out of the box, but it will hopefully get you started. 

Thanks,


David Altenburg 



-Original Message-
From: Joel Grenon [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 19, 2002 8:37 AM
To: [EMAIL PROTECTED]
Subject: Reusing Serializer/Deserializer for generic XML loading?



I've used WSDL2Java to generate a number of wrappers. Each of those wrappers contains all the code to marshall and unmarshall the object from/to XML. I'd like to reuse this code to help automate my JUnit tests. I have a bunch of test data in XML, which are using the same schema than the one in the WSDL. Instead of using another XML persistence layer, I'd like to reuse the Deserializer to read in the XML document and populate my wrapper state automaticaly.

I've retrieved a Deserializer from the wrapper and integrated it in my SAX event handling but I'm missing the DeserializationContext which sounds like hard to generate outisde a SOAP Call. Is there an easy way to create a DeserializationContext (an API somewhere)? I need it fully configured (with all type mappings and the rest...)

Any help welcomed.


Joel





RE: Java2WSDL Enum handling question

2002-12-19 Thread Rajal Shah
Exactly.. I used the WSDL2Java tool to convert a Enum declaration to a Java
class and I saw these 3 methods in it.. And you need to have one method at
least which return YourEnumClass to get the schema in the WSDL, I think..

The thing is that, the outputted Java class from WSDL2Java did not have any
default public constructor.. When I do a Java2WSDL conversion to if with my
service it complains about it.. So clearly all it is not well with these 2
tools who are suppose to mirror image their behavior. (ps: standalone
conversion back to Java works, but not when I add it as a parameter to my
method in the service).

As a service provider for my division, when someone gives me an interface to
publish as a service, I am detailing out a process where the recommended
step is to generate WSDL manually (through WSDL Editors or hand-written)
instead of using the Java2WSDL tool and then use the WSDL2Java tool for the
client stubs. This way the WSDL is accurate to what we want and the client
stubs actually generate the client interface that we want them to use.. (The
fidelity of Java2WSDL and then back to Java is not accurate at times, as per
my observation).

The side benefit of this approach is that at Cisco we have a lot of Perl
applications who would be talking to the service. And Perl's SOAP::Lite
package works directly off the WSDL. Thus accurately defining the WSDL - as
opposed to auto generating it - may be the right way to go.

Thanks for all the help.
--
Rajal



-Original Message-
From: Steve Kinsman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 19, 2002 12:35 AM
To: [EMAIL PROTECTED]
Subject: RE: Java2WSDL Enum handling question


Hi, I missed previous posts on this, and I'm not sure what your exact
problem is but maybe the following will help.  I develop using Java2WSDL
then WSDL2Java, and found that for this to work with enums correctly the
original java source needed to have:

 - a getValue() method - String getValue()
 - a fromValue() method - YourEnumClass fromValue(String)
 - a fromString() method - YourEnumClass fromString(String)

Try defining these in your enum class and see how you go!


Steve





Eirik.Wahl@b
ravida.no   To: [EMAIL PROTECTED]
 cc:
19/12/2002   Subject: RE: Java2WSDL Enum
handling question
16:16
Please
respond to
axis-user





Hi Rajal!

I'm aiming at doing the same, but have had no time yet to look into
this. Since nobody else has answered, I wanted to give you this hint
(although no solution ... yet):

Maybe a way to go is to try this text in your WSDL file, and use
WSDL2Java to see what kind of Java code it generates? The output is
hopefully something java2wsdl expects as input.

On 2002-09-23, 16:35 Harish Prabandham wrote:
Hi,

I defined  a simpleType in wsdl that looks something like this:


  xsd:simpleType name=PlanType
xsd:restriction base=xsd:int
xsd:enumeration name=Gold value=0/
xsd:enumeration name=Silver value=1/
xsd:enumeration name=Bronze value=2/
/xsd:restriction
  /xsd:simpleType

The resulting wsdl2java generated code does not make use of the Gold,
Silver, Bronze.  Is there a way I can associate user defined
identifiers
within the generated code instead of value0, value1 etc. that get
generated
by default.


Thx.


Harish

Not much to go on, but could be a way out. Would have tried this myself,
if it wasn't for that I have too little time nowadays. Please let me
know if you find something usefull out from this.

By the way: The question from Harish is till unanswered (as far as I
know).

Regards,
Eirik


 -Original Message-
 From: Rajal Shah [mailto:[EMAIL PROTECTED]]
 Sent: 17. desember 2002 20:02
 To: Axis User Mailing List
 Subject: Java2WSDL Enum handling question


 I've read the discussion thread on enums on this list.. It
 still doesn't
 solve my problem.

 I am using the type-safe enumeration in my java class (code
 included below)
 and am hoping to get an enumeration mapping in the WSDL using
 the java2wsdl
 tool. But I am unable to produce it.. Any help in figuring
 out what I'm
 doing wrong would be helpful.

 public final class SearchType {

 //this is the dummy constructor requirement for Java2WSDL to work.
 public SearchType() {
  this.name = COMPANY_SEARCH;
 }

 private SearchType(String name) {
  this.name = name;
 }

 private final String name;

 public static final SearchType COMPANY_SEARCH =
   new SearchType
(COMPANY_SEARCH);
 public static final SearchType SITE_SEARCH =
new SearchType(SITE_SEARCH);
 public static final SearchType XYZ_SEARCH = new
 SearchType(XYZ_SEARCH);

 public final String toString() {
  return 

Re: Problems with PROP_SEND_XSI

2002-12-19 Thread Dennis Sosnoski
Hi Brian,

I don't know about the schema issue. On the xsiTypes issue it'd be 
useful if you could show what gets sent by Axis when you turn off 
PROP_SEND_XSI to show what's causing the problem (without your patching 
anything other than turning off the flag). Axis will still send types at 
times even with PROP_SEND_XSI false, because they're required by the 
SOAP spec. Think of it as controlling the sending of optional type 
information...

 - Dennis

Dennis M. Sosnoski
Enterprise Java, XML, and Web Services Support
http://www.sosnoski.com
Redmond, WA  425.885.7197

Brian Ewins wrote:

I am trying to get Axis to talk to a web service written by a third 
party which uses the 1999 Schema. I seem unable to convince Axis to 
use the 1999 schema, or to turn off sending the xsi:type info, which 
is causing a validation error at the other end.

This whole PROP_SEND_XSI/SEND_TYPE_ATTR issue seems to be almost 
entirely undocumented, but there are more mailing list posts about it 
than 'setSchemaVersion()' so I'm hoping someone might have had some 
success.

Trawling through the code, it appears to me that I should be doing:
_call.getMessageContext().setProperty(_call.SEND_TYPE_ATTR, 
Boolean.FALSE);

(in 'createCall' in a binding stub generated from WSDL[1])
However, I've also seen people try most of these variations:
// first one is in the 'TestXsiType' test case for Axis
// so should work!!
_call.getMessageContext().setProperty(Call.SEND_TYPE_ATTR, false);
_call.setOption(Call.SEND_TYPE_ATTR,Boolean.FALSE);
_call.setProperty(Call.SEND_TYPE_ATTR,Boolean.FALSE);
_call.setScopedProperty(Call.SEND_TYPE_ATTR,Boolean.FALSE);
_call.setOption(AxisEngine.PROP_SEND_XSI,Boolean.FALSE);
_call.setProperty(AxisEngine.PROP_SEND_XSI,Boolean.FALSE);
_call.setScopedProperty(AxisEngine.PROP_SEND_XSI,Boolean.FALSE);
_call.getMessageContext().setProperty(AxisEngine.PROP_SEND_XSI, 
Boolean.FALSE);
_call.getService().getAxisEngine().setOption(AxisEngine.PROP_SEND_XSI, 
Boolean.FALSE);

(Also lots of examples with new Boolean(false). Which just creates new 
Boolean objects for no reason?) None of these are working for me. 
Digging further I found this code in SerializationContextImpl:
// Send the xmlType if indicated or if
// the actual xmlType is different than the
// prefered xmlType
if (shouldSendType ||
(xmlType != null 
(!xmlType.equals(actualXMLType.value {
 attributes = setTypeAttribute(attributes,
 actualXMLType.value);
}

Hmmm I think that going against the explicitly set value of 
'shouldSetType' deserves a log message...but anyway I think this is 
the crux of my problem. My generated code had :
_call.addParameter(new javax.xml.namespace.QName(, XMLRequest), 
new javax.xml.namespace.QName(http://www.w3.org/1999/XMLSchema;, 
string), java.lang.String.class, javax.xml.rpc.ParameterMode.IN);

however the fragment from Axis above suggests I need to use this instead:
_call.addParameter(new javax.xml.namespace.QName(, XMLRequest), 
new javax.xml.namespace.QName(http://www.w3.org/2001/XMLSchema;, 
string), java.lang.String.class, javax.xml.rpc.ParameterMode.IN);

to prevent axis from writing the type I don't want to see in the call. 
Fine, I'll accept any level of insanity if the code works ;) However, 
this doesnt work either:

15273 [Thread-4] DEBUG org.apache.axis.client.Call  - Enter: 
Call::invoke(ns, meth, args)
15303 [Thread-4] DEBUG org.apache.axis.client.Call  - operation=name: 
   null
returnQName: null
returnType:  {http://www.w3.org/2001/XMLSchema}string
returnClass: class java.lang.String
elementQName:null
soapAction:  null
style:   rpc
numInParams: 1
method:null
 ParameterDesc[0]:
  name:   XMLRequest
  typeEntry:  null
  mode:   IN
  isReturn:   false
  typeQName:  {http://www.w3.org/2001/XMLSchema}string
  javaType:   class java.lang.String
[...snip...]
15453 [Thread-4] DEBUG org.apache.axis.client.Call  - ?xml 
version=1.0 encoding=UTF-8?
soapenv:Envelope 
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; 
xmlns:xsd=http://www.w3.org/2001/XMLSchema; 
xmlns:xsi=http://www.w3.org/2001/XMLSc
hema-instance
 soapenv:Body
  ns1:XMLListForms 
soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; 
xmlns:ns1=/jetforms/soap/Server.xml
   XMLRequest xsi:type=xsd:string[data snipped]/XMLRequest
  /ns1:XMLListForms
 /soapenv:Body
/soapenv:Envelope

(NB the operation name and method appear to be null above because axis 
doesnt set them, eg Call uses 'operationName' rather than set the name 
of 'operation'; this doesnt look like an error in my code)

Anyway, I'm off to run this under a debugger to see if there is some 
/other/ way the code can ignore me telling it not to send xsi:types. 
Has anyone got any idea how to get shot of the xsi:type? Or how to get 
setSchemaVersion to work?

-Baz


[1]the author of the other service is still using SDL to spec it. In 
previous releases of the service the WSDL I've written to match it has 
worked from axis because it didn't check my xsi:types. I 

Re: property PROP_SEND_XSI

2002-12-19 Thread Dennis Sosnoski
That looks like the case I mentioned in my previous email, where the 
SOAP spec requires some form of type on an array definition. I don't 
think this can be omitted from a SOAP message without invalidating it.

 - Dennis

BOURLON Agnès wrote:

Dennis,

I don't know if it 's that you need ... but this is a sample that our client
generate :
The only complex type specified the first object and in this object, the
only xsi specified parameters are the arrays (Foo[])
..
soapenv:Body

 ns1:myMethod
soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:ns1=urn:MyService 

  in0 xsi:type=ns2:MyRequest xmlns:ns2=http://myservice.com;

   isOkfalse/isOk

   timeSlot

date

 iso86012002-12-15T17:00+01:00/iso8601

/date

   /timeSlot

   information

labelThis is the information/label

description/description

   /information

   fooList soapenc:arrayType=ns2:Foo[2]
xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;

item

 a117/aA

 a2

  bString/b

 /a2

/item

item

 a118/aA

 a2

  bString/b

 /a2

/item

   / fooList 

  /in0

 /ns1:myMethod

/soapenv:Body

..


- Original Message -
From: Dennis Sosnoski [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December 19, 2002 11:39 AM
Subject: Re: property PROP_SEND_XSI


 

BOURLON Agnès wrote:

   

Do you know if it can work (no xsi type) with GLUE Server or Apache SOAP
Server?

 

I haven't tried eliminating xsi type with either of those, but from what
I've seen I think GLUE supports untyped RPC but Apache SOAP does not.
Perhaps someone with more experience on these two can comment and
correct me if I'm wrong.

   

And a last question.. if we set the PROP_SEND_XSI to false in our Axis
Client (that we use to test our service in Axis server) we noticed that
 

some
 

types in the envelope can contain the xsi types 
For example in the case of the Array  type ..is it for fix the size
 

during
 

the deserialization?

 

As I read the SOAP 1.1 spec the Array type is required, though it can be
a generic 'SOAP-ENC:arrayType=xsd:ur-type[4]', for instance. When this
form is used the individual elements all need to give type information.
From looking at the code I think Axis may put a stronger restriction on
what can be sent, requiring that the type of the array elements be a
specific serializable type. Either way some type information is going to
be required for arrays. I don't know where else you've seen the types,
if you have specific examples let me know.

Having the types included should never be harmful as far as I know.

 - Dennis
   


___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

 





Re: Design question on using Java classes v/s hashes or arrays

2002-12-19 Thread Steve Loughran

- Original Message -
From: Rajal Shah [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December 19, 2002 10:27
Subject: RE: Design question on using Java classes v/s hashes or arrays


 Referring to more discussions on the Internet about versioning of web
 services, this is what I recommend:

 We need to create a versioning plan for our service that is extensible and
 one that also guarantees backward compatibility. I've tried out several
 approaches and that the best practices seem to suggest that we publish a
 different service for each version as shown in the diagram below.

  (http://www.webservicesarchitect.com/content/articles/irani04.asp)

 This choice makes a few decisions:
 1. We do not need to worry about the data objects to be extensible or
 flexible anymore. Instead of using hash tables or arrays we can flat out
go
 ahead and define our data objects as pure Java objects and deal with them
 solely for this version. Each subsequent version where you have to
 enhance/extend these objects, you can give them their own definition..
 2. It makes more sense to decouple web services exchange data objects from
 the actual business data objects. Each web service version can then map
 their data objects in the business object appropriately and share the
 baseline functionality that way.
 3. The baseline functionality could be a J2EE container and the Web
Services
 layer can act purely as a communication transportation mechanism with it
own
 published classes and data objects.


the problem with this is the classic interface versioning problem. While
having different endpoints lets you have multiple interfaces with different
signatures, you are all sharing a common behviour, the semantics. What if
version 1.0 of the interface has one action on, say, deleting an user (like
it is immediate), and version 2.0 changes the implementation details so the
transaction is queued?

Web services have the extra fun of implicit semantics -if a service is
colocated in San Jose off fat pipes, and version 2.0 is hosted out of the
netherlands instead, callers in the bay area will see a different implicit
behaviour (latency, frequency of errors), even if the implementation is
identical.

I talk about versioning a bit in http://iseran.com/Steve/papers/wstw/

-steve




Re: Problems with PROP_SEND_XSI

2002-12-19 Thread Brian Ewins
I only sent the one example in the logs because thats the only thing 
that axis ever sends, no matter what I do!! But to be explicit:

 15453 [Thread-4] DEBUG org.apache.axis.client.Call  - ?xml
 version=1.0 encoding=UTF-8?
 soapenv:Envelope
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 xmlns:xsi=http://www.w3.org/2001/XMLSc
 hema-instance
  soapenv:Body
   ns1:XMLListForms
 soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
 xmlns:ns1=/jetforms/soap/Server.xml
XMLRequest xsi:type=xsd:string[data snipped]/XMLRequest
   /ns1:XMLListForms
  /soapenv:Body
 /soapenv:Envelope

what is logged here is what is exactly what is being sent[1] with the 
unmodified code generated by WSDL2Java, from WSDL which defines 
XMLRequest as being {http://www.w3.org/1999/XMLSchema}string, and that 
1999 does make it into the generated code. This doesnt change with /any/ 
of the various attempts to turn off xsi:type, or with
_call.getMessageContext().setSchemaVersion(SchemaVersion.SCHEMA_1999);
(which to me looks like how I'm supposed to fix this problem. I havent 
spent so much time tracing through where that one gets checked.)

As for this being a spec violation - tell me about it. The service I'm 
talking to seems designed by someone who uses specs as a list of things 
/not/ to do. Every release of their software is worse than the last.

-Baz

[1] This isn't just something wrong with the logs. I'm also looking at 
the messages on the wire in capeclear's nettool.

Dennis Sosnoski wrote:
Hi Brian,

I don't know about the schema issue. On the xsiTypes issue it'd be 
useful if you could show what gets sent by Axis when you turn off 
PROP_SEND_XSI to show what's causing the problem (without your patching 
anything other than turning off the flag). Axis will still send types at 
times even with PROP_SEND_XSI false, because they're required by the 
SOAP spec. Think of it as controlling the sending of optional type 
information...

 - Dennis

Dennis M. Sosnoski
Enterprise Java, XML, and Web Services Support
http://www.sosnoski.com
Redmond, WA  425.885.7197

Brian Ewins wrote:

I am trying to get Axis to talk to a web service written by a third 
party which uses the 1999 Schema. I seem unable to convince Axis to 
use the 1999 schema, or to turn off sending the xsi:type info, which 
is causing a validation error at the other end.

This whole PROP_SEND_XSI/SEND_TYPE_ATTR issue seems to be almost 
entirely undocumented, but there are more mailing list posts about it 
than 'setSchemaVersion()' so I'm hoping someone might have had some 
success.

Trawling through the code, it appears to me that I should be doing:
_call.getMessageContext().setProperty(_call.SEND_TYPE_ATTR, 
Boolean.FALSE);

(in 'createCall' in a binding stub generated from WSDL[1])
However, I've also seen people try most of these variations:
// first one is in the 'TestXsiType' test case for Axis
// so should work!!
_call.getMessageContext().setProperty(Call.SEND_TYPE_ATTR, false);
_call.setOption(Call.SEND_TYPE_ATTR,Boolean.FALSE);
_call.setProperty(Call.SEND_TYPE_ATTR,Boolean.FALSE);
_call.setScopedProperty(Call.SEND_TYPE_ATTR,Boolean.FALSE);
_call.setOption(AxisEngine.PROP_SEND_XSI,Boolean.FALSE);
_call.setProperty(AxisEngine.PROP_SEND_XSI,Boolean.FALSE);
_call.setScopedProperty(AxisEngine.PROP_SEND_XSI,Boolean.FALSE);
_call.getMessageContext().setProperty(AxisEngine.PROP_SEND_XSI, 
Boolean.FALSE);
_call.getService().getAxisEngine().setOption(AxisEngine.PROP_SEND_XSI, 
Boolean.FALSE);

(Also lots of examples with new Boolean(false). Which just creates new 
Boolean objects for no reason?) None of these are working for me. 
Digging further I found this code in SerializationContextImpl:
// Send the xmlType if indicated or if
// the actual xmlType is different than the
// prefered xmlType
if (shouldSendType ||
(xmlType != null 
(!xmlType.equals(actualXMLType.value {
 attributes = setTypeAttribute(attributes,
 actualXMLType.value);
}

Hmmm I think that going against the explicitly set value of 
'shouldSetType' deserves a log message...but anyway I think this is 
the crux of my problem. My generated code had :
_call.addParameter(new javax.xml.namespace.QName(, XMLRequest), 
new javax.xml.namespace.QName(http://www.w3.org/1999/XMLSchema;, 
string), java.lang.String.class, javax.xml.rpc.ParameterMode.IN);

however the fragment from Axis above suggests I need to use this instead:
_call.addParameter(new javax.xml.namespace.QName(, XMLRequest), 
new javax.xml.namespace.QName(http://www.w3.org/2001/XMLSchema;, 
string), java.lang.String.class, javax.xml.rpc.ParameterMode.IN);

to prevent axis from writing the type I don't want to see in the call. 
Fine, I'll accept any level of insanity if the code works ;) However, 
this doesnt work either:

15273 [Thread-4] DEBUG org.apache.axis.client.Call  - Enter: 
Call::invoke(ns, meth, args)
15303 [Thread-4] DEBUG org.apache.axis.client.Call  - 

gzip support

2002-12-19 Thread Brian W. Young
I believe someone posted this question a couple weeks ago with no reply. 
 Perhaps I'll have better luck.

Does Axis support gzip streams?  This is very important to me, because I 
am sending a lot of data.  With home-grown code, I've witnessed a 2 meg 
document get compressed to 56K for an incredible boost in performance.

Please advise, and thank you.
Brian



Dynamic Invocation w/ Axis

2002-12-19 Thread Vinu Murugesan
Hello there,

I'm trying to create a generic invoker for web
services using Axis. If all that you are given is the
WSDL file, then how do you go about getting and
setting the individual parameters for operations in a
SOAP call? I've had some success using the WSDL4J
framework for manipulating the WSDL files, but I'm
still not sure how to create a call in which you don't
know ahead of time what the operations and parameters
will be. Any help would be greatly appreciated.

And also, is it possible to have more than one
Service, PortType, and Message in a Web Service. The
reason I'm asking this is because I have put loops to
get each of these things. If I know that there could
only be 1 of each of these things, then there is no
point in putting them in a loop.

Thanks,
Vinu.

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



RE: Dynamic Invocation w/ Axis

2002-12-19 Thread Chen, Tony
I am trying to do the same thing. I am using WSIF to do it. You may take a
look at the DynamicInvoker example to get an idea.

Right now it seems like handling complex data types is the biggest challenge
to me. I haven't seen any good example with open source components.

I am also new to Web services. As I understand it, yes, there could be more
than one Service, PortType, and Message in a Web service.

Hope this help.

Tony

-Original Message-
From: Vinu Murugesan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 19, 2002 1:28 PM
To: [EMAIL PROTECTED]
Subject: Dynamic Invocation w/ Axis


Hello there,

I'm trying to create a generic invoker for web
services using Axis. If all that you are given is the
WSDL file, then how do you go about getting and
setting the individual parameters for operations in a
SOAP call? I've had some success using the WSDL4J
framework for manipulating the WSDL files, but I'm
still not sure how to create a call in which you don't
know ahead of time what the operations and parameters
will be. Any help would be greatly appreciated.

And also, is it possible to have more than one
Service, PortType, and Message in a Web Service. The
reason I'm asking this is because I have put loops to
get each of these things. If I know that there could
only be 1 of each of these things, then there is no
point in putting them in a loop.

Thanks,
Vinu.

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



AdminClient

2002-12-19 Thread Cory Wilkerson
All,

With Apache SOAP I was able to invoke the org.apache.soap.server.ServiceManager client 
with a url (rpcrouter) at which to register a serivce as described by my descriptor.  
I don't seem to be able to find the analogous process in AXIS service deployment, ie, 
I see AdminClient but I don't see that I'm able to actually to pass it an url against 
which to register the service.  It appears as if I have to have access to the the 
directory in which the deployment descriptor is located...which, in some cases, I'm 
not going to have.

Could someone please advise?

Thanks,
Cory Wilkerson



RE: AdminClient

2002-12-19 Thread Cory Wilkerson
As a side note -- I should also mention that I've integrated Axis with my pre-existing 
web-app located at http://localhost.  That may be a nice detail to know.

Thanks,
Cory

-Original Message-
From: Cory Wilkerson 
Sent: Thursday, December 19, 2002 2:47 PM
To: [EMAIL PROTECTED]
Subject: AdminClient


All,

With Apache SOAP I was able to invoke the org.apache.soap.server.ServiceManager client 
with a url (rpcrouter) at which to register a serivce as described by my descriptor.  
I don't seem to be able to find the analogous process in AXIS service deployment, ie, 
I see AdminClient but I don't see that I'm able to actually to pass it an url against 
which to register the service.  It appears as if I have to have access to the the 
directory in which the deployment descriptor is located...which, in some cases, I'm 
not going to have.

Could someone please advise?

Thanks,
Cory Wilkerson



Re: Dynamic Invocation w/ Axis

2002-12-19 Thread Aleksander Slominski
hi Vinu,

WSIF uses WSDL4J to work with WSDL  documents and AXIS to execute SOAP 
bindings - to look on WSIF check its new homepage 
http://xml.apache.org/axis/wsif/

we are now in process of making first official release you can find 
current beta version (and tomorrow release candidate) in downloads 
section or use CVS to get the current version. WSIF includes now 
documentation with samples so you should be able to see quickly how to 
use dynamic invoker (samples/simplesoap) and look on what is involved to 
work with complex types (complexsoap).

thanks,

alek



Chen, Tony wrote:

I am trying to do the same thing. I am using WSIF to do it. You may take a
look at the DynamicInvoker example to get an idea.

Right now it seems like handling complex data types is the biggest challenge
to me. I haven't seen any good example with open source components.

I am also new to Web services. As I understand it, yes, there could be more
than one Service, PortType, and Message in a Web service.

Hope this help.

Tony

-Original Message-
From: Vinu Murugesan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 19, 2002 1:28 PM
To: [EMAIL PROTECTED]
Subject: Dynamic Invocation w/ Axis


Hello there,

I'm trying to create a generic invoker for web
services using Axis. If all that you are given is the
WSDL file, then how do you go about getting and
setting the individual parameters for operations in a
SOAP call? I've had some success using the WSDL4J
framework for manipulating the WSDL files, but I'm
still not sure how to create a call in which you don't
know ahead of time what the operations and parameters
will be. Any help would be greatly appreciated.

And also, is it possible to have more than one
Service, PortType, and Message in a Web Service. The
reason I'm asking this is because I have put loops to
get each of these things. If I know that there could
only be 1 of each of these things, then there is no
point in putting them in a loop.

Thanks,
Vinu.

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
 


--
Mr. Pauli, we in the audience are all agreed that your theory is crazy. 
What divides us is whether it is crazy enough to be true. Niels H. D. Bohr




RE: AdminClient

2002-12-19 Thread Daleiden, Mike
Cory -

I've implemented code similar to this to deploy/register my service:

String opts[] = new String[1];
opts[0] = -lyour registration URL;  == e.g.,
http://localhost:8080/myapp/services/AdminService
try {
  serviceOptions = new Options(opts);
}
catch (Exception e) {
  serviceOptions = null;
}
AdminClient axisAdmin = new AdminClient();
InputStream wsddStream =
this.getClass().getResourceAsStream(myservice.wsdd);
if (wsddStream != null) {
  try {
String reg = axisAdmin.process(serviceOptions, wsddStream);
if (reg != null)
  SUCCESS
else
  FAILURE
  }
  catch (Exception e) {
REGISTRATION ERROR
  }
}
else
  FAILED TO OPEN WSDD

Hope this helps.

--Mike

-Original Message-
From: Cory Wilkerson [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 19, 2002 3:49 PM
To: [EMAIL PROTECTED]
Subject: RE: AdminClient


As a side note -- I should also mention that I've integrated Axis with
my pre-existing web-app located at http://localhost.  That may be a nice
detail to know.

Thanks,
Cory

-Original Message-
From: Cory Wilkerson 
Sent: Thursday, December 19, 2002 2:47 PM
To: [EMAIL PROTECTED]
Subject: AdminClient


All,

With Apache SOAP I was able to invoke the
org.apache.soap.server.ServiceManager client with a url (rpcrouter) at
which to register a serivce as described by my descriptor.  I don't seem
to be able to find the analogous process in AXIS service deployment, ie,
I see AdminClient but I don't see that I'm able to actually to pass it
an url against which to register the service.  It appears as if I have
to have access to the the directory in which the deployment descriptor
is located...which, in some cases, I'm not going to have.

Could someone please advise?

Thanks,
Cory Wilkerson



RE: AdminClient

2002-12-19 Thread Cory Wilkerson
Mike, 

This looks completely reasonable == I shall give it a run later this evening.  For 
now, I'm going to go the Apache SOAP route I believe -- then come back at it with Axis 
when I get a few free minutes (deadlines and all).

Thanks again,
Cory

-Original Message-
From: Daleiden, Mike [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 19, 2002 3:12 PM
To: [EMAIL PROTECTED]
Subject: RE: AdminClient


Cory -

I've implemented code similar to this to deploy/register my service:

String opts[] = new String[1];
opts[0] = -lyour registration URL;  == e.g.,
http://localhost:8080/myapp/services/AdminService
try {
  serviceOptions = new Options(opts);
}
catch (Exception e) {
  serviceOptions = null;
}
AdminClient axisAdmin = new AdminClient();
InputStream wsddStream =
this.getClass().getResourceAsStream(myservice.wsdd);
if (wsddStream != null) {
  try {
String reg = axisAdmin.process(serviceOptions, wsddStream);
if (reg != null)
  SUCCESS
else
  FAILURE
  }
  catch (Exception e) {
REGISTRATION ERROR
  }
}
else
  FAILED TO OPEN WSDD

Hope this helps.

--Mike

-Original Message-
From: Cory Wilkerson [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 19, 2002 3:49 PM
To: [EMAIL PROTECTED]
Subject: RE: AdminClient


As a side note -- I should also mention that I've integrated Axis with
my pre-existing web-app located at http://localhost.  That may be a nice
detail to know.

Thanks,
Cory

-Original Message-
From: Cory Wilkerson 
Sent: Thursday, December 19, 2002 2:47 PM
To: [EMAIL PROTECTED]
Subject: AdminClient


All,

With Apache SOAP I was able to invoke the
org.apache.soap.server.ServiceManager client with a url (rpcrouter) at
which to register a serivce as described by my descriptor.  I don't seem
to be able to find the analogous process in AXIS service deployment, ie,
I see AdminClient but I don't see that I'm able to actually to pass it
an url against which to register the service.  It appears as if I have
to have access to the the directory in which the deployment descriptor
is located...which, in some cases, I'm not going to have.

Could someone please advise?

Thanks,
Cory Wilkerson



RE: Dynamic Invocation w/ Axis

2002-12-19 Thread Anne Thomas Manes
Vinu,

You should use the JAX-RPC DII (see javax.xml.rpc.call) to construct dynamic
invocations.
A WSDL may have any number of services, bindings, portTypes, and messages.

Anne

 -Original Message-
 From: Vinu Murugesan [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, December 19, 2002 3:28 PM
 To: [EMAIL PROTECTED]
 Subject: Dynamic Invocation w/ Axis


 Hello there,

 I'm trying to create a generic invoker for web
 services using Axis. If all that you are given is the
 WSDL file, then how do you go about getting and
 setting the individual parameters for operations in a
 SOAP call? I've had some success using the WSDL4J
 framework for manipulating the WSDL files, but I'm
 still not sure how to create a call in which you don't
 know ahead of time what the operations and parameters
 will be. Any help would be greatly appreciated.

 And also, is it possible to have more than one
 Service, PortType, and Message in a Web Service. The
 reason I'm asking this is because I have put loops to
 get each of these things. If I know that there could
 only be 1 of each of these things, then there is no
 point in putting them in a loop.

 Thanks,
 Vinu.

 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
 http://mailplus.yahoo.com





RE: Design question on using Java classes v/s hashes or arrays

2002-12-19 Thread Rajal Shah
I see your point.. If business functionality changes though, then maybe you
need to change the method name or something and deprecate the old method..
to solve the issue you bring up. (and work on your SLAs with the clients to
make them understand the new behavior or provide both business logic
options).

I am referring to the versioning of services for extending the functionality
of a data object. And having 2 end points can serve the needs to backward
compatibility and avoid me to define my objects as hashes.

Your document is pretty comprehensive and well thought out!

--
Rajal


-Original Message-
From: Steve Loughran [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 19, 2002 11:06 AM
To: [EMAIL PROTECTED]
Subject: Re: Design question on using Java classes v/s hashes or arrays



- Original Message -
From: Rajal Shah [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December 19, 2002 10:27
Subject: RE: Design question on using Java classes v/s hashes or arrays

the problem with this is the classic interface versioning problem. While
having different endpoints lets you have multiple interfaces with different
signatures, you are all sharing a common behviour, the semantics. What if
version 1.0 of the interface has one action on, say, deleting an user (like
it is immediate), and version 2.0 changes the implementation details so the
transaction is queued?

Web services have the extra fun of implicit semantics -if a service is
colocated in San Jose off fat pipes, and version 2.0 is hosted out of the
netherlands instead, callers in the bay area will see a different implicit
behaviour (latency, frequency of errors), even if the implementation is
identical.

I talk about versioning a bit in http://iseran.com/Steve/papers/wstw/

-steve

 Referring to more discussions on the Internet about versioning of web
 services, this is what I recommend:

 We need to create a versioning plan for our service that is extensible and
 one that also guarantees backward compatibility. I've tried out several
 approaches and that the best practices seem to suggest that we publish a
 different service for each version as shown in the diagram below.

  (http://www.webservicesarchitect.com/content/articles/irani04.asp)

 This choice makes a few decisions:
 1. We do not need to worry about the data objects to be extensible or
 flexible anymore. Instead of using hash tables or arrays we can flat out
go
 ahead and define our data objects as pure Java objects and deal with them
 solely for this version. Each subsequent version where you have to
 enhance/extend these objects, you can give them their own definition..
 2. It makes more sense to decouple web services exchange data objects from
 the actual business data objects. Each web service version can then map
 their data objects in the business object appropriately and share the
 baseline functionality that way.
 3. The baseline functionality could be a J2EE container and the Web
Services
 layer can act purely as a communication transportation mechanism with it
own
 published classes and data objects.








RE: Java2WSDL Enum handling question

2002-12-19 Thread Steve Kinsman

If you're using the typesafe Enum idiom I'm not sure why you want a
default public constructor.  Really you only want a private (or
protected) constructor which accepts whatever arguments you need for
your enum instances, e.g. a description.  A default public constructor
is needed for BeanSerializerFactory I think, but here you should be
using EnumSerializerFactory.

I start off with Rose-generated Java source and Java2WSDL it, then
WSDL2Java it.  After that I find I can continue doing Java2WSDL etc
without harm - my Enums operate fine (I use them as service return
values) and the operations do seem to mirror image.  In case it helps,
below is some stuff related to one of my enums - the generated Java
source, extract from generated WSDL and WSDD files.

Steve

Java source:
/**
 * RequestStatusEnum.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis WSDL2Java emitter.
 */

package com.erggroup.mass.fulfilmgr.requestservice;

public class RequestStatusEnum implements java.io.Serializable {
private java.lang.String _value_;
private static java.util.HashMap _table_ = new java.util.HashMap();

// Constructor
protected RequestStatusEnum(java.lang.String value) {
_value_ = value;
_table_.put(_value_,this);
};

public static final java.lang.String _Unknown = Unknown;
public static final java.lang.String _WaitingRequests
= WaitingRequests;
public static final java.lang.String _WaitingToSend
= WaitingToSend;
public static final java.lang.String _InProgress = InProgress;
public static final java.lang.String _Completed = Completed;
public static final java.lang.String _SystemError = SystemError;
public static final RequestStatusEnum Unknown = new
RequestStatusEnum(_Unknown);
public static final RequestStatusEnum WaitingRequests = new
RequestStatusEnum(_WaitingRequests);
public static final RequestStatusEnum WaitingToSend = new
RequestStatusEnum(_WaitingToSend);
public static final RequestStatusEnum InProgress = new
RequestStatusEnum(_InProgress);
public static final RequestStatusEnum Completed = new
RequestStatusEnum(_Completed);
public static final RequestStatusEnum SystemError = new
RequestStatusEnum(_SystemError);
public java.lang.String getValue() { return _value_;}
public static RequestStatusEnum fromValue(java.lang.String value)
  throws java.lang.IllegalStateException {
RequestStatusEnum enum = (RequestStatusEnum)
_table_.get(value);
if (enum==null) throw new java.lang.IllegalStateException();
return enum;
}
public static RequestStatusEnum fromString(java.lang.String value)
  throws java.lang.IllegalStateException {
return fromValue(value);
}
public boolean equals(java.lang.Object obj) {return (obj == this);}
public int hashCode() { return toString().hashCode();}
public java.lang.String toString() { return _value_;}
}

WSDL bits:
   simpleType name=RequestStatusEnum
restriction base=xsd:string
 enumeration value=Unknown/
 enumeration value=WaitingRequests/
 enumeration value=WaitingToSend/
 enumeration value=InProgress/
 enumeration value=Completed/
 enumeration value=SystemError/
/restriction
   /simpleType
   element name=RequestStatusEnum nillable=true type
=impl:RequestStatusEnum/

WSDD bits:
  typeMapping
xmlns:ns=http://requestservice.fulfilmgr.mass.erggroup.com;
qname=ns:RequestStatusEnum
type
=java:com.erggroup.mass.fulfilmgr.requestservice.RequestStatusEnum
serializer=org.apache.axis.encoding.ser.EnumSerializerFactory
deserializer
=org.apache.axis.encoding.ser.EnumDeserializerFactory
encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
  /






   
   
Rajal Shah   
   
rashah@ciscoTo: [EMAIL PROTECTED]
   
.comcc:   
   
 Subject: RE: Java2WSDL Enum handling 
question
20/12/2002 
   
02:22  
   
Please 
   
respond to 
 

Re: Interoperability Axis with .NET

2002-12-19 Thread Percival
hello chris,

Have you tried using the wsdl from your .NET service to generate a stub 
class in java?
This way, invoking a .NET service will be just like calling a local 
function.

Hope this helps.  ( ^_^'

Regards,
Percival
Cebu, Philippines



On Thu, 19 Dec 2002 11:52:04 +0100, Christian Bucholdt 
[EMAIL PROTECTED] wrote:

Hi,

Few days ago I've developed an .NET Webservice with same Methods.

Now I want to use this Methods from a java client. If I call one of the 
methods without a parameter it works fine.

But, if I want to use a method with a parameter, I get a 
NullPointerException from the services method back.

Know somebody this problem. What can I do.

Thanks for help
christian


P.S. Here is the Code:

The .Net method signature: public string GetSome(string id)

The java code:

try {

URL url = new URL(http://localhost/GetXmlService/GetXmlService.asmx;);
Service  service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( url );
call.setOperationName(new QName(http://tempuri.org/;, get));
call.setUseSOAPAction(true);
call.setProperty(Call.SOAPACTION_URI_PROPERTY,http://tempuri.org/GetElementContentById;) 


;

String paraName = id;
boolean b = call.isParameterAndReturnSpecRequired(new 
QName(http://tempuri.org/;, GetElementContentById));
System.out.println(Boolean: +b);
call.addParameter(paraName,org.apache.axis.Constants.XSD_STRING, 
paraName.getClass(), ParameterMode.IN);
call.setReturnType(org.apache.axis.Constants.XSD_STRING);
String para = t111;

Object ret = call.invoke(new Object[]{para});

System.out.println(Der XML-String: +ret.toString());
}
catch(Exception e) {
e.printStackTrace();
}




--
Percival



Re: gzip support

2002-12-19 Thread Toshiyuki Kimura
Hi Brian,
(B
(B  Do you mean that you want to transfer a gzip file via AXIS
(Bby using SOAP? If I understood what you said properly, you've
(Bjust to implement a SwA(SOAP Messages with Attachments).
(B
(B  Here is the spec: http://www.w3.org/TR/SOAP-attachments
(B
(B  In addition, you will meet the sample code of SwA at the 
(B"axis-1_1beta\samples\attachments" in your environment.
(B
(BBest Regards,
(B
(B  Toshiyuki Kimura [EMAIL PROTECTED]
(B  RD Headquarters
(B  NTT DATA Corporation
(B
(B-Original Message-
(BFrom: Brian W. Young [mailto:[EMAIL PROTECTED]]
(BSent: Friday, December 20, 2002 5:21 AM
(BTo: [EMAIL PROTECTED]
(BSubject: gzip support
(B
(BI believe someone posted this question a couple weeks ago with no reply. 
(B  Perhaps I'll have better luck.
(B
(BDoes Axis support gzip streams?  This is very important to me, because I 
(Bam sending a lot of data.  With home-grown code, I've witnessed a 2 meg 
(Bdocument get compressed to 56K for an incredible boost in performance.
(B
(BPlease advise, and thank you.
(BBrian