Re: Questions about Axis2

2006-12-16 Thread Dennis Sosnoski
For sending objects between Java applications RMI is generally your best 
bet. The only reason to use SOAP/XML is if you want to allow non-Java 
clients or servers to be used.


If you *do* want to allow for non-Java support, JiBX data binding lets 
you work with java.util.Collection classes without much effort. The 
upcoming Axis2 1.1.1 release will have improved support for what's 
called "unwrapped" interfaces using JiBX, and I'll be releasing a new 
version of the JiBX tools that provide code->binding and 
code+binding->schema support in conjunction with the Axis2 1.1.1 
release. These new tools include support for Java 5 generic collections, 
so that handling the type of data structures you described becomes very 
easy using JiBX.


The main downside of JiBX is the limited schema support. It's about on a 
par with ADB, and much more limited than XMLBeans. But JiBX is primarily 
focused on working with existing Java code, so for your case it's 
probably the easiest way to implement web services.


 - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Vanfleet, David wrote:

Thanks for your comments Anne, what you're saying makes since to me.
Some of the data I'll be transferring is raw XML so SOAP sounds like a
reasonable protocol for that. However, other data is in the form of Java
objects and it would be nice if it could be transferred and received as
a Java object. How do I specify data binding for those objects (such as
the one below)? is this done through the services.xml file?

I do think that SOAP is the best protocol for what I need. However, if I
was to look into using anther protocols do you know of any that you can
recommend? I could always open an HTTP connection to a Java servlet and
pass the data as a serialized Java object, I'm not sure what the
advantages or disadvantages are for doing this?

Thanks again,
David

-Original Message-
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
Sent: Saturday, December 16, 2006 12:01 PM

To: axis-user@ws.apache.org
Subject: Re: Questions about Axis2

David,

The first thing you need to understand is that SOAP is not an
especially good protocol for transferring language-specific
collections. If your goal is to implement a Java-to-Java client/server
application, perhaps you should consider using a different protocol --
one that supports the Java type system. SOAP used the XML Schema type
system. For best results using SOAP, your service interface should use
types that map reasonably well to the XML Schema type system. (i.e.,
don't try to use Vector or List to generate your interface -- use
simple arrays instead)

The next thing you need to understand is that there is a layer of
indirection between the data/object model used by the server and
data/object model used by the client. Just because you use
language-specific collections on the server to generate your WSDL
interface, those collections are not apparent to the client. The
client only sees the schema representation of the objects. If you want
your client to convert that schema into the same Java object types
that you use on the server, then you need to specify the data binding
mapping rather than using a tool like wsdl2java to generate it.

Anne

On 12/16/06, Vanfleet, David <[EMAIL PROTECTED]> wrote:
  



Hi,

I'm new to both Axis2 and web services and I'm having a hard time


grasping
  

all the various types of databinding that can be created (POJO, AXIOM,


ADB,
  

XMLBeans and JiBX). I have a couple of general questions about Axis2


and web
  

services.



I need to create a service that can pass complex objects between the


client
  

and the server. Something like my modified weather example below.



My questions about this are as follows:



1) In the testing I've done I noticed that it fails when there are any
java.util.Vector or java.util.List objects within the object being
transferred. I have seen several other posts about this but with no
responses. Does anyone know why this is the case? How can I get around


this?
  


  I read that using an ArrayList object will work which I did verify,


but I
  

need to be able to user List and Vectors.



2) In the following modified Weather class where I have an ArrayList


called
  

children with its set and get methods (this is from the
sample.pojo.rpcclient package distributed with Axis2). When I send


this
  

weather class on a round trip to the WeatherService service calling


the
  

setWeather then the getWeather methods, then I take the returned


weather
  

class and call it's getChildren method I end up with an ArrayList of
OMEElement objects rather than Weather objects as I wanted. I


understand
  

that everything is converted to XML during transport, but how do I get


these
  

elements mapped back into the Weather class

Re: Problems with WSDL2Java

2006-12-16 Thread Peter

On 12/16/06, Peter <[EMAIL PROTECTED]> wrote:


hello,
I am getting problems with WSDL2Java tools in the Axis 1,2,1 under
Tomcat5.5 enviroment

the answers are follows:

D:\wsdl2>java org.apache.axis.wsdl.WSDL2Java province.wsdl
java.lang.NullPointerException
at org.apache.axis.wsdl.toJava.JavaBeanWriter.preprocess
(JavaBeanWriter.
java:264)
at org.apache.axis.wsdl.toJava.JavaBeanWriter.getImplementsText(JavaBean
Writer.java:500)
at org.apache.axis.wsdl.toJava.JavaBeanWriter.writeFileHeader
(JavaBeanWr
iter.java:179)
at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java
:129)
at org.apache.axis.wsdl.toJava.JavaBeanWriter.generate(
JavaBeanWriter.ja
va:1270)
at org.apache.axis.wsdl.toJava.JavaTypeWriter.generate(
JavaTypeWriter.ja
va:113)
at
org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate (Jav
aGeneratorFactory.java:421)
at org.apache.axis.wsdl.gen.Parser.generateTypes(Parser.java:547)
at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:432)
at org.apache.axis.wsdl.gen.Parser.access$000 (Parser.java:45)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java
:362)
at java.lang.Thread.run(Unknown Source)



province.wsdl is here



http://eoms.chinaunicom.com.cn/worktaskschedule/AssignScheduleService
" xmlns:apachesoap="http://xml.apache.org/xml-soap"; 
xmlns:impl="http://eoms.chinaunicom.com.cn/worktaskschedule/AssignScheduleService
" xmlns:intf="
http://eoms.chinaunicom.com.cn/worktaskschedule/AssignScheduleService";
xmlns:wsdl=" http://schemas.xmlsoap.org/wsdl/"; xmlns:wsdlsoap="
http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema
">

 
  http://eoms.chinaunicom.com.cn/worktaskschedule/AssignScheduleService";
xmlns="http://www.w3.org/2001/XMLSchema";>
   

 
 
 

   
   

 

   
   

 
 
 
 
 

   
   
   

 

   
   
   
   

 

   
   

 

   
   

 
 
 
 

   
   
   

 

   
   
   

 
 
 
 
 
 
 

   
   
  
 

   

  

   

   

  

   

   

   

   

  

   

   

  

   

   

  

   

   

  

   

   

  

 

 

 

  

  

 

 

 

  

  

 

 

  

   

   

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

  

 http://eoms.chinaunicom.com.cn/worktaskschedule/AssignScheduleService/AssignForm"/


>

 



 

 



 

 



 

  

  

 http://eoms.chinaunicom.com.cn/worktaskschedule/AssignScheduleService/AckModify"/


>

 



 

 



 

 



 

  

  

 http://eoms.chinaunicom.com.cn/worktaskschedule/AssignScheduleService/RequireReport"/


>

 



 

 



 

  

   

   

  

 http://10.203.19.19/services/AssignSchedulePort"/
>

  

   







Re: AxisFault: null; nexted exception is: XmlStreamException

2006-12-16 Thread Martin Gainty
please post the wsdl
Thank You
--- 
This e-mail message (including attachments, if any) is intended for the use of 
the individual or entity to which it is addressed and may contain information 
that is privileged, proprietary , confidential and exempt from disclosure. If 
you are not the intended recipient, you are notified that any dissemination, 
distribution or copying of this communication is strictly prohibited.

- Original Message - 
From: "Tom Muldoon" <[EMAIL PROTECTED]>
To: 
Sent: Saturday, December 16, 2006 7:03 PM
Subject: AxisFault: null; nexted exception is: XmlStreamException 


>I am admittedly a web service beginner and I'm trying to write my first 
> client program - the web service has been provided by a 3rd party.  I 
> used the wsdl2java maven2 plugin to generate my stub and I've worked my 
> way through a number of issues due to runtime dependencies. That said, 
> I'm now blocked by the following XmlStreamException. Due to some of the 
> other problems that I already worked through, I'm wondering if I am 
> missing another dependency. Of course, I could be way off base - 
> remember, I'm a beginner.
> 
> Anyway, here's a stack trace. Any help is very much appreciated,
> 
> Tom
> 
> 
> 2006-12-15 15:19:15,906 INFO  HttpMethodDirector executeWithRetry - I/O 
> exception (org.apache.axis2.AxisFault) caught when processing request: 
> null; nested exception is:
>javax.xml.stream.XMLStreamException
> 2006-12-15 15:19:15,921 INFO  HttpMethodDirector executeWithRetry - 
> Retrying request
> 2006-12-15 15:19:16,281 INFO  HttpMethodDirector executeWithRetry - I/O 
> exception (org.apache.axis2.AxisFault) caught when processing request: 
> null; nested exception is:
>javax.xml.stream.XMLStreamException
> 2006-12-15 15:19:16,281 INFO  HttpMethodDirector executeWithRetry - 
> Retrying request
> 2006-12-15 15:19:16,578 INFO  HttpMethodDirector executeWithRetry - I/O 
> exception (org.apache.axis2.AxisFault) caught when processing request: 
> null; nested exception is:
>javax.xml.stream.XMLStreamException
> 2006-12-15 15:19:16,593 INFO  HttpMethodDirector executeWithRetry - 
> Retrying request
> org.apache.axis2.AxisFault: null; nested exception is:
>javax.xml.stream.XMLStreamException; nested exception is:
>org.apache.axis2.AxisFault: null; nested exception is:
>javax.xml.stream.XMLStreamException; nested exception is:
>org.apache.axis2.AxisFault: null; nested exception is:
>javax.xml.stream.XMLStreamException; nested exception is:
>org.apache.axis2.AxisFault: null; nested exception is:
>javax.xml.stream.XMLStreamException
>at 
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
>at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:670)
>at 
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:365)
>at 
> org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:295)
>at 
> com.firstbest.underwriting.rating.netrate.axis.RatingServiceStub.CalculateQuote(RatingServiceStub.java:114)
>at 
> com.firstbest.underwriting.rating.netrate.axis.CalculateQuoteTest.test_axis(CalculateQuoteTest.java:25)
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>at java.lang.reflect.Method.invoke(Unknown Source)
>at junit.framework.TestCase.runTest(TestCase.java:154)
>at junit.framework.TestCase.runBare(TestCase.java:127)
>at junit.framework.TestResult$1.protect(TestResult.java:106)
>at junit.framework.TestResult.runProtected(TestResult.java:124)
>at junit.framework.TestResult.run(TestResult.java:109)
>at junit.framework.TestCase.run(TestCase.java:118)
>at junit.framework.TestSuite.runTest(TestSuite.java:208)
>at junit.framework.TestSuite.run(TestSuite.java:203)
>at 
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
>at 
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.apache.axis2.AxisFault: null; nested exception is:
>javax.xml.stream.XMLStreamException; nested exception is:
>org.apache.axis2.AxisFault: null; nested exception is:
>javax.xml.stream.XMLStreamException
>at 
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(Com

AxisFault: null; nexted exception is: XmlStreamException

2006-12-16 Thread Tom Muldoon
I am admittedly a web service beginner and I'm trying to write my first 
client program - the web service has been provided by a 3rd party.  I 
used the wsdl2java maven2 plugin to generate my stub and I've worked my 
way through a number of issues due to runtime dependencies. That said, 
I'm now blocked by the following XmlStreamException. Due to some of the 
other problems that I already worked through, I'm wondering if I am 
missing another dependency. Of course, I could be way off base - 
remember, I'm a beginner.


Anyway, here's a stack trace. Any help is very much appreciated,

Tom


2006-12-15 15:19:15,906 INFO  HttpMethodDirector executeWithRetry - I/O 
exception (org.apache.axis2.AxisFault) caught when processing request: 
null; nested exception is:

   javax.xml.stream.XMLStreamException
2006-12-15 15:19:15,921 INFO  HttpMethodDirector executeWithRetry - 
Retrying request
2006-12-15 15:19:16,281 INFO  HttpMethodDirector executeWithRetry - I/O 
exception (org.apache.axis2.AxisFault) caught when processing request: 
null; nested exception is:

   javax.xml.stream.XMLStreamException
2006-12-15 15:19:16,281 INFO  HttpMethodDirector executeWithRetry - 
Retrying request
2006-12-15 15:19:16,578 INFO  HttpMethodDirector executeWithRetry - I/O 
exception (org.apache.axis2.AxisFault) caught when processing request: 
null; nested exception is:

   javax.xml.stream.XMLStreamException
2006-12-15 15:19:16,593 INFO  HttpMethodDirector executeWithRetry - 
Retrying request

org.apache.axis2.AxisFault: null; nested exception is:
   javax.xml.stream.XMLStreamException; nested exception is:
   org.apache.axis2.AxisFault: null; nested exception is:
   javax.xml.stream.XMLStreamException; nested exception is:
   org.apache.axis2.AxisFault: null; nested exception is:
   javax.xml.stream.XMLStreamException; nested exception is:
   org.apache.axis2.AxisFault: null; nested exception is:
   javax.xml.stream.XMLStreamException
   at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)

   at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:670)
   at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:365)
   at 
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:295)
   at 
com.firstbest.underwriting.rating.netrate.axis.RatingServiceStub.CalculateQuote(RatingServiceStub.java:114)
   at 
com.firstbest.underwriting.rating.netrate.axis.CalculateQuoteTest.test_axis(CalculateQuoteTest.java:25)

   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at junit.framework.TestCase.runTest(TestCase.java:154)
   at junit.framework.TestCase.runBare(TestCase.java:127)
   at junit.framework.TestResult$1.protect(TestResult.java:106)
   at junit.framework.TestResult.runProtected(TestResult.java:124)
   at junit.framework.TestResult.run(TestResult.java:109)
   at junit.framework.TestCase.run(TestCase.java:118)
   at junit.framework.TestSuite.runTest(TestSuite.java:208)
   at junit.framework.TestSuite.run(TestSuite.java:203)
   at 
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
   at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
   at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
   at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
   at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
   at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

Caused by: org.apache.axis2.AxisFault: null; nested exception is:
   javax.xml.stream.XMLStreamException; nested exception is:
   org.apache.axis2.AxisFault: null; nested exception is:
   javax.xml.stream.XMLStreamException
   at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:340)
   at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:205)

   ... 23 more
Caused by: org.apache.axis2.AxisFault: null; nested exception is:
   javax.xml.stream.XMLStreamException
   at 
org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity.writeRequest(SOAPOverHTTPSender.java:246)
   at 
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:495)
   at 
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1973)
   at 
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993)
   at 
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
   at 
org.apache.commons.httpclient.HttpMethodDirect

Re: Questions about Axis2

2006-12-16 Thread robert lazarski

You can have the best of both worlds - java collections and xml
messages - with a bit of planning. What Anne mentioned was defining
the types you pass over soap as arrays, perhaps in the form of
Elements in a wsdl. If you go with the contract first approach, you
can define the arrays in your wsdl and then convert them on the client
/ server side to and from java collections easily , or to the
equivalent in other languages.

See Collection.toArray() and Arrays.asList() , along with some doc /
lit wsdl examples that define types as 'unbounded' . Sometimes an
Iterator or such fills in the gaps. Once you have a validated wsdl -
adb, jibx and xmlbeans are all popular choices to do the databinding.
For newbies I'd recommend adb.

HTH,
Robert

On 12/16/06, Vanfleet, David <[EMAIL PROTECTED]> wrote:

Thanks for your comments Anne, what you're saying makes since to me.
Some of the data I'll be transferring is raw XML so SOAP sounds like a
reasonable protocol for that. However, other data is in the form of Java
objects and it would be nice if it could be transferred and received as
a Java object. How do I specify data binding for those objects (such as
the one below)? is this done through the services.xml file?

I do think that SOAP is the best protocol for what I need. However, if I
was to look into using anther protocols do you know of any that you can
recommend? I could always open an HTTP connection to a Java servlet and
pass the data as a serialized Java object, I'm not sure what the
advantages or disadvantages are for doing this?

Thanks again,
David

-Original Message-
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 16, 2006 12:01 PM
To: axis-user@ws.apache.org
Subject: Re: Questions about Axis2

David,

The first thing you need to understand is that SOAP is not an
especially good protocol for transferring language-specific
collections. If your goal is to implement a Java-to-Java client/server
application, perhaps you should consider using a different protocol --
one that supports the Java type system. SOAP used the XML Schema type
system. For best results using SOAP, your service interface should use
types that map reasonably well to the XML Schema type system. (i.e.,
don't try to use Vector or List to generate your interface -- use
simple arrays instead)

The next thing you need to understand is that there is a layer of
indirection between the data/object model used by the server and
data/object model used by the client. Just because you use
language-specific collections on the server to generate your WSDL
interface, those collections are not apparent to the client. The
client only sees the schema representation of the objects. If you want
your client to convert that schema into the same Java object types
that you use on the server, then you need to specify the data binding
mapping rather than using a tool like wsdl2java to generate it.

Anne

On 12/16/06, Vanfleet, David <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Hi,
>
> I'm new to both Axis2 and web services and I'm having a hard time
grasping
> all the various types of databinding that can be created (POJO, AXIOM,
ADB,
> XMLBeans and JiBX). I have a couple of general questions about Axis2
and web
> services.
>
>
>
> I need to create a service that can pass complex objects between the
client
> and the server. Something like my modified weather example below.
>
>
>
> My questions about this are as follows:
>
>
>
> 1) In the testing I've done I noticed that it fails when there are any
> java.util.Vector or java.util.List objects within the object being
> transferred. I have seen several other posts about this but with no
> responses. Does anyone know why this is the case? How can I get around
this?
>
>
>
>   I read that using an ArrayList object will work which I did verify,
but I
> need to be able to user List and Vectors.
>
>
>
> 2) In the following modified Weather class where I have an ArrayList
called
> children with its set and get methods (this is from the
> sample.pojo.rpcclient package distributed with Axis2). When I send
this
> weather class on a round trip to the WeatherService service calling
the
> setWeather then the getWeather methods, then I take the returned
weather
> class and call it's getChildren method I end up with an ArrayList of
> OMEElement objects rather than Weather objects as I wanted. I
understand
> that everything is converted to XML during transport, but how do I get
these
> elements mapped back into the Weather class?
>
>
>
>   package sample.pojo.data;
>
>   import java.util.ArrayList;
>
>
>
>   public class Weather{
>
> float temperature;
>
> String forecast;
>
> boolean rain;
>
> float howMuchRain;
>
> ArrayList children=null;
>
>
>
> public Weather() {
>
>   children=new ArrayList();
>
> }
>
>
>
> public Weather(String forecast) {
>
>   children=new ArrayList();
>
>   this.forecast=forecast;
>
> }
>
> .
>
> .
>
> .
>
>
>
> public 

RE: Questions about Axis2

2006-12-16 Thread Vanfleet, David
Thanks for your comments Anne, what you're saying makes since to me.
Some of the data I'll be transferring is raw XML so SOAP sounds like a
reasonable protocol for that. However, other data is in the form of Java
objects and it would be nice if it could be transferred and received as
a Java object. How do I specify data binding for those objects (such as
the one below)? is this done through the services.xml file?

I do think that SOAP is the best protocol for what I need. However, if I
was to look into using anther protocols do you know of any that you can
recommend? I could always open an HTTP connection to a Java servlet and
pass the data as a serialized Java object, I'm not sure what the
advantages or disadvantages are for doing this?

Thanks again,
David

-Original Message-
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
Sent: Saturday, December 16, 2006 12:01 PM
To: axis-user@ws.apache.org
Subject: Re: Questions about Axis2

David,

The first thing you need to understand is that SOAP is not an
especially good protocol for transferring language-specific
collections. If your goal is to implement a Java-to-Java client/server
application, perhaps you should consider using a different protocol --
one that supports the Java type system. SOAP used the XML Schema type
system. For best results using SOAP, your service interface should use
types that map reasonably well to the XML Schema type system. (i.e.,
don't try to use Vector or List to generate your interface -- use
simple arrays instead)

The next thing you need to understand is that there is a layer of
indirection between the data/object model used by the server and
data/object model used by the client. Just because you use
language-specific collections on the server to generate your WSDL
interface, those collections are not apparent to the client. The
client only sees the schema representation of the objects. If you want
your client to convert that schema into the same Java object types
that you use on the server, then you need to specify the data binding
mapping rather than using a tool like wsdl2java to generate it.

Anne

On 12/16/06, Vanfleet, David <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Hi,
>
> I'm new to both Axis2 and web services and I'm having a hard time
grasping
> all the various types of databinding that can be created (POJO, AXIOM,
ADB,
> XMLBeans and JiBX). I have a couple of general questions about Axis2
and web
> services.
>
>
>
> I need to create a service that can pass complex objects between the
client
> and the server. Something like my modified weather example below.
>
>
>
> My questions about this are as follows:
>
>
>
> 1) In the testing I've done I noticed that it fails when there are any
> java.util.Vector or java.util.List objects within the object being
> transferred. I have seen several other posts about this but with no
> responses. Does anyone know why this is the case? How can I get around
this?
>
>
>
>   I read that using an ArrayList object will work which I did verify,
but I
> need to be able to user List and Vectors.
>
>
>
> 2) In the following modified Weather class where I have an ArrayList
called
> children with its set and get methods (this is from the
> sample.pojo.rpcclient package distributed with Axis2). When I send
this
> weather class on a round trip to the WeatherService service calling
the
> setWeather then the getWeather methods, then I take the returned
weather
> class and call it's getChildren method I end up with an ArrayList of
> OMEElement objects rather than Weather objects as I wanted. I
understand
> that everything is converted to XML during transport, but how do I get
these
> elements mapped back into the Weather class?
>
>
>
>   package sample.pojo.data;
>
>   import java.util.ArrayList;
>
>
>
>   public class Weather{
>
> float temperature;
>
> String forecast;
>
> boolean rain;
>
> float howMuchRain;
>
> ArrayList children=null;
>
>
>
> public Weather() {
>
>   children=new ArrayList();
>
> }
>
>
>
> public Weather(String forecast) {
>
>   children=new ArrayList();
>
>   this.forecast=forecast;
>
> }
>
> .
>
> .
>
> .
>
>
>
> public void setChildren(ArrayList c) {
>
>   children=c;
>
> }
>
>
>
> public void addChild(Weather w) {
>
>   children.add(w);
>
> }
>
>
>
> public ArrayList getChildren() {
>
>   return children;
>
> }
>
>   }
>
>
>
> 3) Based on needing to transfer this kind of object what type of
databinding
> would be best for me to use. Are there some that would work better
than
> others, In my testing I'm using this POJO sample? But I'm thinking
that I
> should use ADB or XMLBean. Any suggestions?
>
>
>
> 4) The client that will be accessing this service will be running
within
> both a standalone application and a Java applet. For the sake of the
Java
> applet I would like the client footprint to be as small as possible.
Based
> on this requirement are there some databindings th

Re: [Axis2] com.ctc.wstx.exc.WstxEOFException

2006-12-16 Thread Martin Gainty
Moxo/Hermann
for verifying proper response for method getVersion as a quick check  can you 
go to your version wsdl located at
http://localhost:8080/axis2/services/version?wsdl
your prolog should look something like
http://schemas.xmlsoap.org/wsdl/"; 
xmlns:axis2="http://ws.apache.org/axis2"; 
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; 
xmlns:ns0="http://axisversion.sample/xsd"; 
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"; 
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; 
xmlns:ns1="http://org.apache.axis2/xsd"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
targetNamespace="http://ws.apache.org/axis2";>

any whitespace characters (space,tab,any non-displayable characters) before 

-   
-   


 


Thanks,
M-
--- 
This e-mail message (including attachments, if any) is intended for the use of 
the individual or entity to which it is addressed and may contain information 
that is privileged, proprietary , confidential and exempt from disclosure. If 
you are not the intended recipient, you are notified that any dissemination, 
distribution or copying of this communication is strictly prohibited.
--- 
Le présent message électronique (y compris les pièces qui y sont annexées, le 
cas échéant) s'adresse au destinataire indiqué et peut contenir des 
renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le 
destinataire de ce document, nous vous signalons qu'il est strictement interdit 
de le diffuser, de le distribuer ou de le reproduire.
  - Original Message - 
  From: moxi moxi 
  To: axis-user@ws.apache.org 
  Sent: Saturday, December 16, 2006 12:06 PM
  Subject: Re: [Axis2] com.ctc.wstx.exc.WstxEOFException


  I have the same problem, 

  I wrote a dotNET client, !surprise my WebService is working!, the problem is  
when I call webservice with the  generated stub classes(Axis2, release 1.1).

  org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxEOFException: Unexpected 
EOF in prolog
   at [row,col {unknown-source}]: [1,0]
  at 
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:308)
  at ...




  2006/12/15, Harald Herrmann <[EMAIL PROTECTED] >:
Hi everyone,

Here's some additional info to my problem:

I made a simple but interesting experiment: I wrote a HTML form to post 
something to the webservice
and debugged the AxisServlet.doPost() method as before.
This time the InputStream contained the data I posted. 
The webservice failed of course, as the posted data was no valid soap 
request.

But something seems to cut off the request body if it's containing XML.

Regards,
H. Herrmann



  Hi everyone,

  I get following exception as response when accessing the Version 
webservice from the Axis 2-1.1
  distribution:

  org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxEOFException: 
Unexpected EOF in prolog
   at [row,col {unknown-source}]: [1,0]
  at 
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:308)
  at sample.axisversion.VersionStub.getVersion(VersionStub.java:155)
  at Test.start(Test.java:11)
  at Test.main(Test.java:18)

  I generated the stub classes with wsdl2java and wrote following test 
class:

  import sample.axisversion.VersionStub;
  import sample.axisversion.VersionStub.GetVersionResponse;

  public class Test {

  public void start()
  throws Exception
  {
  VersionStub versionStub = new 
VersionStub("http://localhost:8080/axis2/services/Version";);
  GetVersionResponse response = versionStub.getVersion();
  System.out.println(response.get_return());
  }

  public static void main(String[] args)
  throws Exception{
  Test test = new Test();
  test.start();
  }

  }
  

  This is my system:
  Windows XP (SP2)
  Java 1.5.0 Update 10
  Apache Tomcat 6.0.2
  Axis 2-1.1 webapp (from war file)

  Tomcat starts up without error messages, and the Axis2 webapp is 
available. The Version service and
  its operation getVersion is listed and marked as active.

  The validation page shows following message:
   There was a problem in Axis2 version service , may be the service not 
available or some thing has gone
   wrong. But this does not mean system is not working ! Try to upload some 
other service and check to see
   whether it is working.

  The rest of this page seems to be ok (I also get the message "The core 
axis2 libraries are present.").



  I did some debugging and found 

Re: Questions about Axis2

2006-12-16 Thread Anne Thomas Manes

David,

The first thing you need to understand is that SOAP is not an
especially good protocol for transferring language-specific
collections. If your goal is to implement a Java-to-Java client/server
application, perhaps you should consider using a different protocol --
one that supports the Java type system. SOAP used the XML Schema type
system. For best results using SOAP, your service interface should use
types that map reasonably well to the XML Schema type system. (i.e.,
don't try to use Vector or List to generate your interface -- use
simple arrays instead)

The next thing you need to understand is that there is a layer of
indirection between the data/object model used by the server and
data/object model used by the client. Just because you use
language-specific collections on the server to generate your WSDL
interface, those collections are not apparent to the client. The
client only sees the schema representation of the objects. If you want
your client to convert that schema into the same Java object types
that you use on the server, then you need to specify the data binding
mapping rather than using a tool like wsdl2java to generate it.

Anne

On 12/16/06, Vanfleet, David <[EMAIL PROTECTED]> wrote:





Hi,

I'm new to both Axis2 and web services and I'm having a hard time grasping
all the various types of databinding that can be created (POJO, AXIOM, ADB,
XMLBeans and JiBX). I have a couple of general questions about Axis2 and web
services.



I need to create a service that can pass complex objects between the client
and the server. Something like my modified weather example below.



My questions about this are as follows:



1) In the testing I've done I noticed that it fails when there are any
java.util.Vector or java.util.List objects within the object being
transferred. I have seen several other posts about this but with no
responses. Does anyone know why this is the case? How can I get around this?



  I read that using an ArrayList object will work which I did verify, but I
need to be able to user List and Vectors.



2) In the following modified Weather class where I have an ArrayList called
children with its set and get methods (this is from the
sample.pojo.rpcclient package distributed with Axis2). When I send this
weather class on a round trip to the WeatherService service calling the
setWeather then the getWeather methods, then I take the returned weather
class and call it's getChildren method I end up with an ArrayList of
OMEElement objects rather than Weather objects as I wanted. I understand
that everything is converted to XML during transport, but how do I get these
elements mapped back into the Weather class?



  package sample.pojo.data;

  import java.util.ArrayList;



  public class Weather{

float temperature;

String forecast;

boolean rain;

float howMuchRain;

ArrayList children=null;



public Weather() {

  children=new ArrayList();

}



public Weather(String forecast) {

  children=new ArrayList();

  this.forecast=forecast;

}

.

.

.



public void setChildren(ArrayList c) {

  children=c;

}



public void addChild(Weather w) {

  children.add(w);

}



public ArrayList getChildren() {

  return children;

}

  }



3) Based on needing to transfer this kind of object what type of databinding
would be best for me to use. Are there some that would work better than
others, In my testing I'm using this POJO sample? But I'm thinking that I
should use ADB or XMLBean. Any suggestions?



4) The client that will be accessing this service will be running within
both a standalone application and a Java applet. For the sake of the Java
applet I would like the client footprint to be as small as possible. Based
on this requirement are there some databindings that have a smaller
footprint than others?



I realized that I'm not grasping all the concepts that I need to understand
here, I'm not even sure I'm asking the right questions? I have been looking
at the documentation and samples that come with Axis2. Are there any other
good resources that I can look at that might help me out here, such as some
good tutorials or FAQ's. Some more good code samples would be helpful tool.
Any comments offered would be greatly appreciated.



Thanks,

David




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



Questions about Axis2

2006-12-16 Thread Vanfleet, David
Hi,

I'm new to both Axis2 and web services and I'm having a hard time
grasping all the various types of databinding that can be created (POJO,
AXIOM, ADB, XMLBeans and JiBX). I have a couple of general questions
about Axis2 and web services. 

 

I need to create a service that can pass complex objects between the
client and the server. Something like my modified weather example below.

 

My questions about this are as follows:

 

1) In the testing I've done I noticed that it fails when there are any
java.util.Vector or java.util.List objects within the object being
transferred. I have seen several other posts about this but with no
responses. Does anyone know why this is the case? How can I get around
this?

  

  I read that using an ArrayList object will work which I did verify,
but I need to be able to user List and Vectors.

  

2) In the following modified Weather class where I have an ArrayList
called children with its set and get methods (this is from the
sample.pojo.rpcclient package distributed with Axis2). When I send this
weather class on a round trip to the WeatherService service calling the
setWeather then the getWeather methods, then I take the returned weather
class and call it's getChildren method I end up with an ArrayList of
OMEElement objects rather than Weather objects as I wanted. I understand
that everything is converted to XML during transport, but how do I get
these elements mapped back into the Weather class? 

 

  package sample.pojo.data;

  import java.util.ArrayList;

 

  public class Weather{

float temperature;

String forecast;

boolean rain;

float howMuchRain;

ArrayList children=null;



public Weather() {

  children=new ArrayList();

}



public Weather(String forecast) {

  children=new ArrayList();

  this.forecast=forecast;

}

.

.

.

  

public void setChildren(ArrayList c) {

  children=c;

}



public void addChild(Weather w) {

  children.add(w);

}



public ArrayList getChildren() {

  return children;

}

  }

 

3) Based on needing to transfer this kind of object what type of
databinding would be best for me to use. Are there some that would work
better than others, In my testing I'm using this POJO sample? But I'm
thinking that I should use ADB or XMLBean. Any suggestions?

  

4) The client that will be accessing this service will be running within
both a standalone application and a Java applet. For the sake of the
Java applet I would like the client footprint to be as small as
possible. Based on this requirement are there some databindings that
have a smaller footprint than others?

  

I realized that I'm not grasping all the concepts that I need to
understand here, I'm not even sure I'm asking the right questions? I
have been looking at the documentation and samples that come with Axis2.
Are there any other good resources that I can look at that might help me
out here, such as some good tutorials or FAQ's. Some more good code
samples would be helpful tool. Any comments offered would be greatly
appreciated.

  

Thanks,

David

 



Re: [Axis2] com.ctc.wstx.exc.WstxEOFException

2006-12-16 Thread Thilina Gunarathne

Please log a Jira.. If possible attach your client as well..

~Thilina

On 12/16/06, moxi moxi <[EMAIL PROTECTED]> wrote:

I have the same problem,

I wrote a dotNET client, !surprise my WebService is working!, the problem is
 when I call webservice with the  generated stub classes(Axis2, release
1.1).

 org.apache.axis2.AxisFault:
com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
  at [row,col {unknown-source}]: [1,0]
 at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:308)
 at ...



2006/12/15, Harald Herrmann <[EMAIL PROTECTED] >:
>
> Hi everyone,
>
> Here's some additional info to my problem:
>
> I made a simple but interesting experiment: I wrote a HTML form to post
something to the webservice
> and debugged the AxisServlet.doPost() method as before.
> This time the InputStream contained the data I posted.
> The webservice failed of course, as the posted data was no valid soap
request.
>
> But something seems to cut off the request body if it's containing XML.
>
> Regards,
> H. Herrmann
>
>
>
> Hi everyone,
>
> I get following exception as response when accessing the Version
webservice from the Axis 2-1.1
> distribution:
>
> org.apache.axis2.AxisFault:
com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
>  at [row,col {unknown-source}]: [1,0]
> at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:308)
> at
sample.axisversion.VersionStub.getVersion(VersionStub.java:155)
> at Test.start(Test.java:11)
> at Test.main(Test.java:18)
>
> I generated the stub classes with wsdl2java and wrote following test
class:
>
> import sample.axisversion.VersionStub;
> import
sample.axisversion.VersionStub.GetVersionResponse;
>
> public class Test {
>
> public void start()
> throws Exception
> {
> VersionStub versionStub = new
VersionStub("http://localhost:8080/axis2/services/Version";);
> GetVersionResponse response = versionStub.getVersion();
> System.out.println(response.get_return());
> }
>
> public static void main(String[] args)
> throws Exception{
> Test test = new Test();
> test.start();
> }
>
> }
>
>
> This is my system:
> Windows XP (SP2)
> Java 1.5.0 Update 10
> Apache Tomcat 6.0.2
> Axis 2-1.1 webapp (from war file)
>
> Tomcat starts up without error messages, and the Axis2 webapp is
available. The Version service and
> its operation getVersion is listed and marked as active.
>
> The validation page shows following message:
>  There was a problem in Axis2 version service , may be the service not
available or some thing has gone
>  wrong. But this does not mean system is not working ! Try to upload some
other service and check to see
>  whether it is working.
>
> The rest of this page seems to be ok (I also get the message "The core
axis2 libraries are present.").
>
>
>
> I did some debugging and found out that in the AxisServlet.doPost()-method
the HttpServletRequest's
> InputStream is empty.
>
> I checked the communication with TCPMon - but the request seemed to be ok.
> Here are the messages:
>
> Request:
> POST /axis2/services/Version HTTP/1.1
> User-Agent: Axis2
> Host: 127.0.0.1:
> Transfer-Encoding: chunked
> Content-Type: application/soap+xml;
charset=UTF-8;action="urn:getVersion";
>
> c0
> http://www.w3.org/2003/05/soap-envelope";>
> 0
>
> Response:
> HTTP/1.1 500 Internal Server Error
> Server: Apache-Coyote/1.1
> Set-Cookie:
JSESSIONID=63E04CA3673054DE46016A969755DF4B; Path=/axis2
> Content-Type: application/soap+xml;charset=UTF-8
> Transfer-Encoding: chunked
> Date: Fri, 15 Dec 2006 16:43:19 GMT
> Connection: close
>
> 320
> http://www.w3.org/2005/08/addressing";
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
http://www.w3.org/2005/08/addressing/noneurn:uuid:759F1D5C854B55ED1511662009998903
http://www.w3.org/2005/08/addressing/soap/faultsoapenv:Sendercom.ctc.wstx.exc.WstxEOFException:
Unexpected EOF in prolog
>  at [row,col {unknown-source}]:
[1,0]
> 0
>
>
>
> Does anyone have a clue?
>
> Thanks and best regards,
> H. Herrmann
>
>
>
>
> --
>
>
> ► TourismusSuite - Ihre Destination im Griff
>  ++ Internet Booking Engine ++ Touristisches Content Management ++
Destinations Management
>
>  Erfahren Sie mehr unter www.tourismussuite.com --
> Harald Herrmann
> Backend / Entwicklung
>
> inexweb ralf emanuel GmbH
> Hellersbergstraße 2a
> D-41460 Neuss
> Fon: +49 (0) 21 31 / 3 66 60-84
> Fax: +49 (0) 21 31 / 3 66 60-88
> www.inexweb.de





--
Thilina Gunarathne
WSO2, Inc.; http://www.wso2.com/
Home page: http://webservices.apache.org/~thilina/
Blog: http://thilinag.blogspot.com/


Re: [Axis2] com.ctc.wstx.exc.WstxEOFException

2006-12-16 Thread moxi moxi

I have the same problem,

I wrote a dotNET client, !surprise my WebService is working!, the problem
is  when I call webservice with the  generated stub classes(Axis2, release
1.1).

   org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxEOFException:
Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
   at org.apache.axis2.description.OutInAxisOperationClient.execute(
OutInAxisOperation.java:308)
   at ...



2006/12/15, Harald Herrmann <[EMAIL PROTECTED]>:


 Hi everyone,

Here's some additional info to my problem:

I made a simple but interesting experiment: I wrote a HTML form to post
something to the webservice
and debugged the AxisServlet.doPost() method as before.
This time the InputStream contained the data I posted.
The webservice failed of course, as the posted data was no valid soap
request.

But something seems to cut off the request body if it's containing XML.

Regards,
H. Herrmann


 Hi everyone,

I get following exception as response when accessing the Version
webservice from the Axis 2-1.1
distribution:

org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxEOFException:
Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]
at org.apache.axis2.description.OutInAxisOperationClient.execute(
OutInAxisOperation.java:308)
at sample.axisversion.VersionStub.getVersion(VersionStub.java:155)
at Test.start(Test.java:11)
at Test.main(Test.java:18)

I generated the stub classes with wsdl2java and wrote following test
class:

import sample.axisversion.VersionStub;
import sample.axisversion.VersionStub.GetVersionResponse;

public class Test {

public void start()
throws Exception
{
VersionStub versionStub = new VersionStub(
"http://localhost:8080/axis2/services/Version";
);
GetVersionResponse response = versionStub.getVersion();
System.out.println(response.get_return());
}

public static void main(String[] args)
throws Exception{
Test test = new Test();
test.start();
}

}


This is my system:
Windows XP (SP2)
Java 1.5.0 Update 10
Apache Tomcat 6.0.2
Axis 2-1.1 webapp (from war file)

Tomcat starts up without error messages, and the Axis2 webapp is
available. The Version service and
its operation getVersion is listed and marked as active.

The validation page shows following message:
 There was a problem in Axis2 version service , may be the service not
available or some thing has gone
 wrong. But this does not mean system is not working ! Try to upload some
other service and check to see
 whether it is working.

The rest of this page seems to be ok (I also get the message "The core
axis2 libraries are present.").



I did some debugging and found out that in the AxisServlet.doPost()-method
the HttpServletRequest's
InputStream is empty.

I checked the communication with TCPMon - but the request seemed to be ok.
Here are the messages:

Request:
POST /axis2/services/Version HTTP/1.1
User-Agent: Axis2
Host: 127.0.0.1:
Transfer-Encoding: chunked
Content-Type: application/soap+xml;
charset=UTF-8;action="urn:getVersion";

c0
http://www.w3.org/2003/05/soap-envelope";>
0

Response:
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=63E04CA3673054DE46016A969755DF4B; Path=/axis2
Content-Type: application/soap+xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Fri, 15 Dec 2006 16:43:19 GMT
Connection: close

320
http://www.w3.org/2005/08/addressing";xmlns:soapenv=
"http://www.w3.org/2003/05/soap-envelope";
>
http://www.w3.org/2005/08/addressing/none
urn:uuid:759F1D5C854B55ED1511662009998903
http://www.w3.org/2005/08/addressing/soap/faultsoapenv:Sendercom.ctc.wstx.exc.WstxEOFException: Unexpected EOF in
prolog
 at [row,col {unknown-source}]:
[1,0]
0



Does anyone have a clue?

Thanks and best regards,
H. Herrmann



--

► TourismusSuite - Ihre Destination im Griff
 ++ Internet Booking Engine ++ Touristisches Content Management ++
Destinations Management

 Erfahren Sie mehr unter www.tourismussuite.com
--
 *Harald Herrmann*
Backend / Entwicklung

inexweb ralf emanuel GmbH
Hellersbergstraße 2a
D-41460 Neuss
Fon: +49 (0) 21 31 / 3 66 60-84
Fax: +49 (0) 21 31 / 3 66 60-88
www.inexweb.de



Re: WSDL type mapping for List

2006-12-16 Thread Anne Thomas Manes

Use an array rather than a List.


On 12/15/06, c b <[EMAIL PROTECTED]> wrote:


Hi Axis-Users,

I have a simple web service operation which returns a string. This was
working fine for me.
Recently I needed to change the return type from String to a
List(ArrayList).
I duly generated the new wsdl and a new client and tried to invoke the newly
deployed
web service.
But it gives me an AXIS fault.
I checked the newly generated WSDL and the response element now shows the
type as
"xsd:anytype".
Does this have anything to do with the axis fault that I am getting?

Thanks,
Chinmay.
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


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



Re: [axis2 1.1] Using ServiceClient not working

2006-12-16 Thread Anne Thomas Manes

What does the request message from the stub look like?
Can you also provide the WSDL?

On 12/16/06, Qiyun Yang <[EMAIL PROTECTED]> wrote:


Hi,

I developed two versions of clients, one using stub which works and another
one using serviceClient which not not work (in terms of result).

I checked the soap message, using ServiceClient, the client sent the soap
request as:


http://schemas.xmlsoap.org/soap/envelope/";>
  
  
http://example.org/AreaService/";>
  12.2
  25.5

  


the skeleton received the following:

From Client:
http://example.org/AreaService/";
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
  12.2
  25.5


The codes retrieve the data:

float width = param0.getParameters().getWidth();
float height = param0.getParameters().getHeight();
System.out.println("Data from client: " + width + " " + height );

result:
Data from client: 0.0 0.0

why not 12.2 and 25.5 as received from incoming xml doc?

I am not sure where went wrong, please advise which is appreciated.

[it works as expected if using stub].
Thanks.
Q

_
Find just what you are after with the more precise, more powerful new
Windows Live Search. http://search.msn.com.sg/ Try it now.


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



Problems with WSDL2Java

2006-12-16 Thread Peter

hello,
I am getting problems with WSDL2Java tools in the Axis 1,2,1 under
Tomcat5.5enviroment

the answers are follows:

D:\wsdl2>java org.apache.axis.wsdl.WSDL2Java province.wsdl
java.lang.NullPointerException
   at org.apache.axis.wsdl.toJava.JavaBeanWriter.preprocess
(JavaBeanWriter.
java:264)
   at org.apache.axis.wsdl.toJava.JavaBeanWriter.getImplementsText
(JavaBean
Writer.java:500)
   at org.apache.axis.wsdl.toJava.JavaBeanWriter.writeFileHeader
(JavaBeanWr
iter.java:179)
   at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java
:129)
   at org.apache.axis.wsdl.toJava.JavaBeanWriter.generate(
JavaBeanWriter.ja
va:1270)
   at org.apache.axis.wsdl.toJava.JavaTypeWriter.generate(
JavaTypeWriter.ja
va:113)
   at org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate
(Jav
aGeneratorFactory.java:421)
   at org.apache.axis.wsdl.gen.Parser.generateTypes(Parser.java:547)
   at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:432)
   at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:45)
   at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:362)
   at java.lang.Thread.run(Unknown Source)



province.wsdl is here



http://eoms.chinaunicom.com.cn/worktaskschedule/AssignScheduleService";
xmlns:apachesoap="http://xml.apache.org/xml-soap"; xmlns:impl="
http://eoms.chinaunicom.com.cn/worktaskschedule/AssignScheduleService";
xmlns:intf="
http://eoms.chinaunicom.com.cn/worktaskschedule/AssignScheduleService";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:wsdlsoap="
http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:xsd="
http://www.w3.org/2001/XMLSchema";>


 http://eoms.chinaunicom.com.cn/worktaskschedule/AssignScheduleService";
xmlns="http://www.w3.org/2001/XMLSchema";>
  
   



   
  
  
   

   
  
  
   





   
  
  
  
   

   
  
  
  
  
   

   
  
  
   

   
  
  
   




   
  
  
  
   

   
  
  
  
   







   
  
  
 


  

 

  

  

 

  

  

  

  

 

  

  

 

  

  

 

  

  

 

  

  

 







 

 







 

 





 

  

  

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

 

http://eoms.chinaunicom.com.cn/worktaskschedule/AssignScheduleService/AssignForm"/






   





   





   



 

 

http://eoms.chinaunicom.com.cn/worktaskschedule/AssignScheduleService/AckModify"/






   





   





   



 

 

http://eoms.chinaunicom.com.cn/worktaskschedule/AssignScheduleService/RequireReport"/






   





   



 

  

  

 

http://10.203.19.19/services/AssignSchedulePort"/>

 

  




Re: [Axis2] How to deploy Axis2 in https

2006-12-16 Thread Ruchith Fernando

On 12/16/06, Subash Devkota <[EMAIL PROTECTED]> wrote:

Ruchith,

My https configuration does not require client to authenticate itself.

I have already included security in Axis2 with rampart. It works fine
when axis server is hosted in http.
But, when i hosted the same axis in https domain, the client can not
connect to axis server.
It throws nullPointerException.


Can you please post the complete stack trace?



I used the same key that is used for https as client key in axis client
(for testing purpose) and it worked properly without errors. But when I
use self signed certificate in axis client, it does not work.

The only configuration I changed for https was in axis2.xml file of web
service client.


 HTTP/1.1
 chunked


Should I do any more configuration changes?

The next question is, if i intend to use axis in https, should i need to
configure rampart?


Nope. HTTPS config and ramaprt config is independent.

Thanks,
Ruchith


Thanks
Subash

Ruchith Fernando wrote:
> How have you configured HTTPS at the service? (the servlet container
> axis2 is deployed). Does it require the client to authenticate itself
> with its certificate?
>
> if so you MUST add the client cert into the container's trust store
> and then configure the client's following JSSE properties properly.
> javax.net.ssl.keyStore
> javax.net.ssl.keyStoreType
> javax.net.ssl.keyStoreType
>
> However even if the HTTPS config of the container does not require
> client auth you MUST have the CA cert of the CA that signed the
> container's cert in your jre/lib/security/cacerts store or if it uses
> a self signed cert then you can override trust store config with the
> JSSE properties. Please see here for more information [1]
>
> Thanks,
> Ruchith
>
> [1] http://java.sun.com/products/jsse/install.html
>
> On 12/16/06, Subash Devkota <[EMAIL PROTECTED]> wrote:
>> Hi all,
>>
>> I have problem deploying axis2 1.0 in https.
>>
>> I need to deploy my axis2 1.0 server over https application.
>>
>> I used following configuration in axis2.xml in client side.
>>
>> > class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
>>  > locked="false">HTTP/1.1
>>  chunked
>> 
>>
>>
>> The web service works well when i use it in http.  But when axis2 server
>> is deployed in https, the client can not connect to server (axis2 1.0
>> where web services is deployed).
>>
>> I am using self signed certificate in client side. I added the
>> certificate of the client in https server's trusted certificate key
>> store. But could not connect to server.
>>
>> It throws nullPointerException while trying to connect web service.
>>
>> I tried using CA certified key in the client side. In this case, it
>> works.
>>
>> I need to connect to axis2 1.0 server deployed over https with client
>> that has self signed certificate.
>>
>> Does any one knows how to configure the client for this?
>>
>> Thanks in advance.
>> Subash
>>
>>
>> PRIVACY NOTICE
>>
>> This email and any attachments may be confidential and/or privileged.
>> Use of the information contained in this email by anyone other than
>> the intended recipient is strictly prohibited. If you have received
>> this email in error, please notify the sender by replying to this
>> message and delete this email.
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>




--
www.ruchith.org
www.wso2.org

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



Re: [Axis2] How to deploy Axis2 in https

2006-12-16 Thread Subash Devkota

Ruchith,

My https configuration does not require client to authenticate itself.

I have already included security in Axis2 with rampart. It works fine 
when axis server is hosted in http.
But, when i hosted the same axis in https domain, the client can not  
connect to axis server.

It throws nullPointerException.

I used the same key that is used for https as client key in axis client 
(for testing purpose) and it worked properly without errors. But when I 
use self signed certificate in axis client, it does not work.


The only configuration I changed for https was in axis2.xml file of web 
service client.
  
   class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
locked="false">HTTP/1.1

chunked
   

Should I do any more configuration changes?

The next question is, if i intend to use axis in https, should i need to 
configure rampart?


Thanks
Subash

Ruchith Fernando wrote:

How have you configured HTTPS at the service? (the servlet container
axis2 is deployed). Does it require the client to authenticate itself
with its certificate?

if so you MUST add the client cert into the container's trust store
and then configure the client's following JSSE properties properly.
javax.net.ssl.keyStore
javax.net.ssl.keyStoreType
javax.net.ssl.keyStoreType

However even if the HTTPS config of the container does not require
client auth you MUST have the CA cert of the CA that signed the
container's cert in your jre/lib/security/cacerts store or if it uses
a self signed cert then you can override trust store config with the
JSSE properties. Please see here for more information [1]

Thanks,
Ruchith

[1] http://java.sun.com/products/jsse/install.html

On 12/16/06, Subash Devkota <[EMAIL PROTECTED]> wrote:

Hi all,

I have problem deploying axis2 1.0 in https.

I need to deploy my axis2 1.0 server over https application.

I used following configuration in axis2.xml in client side.

class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
 locked="false">HTTP/1.1

 chunked



The web service works well when i use it in http.  But when axis2 server
is deployed in https, the client can not connect to server (axis2 1.0
where web services is deployed).

I am using self signed certificate in client side. I added the
certificate of the client in https server's trusted certificate key
store. But could not connect to server.

It throws nullPointerException while trying to connect web service.

I tried using CA certified key in the client side. In this case, it 
works.


I need to connect to axis2 1.0 server deployed over https with client
that has self signed certificate.

Does any one knows how to configure the client for this?

Thanks in advance.
Subash


PRIVACY NOTICE

This email and any attachments may be confidential and/or privileged. 
Use of the information contained in this email by anyone other than 
the intended recipient is strictly prohibited. If you have received 
this email in error, please notify the sender by replying to this 
message and delete this email.


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



[axis2 1.1] Using ServiceClient not working

2006-12-16 Thread Qiyun Yang


Hi,

I developed two versions of clients, one using stub which works and another 
one using serviceClient which not not work (in terms of result).


I checked the soap message, using ServiceClient, the client sent the soap 
request as:



http://schemas.xmlsoap.org/soap/envelope/";>
 
 
   http://example.org/AreaService/";>
 12.2
 25.5
   
 


the skeleton received the following:


From Client:
http://example.org/AreaService/"; 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>

 12.2
 25.5


The codes retrieve the data:

float width = param0.getParameters().getWidth();
float height = param0.getParameters().getHeight();
System.out.println("Data from client: " + width + " " + height );

result:
Data from client: 0.0 0.0

why not 12.2 and 25.5 as received from incoming xml doc?

I am not sure where went wrong, please advise which is appreciated.

[it works as expected if using stub].
Thanks.
Q

_
Find just what you are after with the more precise, more powerful new 
Windows Live Search. http://search.msn.com.sg/ Try it now.



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