Re: [Axis2] sample/instructions how to build JAX-RPC web service in/with Axis2?

2005-07-01 Thread Merten Schumann
Thank you, Anne! So I'll have a look at next milestones and check for
the JAX-RPC support :-)
   Merten

 -Original Message-
 From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, June 30, 2005 4:59 PM
 To: axis-user@ws.apache.org
 Subject: Re: [Axis2] sample/instructions how to build JAX-RPC 
 web service in/with Axis2?
 
 Axis 2 is the next generation. Eventually it will replace Axis 1 (just
 as Axis 1 has replaced Apache SOAP), but for some time the two will
 coexist.
 
 The current Axis 2 milestone doesn't support the JAX-RPC API yet. The
 final will (or more likely JAX-WS).
 
 Anne
 
 On 6/30/05, Merten Schumann [EMAIL PROTECTED] wrote:
  Hello,
  
  had a first look at Axis2. Well, seems it's really 
 different from Axis1.
  My first question here would be, what will happen in the future? Is
  Axis2 meant to replace Axis1 or will they co-exist???
  
  At the moment, dealing with Axis1, I used the approach as 
 described in
  section Advanced Installation: adding Axis to your own Webapp at
  http://ws.apache.org/axis/java/install.html to create a war 
 file with a
  JAX-RPC web services. Is this approach still supported in Axis2??? I
  could not find how to build JAX-RPC web services in/with 
 Axis2, anybody
  could guide me here?
  
  Thanx!
 Merten


Re: Multi dimensional String array

2005-07-01 Thread Jean



It seems as if the message that is sent to the Soap 
server is incorrect

I call the Soap service as follows
 call = (Call) 
service.createCall();call.setTargetEndpointAddress(new 
java.net.URL(url));String[][] in1 = new 
String[][]{{"abc","cba"}, {"def","fed"}};
 
call.setOperation("move");
 Object resp = call.invoke(new 
Object[]{in1});

Which generates the following Soap message 
parameter
arg0 arg0 
xsi:type="xsd:string"abc/arg0  arg0 
xsi:type="xsd:string"cba/arg0  arg0 
xsi:type="xsd:string"def/arg0  arg0 
xsi:type="xsd:string"fed/arg0/arg0

But should be generating this (this happens with 
the old version)
item 
soapenc:arrayType="xsd:string[2]" itemabc/item 
 itemcba/item/itemitem 
soapenc:arrayType="xsd:string[2]" itemdef/item 
 itemfed/item /item

Am I doing something wrong, or is there perhaps a 
problem with axis?


  - Original Message - 
  From: 
  Jean 
  To: axis-user@ws.apache.org 
  Sent: Thursday, June 30, 2005 3:39 
  PM
  Subject: Multi dimensional String 
  array
  
  Hi,
  
  I'm trying to call a method with a multi 
  dimensional array as follows
  
  public java.lang.String move(java.lang.String[][] 
  in0) throws java.rmi.RemoteException;
  
  The problem is that when I do the call my array 
  is not built correctly, the array 
  new String[][]{{"abc","cba"}, 
  {"def","fed"}};
  Should read as follows
  0  [0] abc 
   [1] cba1  [0] def  
  [1] fed
  
  But I get the following
  0  [0] 
  abc1  [0] cba2  
  [0] def3  [0] fed
  
  I'm currently using axis 1.2.1 final which gives 
  me this result, one of the axis 1.2 RC versions used to do it correctly but 
  now I have a problem since changing the version. I don't really want to 
  go back to the RC, how can I get this to work?
  
  Regards,
  Jean
  


Help on Arrays

2005-07-01 Thread Chris Averia

Hello,

I have attached the WSDL file that I compiled using wsdl2Java. This file contains a Soap call definition that expects arrays as return values.

However, I always encounter that the size of the return arraysare always 1. Can somebody point me to the right direction? BTW, Im using Axis1.2 final.

Here is the actualSoap Response:

?xml version="1.0" encoding="UTF-8"?soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/".soapenv:Body..LogGetEventsResponse xmlns="http://foo.com/foo1.0/"...accountId83/accountId...eventDt2005-05-27T03:08:26/eventDt...eventCode109/eventCode...eventSrc4/eventSrc...status1/status...adminUserId99/adminUserId...accountId83/accountId...eventDt2005-05-27T03:07:59/eventDt...eventCode105/eventCode...eventSrc4/eventSrc...status1/status...adminUserId99/adminUserId...accountId83/accountId...eventDt2005-05-27T03:07:58/eventDt...eventCode102/eventCode...eventSrc4/eventSrc...status1/status...adminUserId99/adminUserId...accountId83/accountId...eventDt2005-05-27T03:07:58/event
 Dt...eventCode104/eventCode...eventSrc4/eventSrc...status1/status...adminUserId99/adminUserId...accountId83/accountId...eventDt2005-05-27T03:07:58/eventDt...eventCode103/eventCode...eventSrc4/eventSrc...status1/status...adminUserId99/adminUserId...result1/result../LogGetEventsResponse./soapenv:Body/soapenv:Envelope
 
		Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard.?xml version=1.0 encoding=utf-8?
definitions 
xmlns:s=http://www.w3.org/2001/XMLSchema; 
xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; 
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; 
xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; 
xmlns:s0=http://foo.com/foo1.0/; targetNamespace=http://foo.com/foo1.0/; 
xmlns=http://schemas.xmlsoap.org/wsdl/;




types
s:schema	attributeFormDefault=qualified elementFormDefault=qualified 
		targetNamespace=http://foo.com/foo1.0/;



s:element name=LogGetEvents
s:complexType
s:sequence
	s:element minOccurs=1 maxOccurs=1 name=logCode type =s:unsignedInt/
	s:element minOccurs=0 maxOccurs=1 name=accountId type =s:unsignedInt/
/s:sequence
/s:complexType
/s:element


s:element name=LogGetEventsResponse
s:complexType
s:sequence
	s:element minOccurs=1 maxOccurs=200 name=accountId type =s:unsignedInt/
	s:element minOccurs=1 maxOccurs=200 name=eventDt type=s:dateTime/
	s:element minOccurs=1 maxOccurs=200 name=eventCode type=s:unsignedInt/
	s:element minOccurs=1 maxOccurs=200 name=eventSrc type=s:unsignedInt/
	s:element minOccurs=1 maxOccurs=200 name=status type=s:unsignedInt/
	s:element minOccurs=1 maxOccurs=200 name=errorSrcPeriod type=s:unsignedInt/
	s:element minOccurs=1 maxOccurs=200 name=errorSeverity type=s:unsignedInt/
	s:element minOccurs=1 maxOccurs=200 name=adminUserId type=s:unsignedInt/
	s:element minOccurs=1 maxOccurs=200 name=serverId type=s:unsignedInt/
	s:element minOccurs=1 maxOccurs=200 name=sessionId type=s:unsignedInt/
	s:element minOccurs=1 maxOccurs=200 name=InEndDt type=s:dateTime/
	s:element minOccurs=1 maxOccurs=200 name=OutStartDt type=s:dateTime/
	s:element minOccurs=1 maxOccurs=200 name=OutEndDt type=s:dateTime/
	s:element minOccurs=1 maxOccurs=200 name=MsgIn type=s:unsignedInt/
	s:element minOccurs=1 maxOccurs=200 name=MsgOut type=s:unsignedInt/
	s:element minOccurs=1 maxOccurs=200 name=BytesIn type=s:unsignedInt/	
	s:element minOccurs=1 maxOccurs=200 name=BytesOut type=s:unsignedInt/
	s:element minOccurs=1 maxOccurs=200 name=CmdsIn type=s:unsignedInt/
	s:element minOccurs=1 maxOccurs=200 name=CmdsOut type=s:unsignedInt/
	s:element minOccurs=1 maxOccurs=200 name=AdnCount type=s:unsignedInt/
	s:element minOccurs=1 maxOccurs=200 name=transactionId type=s:string/
	s:element minOccurs=1 maxOccurs=200 name=extSessionInfo type=s:string/
	s:element minOccurs=1 maxOccurs=1 name=result type=s:int/
	s:element minOccurs=0 maxOccurs=1 name=resultCause type=s:string/
/s:sequence
/s:complexType
/s:element





/s:schema
/types

message name=LogGetEventsSoapInpart name=parameters element=s0:LogGetEvents//message
message name=LogGetEventsSoapOutpart name=parameters element=s0:LogGetEventsResponse//message

portType name=fooLogStatsPortType


operation name=LogGetEvents
	input message=s0:LogGetEventsSoapIn /
	output message=s0:LogGetEventsSoapOut /
/operation

/portType




binding name=fooLogStatsBinding type=s0:fooLogStatsPortType
soap:binding transport=http://schemas.xmlsoap.org/soap/http; style=document/


operation name=LogGetEvents
soap:operation soapAction=http://tempuri.org/LogGetEvents; style=document /
	inputsoap:body use=literal//input
	outputsoap:body use=literal//output
/operation


/binding



service name=clsLogStats
	port name=fooLogStatsPort binding=s0:fooLogStatsBinding
		soap:address location=http://192.168.0.32:8080/foo1.0-Soap/
	/port
/service
/definitions





Axis Fault

2005-07-01 Thread mmalinos
I'm having a problem with throwing an AxisFault in my main service class.
I have handlers that throw AxisFaults fine, but I have
conditions I need to check inside my main service class where I need to
throw a fault.  When I throw the AxisFault, I actually
catch an exception on the throw.  Below is the code and the stack trace in
my service class.  Can anyone tell me what I might
be doing wrong?  Your help is greatly appreciated...

Thanks,
Mark

Method Signature

public String submitDTS(String payload) throws java.rmi.RemoteException

Code

if(test.equals(payload))
{
  fault = new AxisFault();
  fault.setFaultCodeAsString(TEST);
  fault.setFaultReason(DTS Test Error);
  fault.addFaultDetailString(Test Error 1234567890);
  throw fault;
}

Stack Trace

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}TEST
 faultSubcode:
 faultString: DTS Test Error
 faultActor:
 faultNode:
 faultDetail:
{http://xml.apache.org/axis/}stackTrace: AxisFault
 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
 faultSubcode:
 faultString:
 faultActor:
 faultNode:
 faultDetail:


at
com.datatransportstandard.referenceimplementation.service.DTSCoreService.submitDTS(DTSCoreService.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:402)
at
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:309)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at
org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323)
at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:854)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:805)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:696)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
at java.lang.Thread.run(Thread.java:534)

{}string: Test Error 1234567890

DTS Test Error
at
com.datatransportstandard.referenceimplementation.service.DTSCoreService.submitDTS(DTSCoreService.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 

Re: Multi dimensional String array

2005-07-01 Thread Jean



I've managed to fix this issue by changing my call 
to use the wsdl

String url = ""http://localhost:8080/axis/services/FormController?wsdl">http://localhost:8080/axis/services/FormController?wsdl";Service 
service = new Service(url, new QName("FormController", 
"FormControllerSService"));
String[][] in1 = new String[][] { { "abc", "cba" }, 
{ "def", "fed" } };Call call = (Call) service.createCall(new 
QName("FormController"), "move");call.invoke(new 
Object[]{in1});

Still however don't know why the old version of 
Axis did this correctly.


  - Original Message - 
  From: 
  Jean 
  To: axis-user@ws.apache.org 
  Sent: Friday, July 01, 2005 11:08 
AM
  Subject: Re: Multi dimensional String 
  array
  
  It seems as if the message that is sent to the 
  Soap server is incorrect
  
  I call the Soap service as follows
   call = (Call) 
  service.createCall();call.setTargetEndpointAddress(new 
  java.net.URL(url));String[][] in1 = new 
  String[][]{{"abc","cba"}, {"def","fed"}};
   
  call.setOperation("move");
   Object resp = call.invoke(new 
  Object[]{in1});
  
  Which generates the following Soap message 
  parameter
  arg0 arg0 
  xsi:type="xsd:string"abc/arg0  arg0 
  xsi:type="xsd:string"cba/arg0  arg0 
  xsi:type="xsd:string"def/arg0  arg0 
  xsi:type="xsd:string"fed/arg0/arg0
  
  But should be generating this (this happens with 
  the old version)
  item 
  soapenc:arrayType="xsd:string[2]" itemabc/item 
   itemcba/item/itemitem 
  soapenc:arrayType="xsd:string[2]" itemdef/item 
   itemfed/item/item
  
  Am I doing something wrong, or is there perhaps a 
  problem with axis?
  
  
- Original Message - 
From: 
Jean 
To: axis-user@ws.apache.org 
Sent: Thursday, June 30, 2005 3:39 
PM
Subject: Multi dimensional String 
array

Hi,

I'm trying to call a method with a multi 
dimensional array as follows

public java.lang.String 
move(java.lang.String[][] in0) throws java.rmi.RemoteException;

The problem is that when I do the call my array 
is not built correctly, the array 
new String[][]{{"abc","cba"}, 
{"def","fed"}};
Should read as follows
0  [0] 
abc  [1] cba1  [0] 
def  [1] fed

But I get the following
0  [0] 
abc1  [0] cba2  
[0] def3  [0] fed

I'm currently using axis 1.2.1 final which 
gives me this result, one of the axis 1.2 RC versions used to do it 
correctly but now I have a problem since changing the version. I don't 
really want to go back to the RC, how can I get this to work?

Regards,
Jean



Re: Dynamic Endpoints

2005-07-01 Thread aveitas
Greetings John,

wsabi4axis (http://www.sourceforge.net/projects/wsabi4axis) can certainly help
here.  We have JSP's that already allow you do modify the parameters of a
deployed web service.  If the full-blown webapp does not fit your requirements,
the Configure module (see http://demo.wsabi.org/configure/services.do) is a
Struts module that you could potentially add into your application (assuming
you are using struts).   Lastly, you could take a look at the code that the
backend of the Configure module utilizes to see how we interact with the Axis
Engine.  See the above link to SourceForge to download.

Thanks,
  Al

Quoting Anne Thomas Manes [EMAIL PROTECTED]:

 As far as I'm aware, Axis doesn't support that capability. The WSABI
 folks have created a browser-based administration tool for managing
 and manipulating deployment descriptors, but that's their own stuff --
 not part of Axis.

 Note that a user can't just arbitrarily modify the deployment
 descriptor of a deployed service. Can you provide a use case? What
 information would a user want to change in deployment descriptor?

 Anne

 On 6/29/05, John Baker [EMAIL PROTECTED] wrote:
  Anne,
 
  I'm trying to modify a deployment descriptor through a web application that
  includes Axis.
 
  I.e.:
 
   - Create new webapp,
   - Add Axis integration, alter web.xml, etc.,
   - Create a JSP that allows a user to modify the parameters of a deployed
  service.
 
  I am not thinking of developing a management tool (given there's a
 perfectly
  good one out there already). I'm wondering how to alter the deployment
  descriptor through API calls?
 
 
  John
 
  On Tue, Jun 28, 2005 at 04:00:13AM -0700, Anne Thomas Manes wrote:
   John,
  
   Please clarify. Do you want a client application to modify a service's
   deployment descriptor? (A client endpoint should never be able to
   modify an existing service.)
  
   Or do you want a client application to be able to dynamically discover
   new services and make use of them?
  
   Perhaps you are thinking of developing a management tool? Perhaps
   something like WSABI? (see
   http://www.allesta.com/products/wsabi4axis.html)
  
   Anne
  
   On 6/27/05, John Baker [EMAIL PROTECTED] wrote:
Well, I can conclude that I have disclosed everything I nkow, and I
 have
some idea what I'm doing :-)
   
I guess in broader terms, I'd like to know how to modify deployment
descriptors on the fly! Imagine I were creating a Java GUI FrontEnd,
 and Mr.
user wants to add a new Service or Port? Or modify an existing one?
 That's
what I'm trying to achieve.
   
Perhaps put more simply, that makes the problem easier to comprehend.
   
On Sun, Jun 26, 2005 at 08:35:08AM -0400, Jeff wrote:
 Hi John,

 At least one of us seems to be confused here  :-)

 The Service you are referring to is client-side code. If all you want
 to do
 is set an endpoint for you client to connect to then you can do it
 straightforwardly using code I mentioned earlier.

 I get the impression that (i) you are trying to do something that you
 don't
 really wish to fully disclose so it's not clear what your problem is
 or (ii)
 you have no idea what you're doing or (iii) you are doing something
 that
 exceeds my comprehension and you would perhaps fair better with help
 from
 someone with more expertise!


 Best wishes,

 Jeff




 - Original Message -
 From: John Baker [EMAIL PROTECTED]
 To: axis-user@ws.apache.org
 Sent: Sunday, June 26, 2005 4:39 AM
 Subject: Re: Dynamic Endpoints


  Jeff,
 
  Perhaps this is a question for the dev list, as it really does
 revolve
  around Axis internals, and not Axis usage?
 
 
  John
 
  On Sat, Jun 25, 2005 at 01:38:50PM -0400, Jeff wrote:
   Thanks, BarZ, I'm sure we'll bear that in mind  :-)
  
  
   Jeff
  
  
   - Original Message -
   From: Barzilai Spinak [EMAIL PROTECTED]
   To: axis-user@ws.apache.org
   Sent: Sunday, June 26, 2005 1:14 AM
   Subject: Re: Dynamic Endpoints
  
  
I haven't following this thread but it seems you guys are
 talking
 about
a million different subjects here.
Now, the question below is very easy! There's something called
 the
deployment descriptor or something
like that where you define all the services you are going to
 provide.
What their names are, what is the
class that implements it, whether Axis should instantiate an
 object
 per
call or use a single instance and use it for all calls
(which should be a thread-safe object), and you can specify a
 whole
 lot
of parameters. Look it up in the docs, it's one
of the first things you learn about. It's written in XML of
 course :-)
I don't usually like to say RTFM but this one is 

Re: How to Capture Roundrip Time for Web Service Calls

2005-07-01 Thread aveitas
Hi Kumar,

wsabi4axis (http://www.sourceforge.net/projects/wsabi4axis) will fit some of
your needs.  We have a handler that can be configured on the requestFlow and
responseFlow of your service.  It will capture the amount of time it takes to
process the request inside the Axis Engine where your web service resides.  In
addition, it will also capture the request/response envelopes which are all
viewable via the web based admin console.

To see this in action, goto http://demo.wsabi.org/monitor/index.do.  Select
YahooUserPingService from the Service drop-down and select a Time Period
(yesterday, today, etc.).  You will see response times and other information. 
Further drill-down will allow you to display the request/response envelopes and
transport headers.

Thanks,
  Al


Quoting Kumar [EMAIL PROTECTED]:

 Hi All,

 I have exposed a EJB method as a web service using AXIS, WebSphere 5.1
 on the server side and  also used AXIS on the client side . Now I want
 to have metrics for below :


 1. Time taken to send a request (soap message) to the service
 2. Time taken to send a response (soap message) to the client
 3. Total roundtrip time taken for the whole request/response cycle.


 Now I am novice to various ways of measuring the roundrip time other than
 using
 System.currentTimeMillis() as show below between web service call
 invocations.

 public class Client {
   private String m_target;
   private AmalWSImplBindingStub m_proxy;

   private void query() throws Exception {
   try {
   m_proxy = (AmalWSImplBindingStub)new
 AmalWSImplInterfaceServiceLocator().getAmalWSImpl();
   int startTime = System.currentTimeMillis();
   String ret1 = m_proxy.capturedPCNList(amla);
   int endTime = System.currentTimeMillis();
   }
   catch (Exception e) {
   }
   }
 }


 I know that request and response times start on various parameters
 like the network bandwidth, application server, hardware resources
 etc. but I want to arrive at some metric calculations purely on web
 service calls made by axis, the time taken for (de)serializing by axis
 it etc. etc.   Are there any (free for personal use) tools out there
 that can monitor and log the response times of web service  endpoints.
 Can anybody please share their knowledge and experiences and help me
 to starup this metric calculation.



 Thanks  Regards,
 Kumar.





Re: Axis Fault

2005-07-01 Thread Anne Thomas Manes
Are you using SOAP 1.1 or SOAP 1.2? 
The parameters you're using to throw the fault look like SOAP 1.2, but
the stack trace shows SOAP 1.1 elements.

Also, you need to qualify your TEST code -- it shouldn't be in the
soapenv namespace. (You really should use the standard SOAP fault
codes [Client, Server, VersionMismatch, and MustUnderstand] and use
the fault string/reason to specify your specific fault info.)

Your stack trace indicates that you are invoking a native method,
though. Don't know where that's coming from...

Anne

On 7/1/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 I'm having a problem with throwing an AxisFault in my main service class.
 I have handlers that throw AxisFaults fine, but I have
 conditions I need to check inside my main service class where I need to
 throw a fault.  When I throw the AxisFault, I actually
 catch an exception on the throw.  Below is the code and the stack trace in
 my service class.  Can anyone tell me what I might
 be doing wrong?  Your help is greatly appreciated...
 
 Thanks,
 Mark
 
 Method Signature
 
 public String submitDTS(String payload) throws java.rmi.RemoteException
 
 Code
 
 if(test.equals(payload))
 {
   fault = new AxisFault();
   fault.setFaultCodeAsString(TEST);
   fault.setFaultReason(DTS Test Error);
   fault.addFaultDetailString(Test Error 1234567890);
   throw fault;
 }
 
 Stack Trace
 
 AxisFault
  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}TEST
  faultSubcode:
  faultString: DTS Test Error
  faultActor:
  faultNode:
  faultDetail:
 {http://xml.apache.org/axis/}stackTrace: AxisFault
  faultCode:
 {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
  faultSubcode:
  faultString:
  faultActor:
  faultNode:
  faultDetail:
 
 
 at
 com.datatransportstandard.referenceimplementation.service.DTSCoreService.submitDTS(DTSCoreService.java:69)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at
 org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:402)
 at
 org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:309)
 at
 org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333)
 at
 org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
 at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
 at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
 at
 org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481)
 at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323)
 at
 org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:854)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
 at
 org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:339)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
 at
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
 at
 org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
 at
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
 at
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
 at
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
 at
 org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
 at
 

Re: Help on Arrays

2005-07-01 Thread Anne Thomas Manes
Your schema defines each element in the response as an array, but your
response is not returning the array elements as arrays. Instead it is
returning groups of elements as arrays. I suggest that you modify the
schema to reflect the expected response. Something like this:

 s:element name=LogGetEventsResponse
  s:complexType
s:sequence
  s:sequence minOccurs=1 maxOccurs=200
s:element name=accountId type=s:unsignedInt / 
s:element name=eventDt type=s:dateTime / 
s:element name=eventCode type=s:unsignedInt / 
s:element name=eventSrc type=s:unsignedInt / 
s:element name=status type=s:unsignedInt / 
s:element name=errorSrcPeriod type=s:unsignedInt / 
s:element name=errorSeverity type=s:unsignedInt / 
s:element name=adminUserId type=s:unsignedInt / 
s:element name=serverId type=s:unsignedInt / 
s:element name=sessionId type=s:unsignedInt / 
s:element name=InEndDt type=s:dateTime / 
s:element name=OutStartDt type=s:dateTime / 
s:element name=OutEndDt type=s:dateTime / 
s:element name=MsgIn type=s:unsignedInt / 
s:element name=MsgOut type=s:unsignedInt / 
s:element name=BytesIn type=s:unsignedInt / 
s:element name=BytesOut type=s:unsignedInt / 
s:element name=CmdsIn type=s:unsignedInt / 
s:element name=CmdsOut type=s:unsignedInt / 
s:element name=AdnCount type=s:unsignedInt / 
s:element name=transactionId type=s:string / 
s:element name=extSessionInfo type=s:string / 
  /s:sequence
  s:element minOccurs=1 maxOccurs=1 name=result type=s:int / 
  s:element minOccurs=0 maxOccurs=1 name=resultCause
type=s:string /
/s:sequence
   /s:complexType
  /s:element

Or you might want to create an element (and a matching bean) called
event, and use this element to specify the array, such as:

 s:element name=event
  s:complexType
s:sequence
s:element name=accountId type=s:unsignedInt / 
s:element name=eventDt type=s:dateTime / 
s:element name=eventCode type=s:unsignedInt / 
s:element name=eventSrc type=s:unsignedInt / 
s:element name=status type=s:unsignedInt / 
s:element name=errorSrcPeriod type=s:unsignedInt / 
s:element name=errorSeverity type=s:unsignedInt / 
s:element name=adminUserId type=s:unsignedInt / 
s:element name=serverId type=s:unsignedInt / 
s:element name=sessionId type=s:unsignedInt / 
s:element name=InEndDt type=s:dateTime / 
s:element name=OutStartDt type=s:dateTime / 
s:element name=OutEndDt type=s:dateTime / 
s:element name=MsgIn type=s:unsignedInt / 
s:element name=MsgOut type=s:unsignedInt / 
s:element name=BytesIn type=s:unsignedInt / 
s:element name=BytesOut type=s:unsignedInt / 
s:element name=CmdsIn type=s:unsignedInt / 
s:element name=CmdsOut type=s:unsignedInt / 
s:element name=AdnCount type=s:unsignedInt / 
s:element name=transactionId type=s:string / 
s:element name=extSessionInfo type=s:string / 
 /s:sequence
   /s:complexType
 /s:element
 s:element name=LogGetEventsResponse
  s:complexType
s:sequence
  s:element minOccurs=1 maxOccurs=200 ref=event /
  s:element minOccurs=1 maxOccurs=1 name=result type=s:int / 
  s:element minOccurs=0 maxOccurs=1 name=resultCause
type=s:string /
/s:sequence
   /s:complexType
  /s:element

Anne

On 7/1/05, Chris Averia [EMAIL PROTECTED] wrote:
  
 Hello, 
   
 I have attached the WSDL file that I compiled using wsdl2Java.  This file
 contains a Soap call definition that expects arrays as return values. 
   
 However, I always encounter that the size of the return arrays are always 1.
  Can somebody point me to the right direction?  BTW, Im using Axis1.2 final.
   
 Here is the actual Soap Response: 
   
 ?xml version=1.0 encoding=UTF-8?
 soapenv:Envelope
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
 .soapenv:Body
 ..LogGetEventsResponse xmlns=http://foo.com/foo1.0/;
 ...accountId83/accountId
 ...eventDt2005-05-27T03:08:26/eventDt
 ...eventCode109/eventCode
 ...eventSrc4/eventSrc
 ...status1/status
 ...adminUserId99/adminUserId
 ...accountId83/accountId
 ...eventDt2005-05-27T03:07:59/eventDt
 ...eventCode105/eventCode
 ...eventSrc4/eventSrc
 ...status1/status
 ...adminUserId99/adminUserId
 ...accountId83/accountId
 ...eventDt2005-05-27T03:07:58/eventDt
 ...eventCode102/eventCode
 ...eventSrc4/eventSrc
 ...status1/status
 ...adminUserId99/adminUserId
 ...accountId83/accountId
 ...eventDt2005-05-
 27T03:07:58/event Dt...eventCode104/eventCode
 ...eventSrc4/eventSrc
 ...status1/status
 ...adminUserId99/adminUserId
 ...accountId83/accountId
 ...eventDt2005-05-27T03:07:58/eventDt
 ...eventCode103/eventCode
 ...eventSrc4/eventSrc
 ...status1/status
 

Axis WS constructor problem

2005-07-01 Thread GIBERT Philippe RD-BIZZ-SOP



Hi,I have an already developped/deployed web service 
in a WASP 5.0 engine that works well, called by a WSC also developpedwith WASP 5.0. The 
WS consummer make 3 calls , and beetwen the calls i keep some kind of 
session values on the WS provider side.That value is used on the 
server side, to identify the WSC callingI had to deploy 
that Web Service on Axis.I have done the translation and deploy on Axis 
1.2 /Jonas.
but each time my WSC ( developped with axis) calls the 
WSP, i have a call to the WSC constructor , loosing my 
sessionID
i have not this behaviour with WASP, having just the WSP 
constructor called one time ...
may I deploy with special settings in Axis ?
any clue ?

regards
philippe
Philippe Gibert +33 492945370France Telecom RD  
BIZZ/DIAM905, rue Albert Einstein06921 Sophia Antipolios 
Cedex


how do I get rid of duplicate attribute xsi:type=soapenc:Array?

2005-07-01 Thread Kurt Indermaur
I'm an Axis newbie, and I've got axis working fine for very simple services,
but any time I have an array in the response I get a duplicate attribute
(xsi:type=soapenc:Array) in the response. Perl's SOAP::Lite chokes on the
duplicate attribute. The WSDD and response are below.

Any suggestions on what I'm doing wrong/how to make this duplicate attribute
go away?

Thanks,

--Kurt

Using the book query example from chapter 2 of O'Reilly's Java Web Services
in a Nutshell book (http://examples.oreilly.com/javawsian/):
-
The WSDD I used:
-
deployment xmlns=http://xml.apache.org/axis/wsdd/;
xmlns:java=http://xml.apache.org/axis/wsdd/providers/java;

 service name=BookQuery provider=java:RPC
   requestFlow
 handler type=soapmonitor/
   /requestFlow
   responseFlow
 handler type=soapmonitor/
   /responseFlow

   parameter name=className
value=ora.jwsnut.chapter2.bookservice.BookServiceServant/
   parameter name=allowedMethods value=*/
   beanMapping qname=bookNS:BookInfo xmlns:bookNS=urn:bookService
 languageSpecificType=java:ora.jwsnut.chapter2.bookservice.BookInfo/
 /service

/deployment
-
The response I get. The duplicate attributes are on the 13th and 14th lines
(getBookInfoReturn...).
-
HTTP/1.1 200 OK
Content-Type: text/xml;charset=utf-8
Date: Fri, 01 Jul 2005 20:58:27 GMT
Server: Sun-Java-System/Web-Services-Pack-1.4
Connection: close

?xml version=1.0 encoding=UTF-8?
   soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsd=http://www.w3.org/1999/XMLSchema;
xmlns:xsi=http://www.w3.org/1999/XMLSchema-instance;
  soapenv:Body
 ns1:getBookInfoResponse
soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:ns1=http://bookservice.chapter2.jwsnut.ora;
getBookInfoReturn soapenc:arrayType=ns2:BookInfo[12]
xsi:type=soapenc:Array xsi:type=soapenc:Array
xmlns:ns2=urn:bookService
xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   getBookInfoReturn href=#id0/
   getBookInfoReturn href=#id1/
   getBookInfoReturn href=#id2/
   getBookInfoReturn href=#id3/
   getBookInfoReturn href=#id4/
   getBookInfoReturn href=#id5/
   getBookInfoReturn href=#id6/
   getBookInfoReturn href=#id7/
   getBookInfoReturn href=#id8/
   getBookInfoReturn href=#id9/
   getBookInfoReturn href=#id10/
   getBookInfoReturn href=#id11/
/getBookInfoReturn
 /ns1:getBookInfoResponse
 multiRef id=id3 soapenc:root=0
soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
xsi:type=ns3:BookInfo
xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:ns3=urn:bookService
author xsi:type=ns4:string
xmlns:ns4=http://www.w3.org/2001/XMLSchema;Robert Eckstein et al/author
editor xsi:type=ns5:string
xmlns:ns5=http://www.w3.org/2001/XMLSchema;Mike Loukides/editor
price xsi:type=ns6:double
xmlns:ns6=http://www.w3.org/2001/XMLSchema;44.95/price
title xsi:type=ns7:string
xmlns:ns7=http://www.w3.org/2001/XMLSchema;Java Swing/title
 /multiRef
 multiRef id=id1 soapenc:root=0
soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
xsi:type=ns8:BookInfo
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:ns8=urn:bookService
xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;
author xsi:type=ns9:string
xmlns:ns9=http://www.w3.org/2001/XMLSchema;David Flanagan/author
editor xsi:type=ns10:string
xmlns:ns10=http://www.w3.org/2001/XMLSchema;Paula Ferguson/editor
price xsi:type=ns11:double
xmlns:ns11=http://www.w3.org/2001/XMLSchema;29.95/price
title xsi:type=ns12:string
xmlns:ns12=http://www.w3.org/2001/XMLSchema;Java Foundation Classes in a
Nutshell/title
 /multiRef
 multiRef id=id4 soapenc:root=0
soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
xsi:type=ns13:BookInfo
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:ns13=urn:bookService
xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;
author xsi:type=ns14:string
xmlns:ns14=http://www.w3.org/2001/XMLSchema;Jason Hunter, William
Crawford/author
editor xsi:type=ns15:string
xmlns:ns15=http://www.w3.org/2001/XMLSchema;Paula Ferguson/editor
price xsi:type=ns16:double
xmlns:ns16=http://www.w3.org/2001/XMLSchema;32.95/price
title xsi:type=ns17:string
xmlns:ns17=http://www.w3.org/2001/XMLSchema;Java Servlet
Programming/title
 /multiRef
 multiRef id=id9 soapenc:root=0
soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
xsi:type=ns18:BookInfo
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

SOAPMonitor problems in axis 1.2.1 with jboss 3.2.5

2005-07-01 Thread Pantvaidya, Vishwajit
Hello,

I am trying to use axis 1.2.1 with jboss 3.2.5 but not getting SOAPMonitor
to work. Here are the steps I did:

- created a jar file of the SOAPMonitorApplet classes
- created an axis war file having all files under \axis-1_2_1\webapps\axis
- included the SOAPMonitorApplet.jar in the above war with the path
WEB-INF\lib\
- tried to run the SOAPMonitor in Firefox with java plugin 1.4.2

But I got ClassNotFoundException for the SOAPMonitorApplet class. I also
tried adding the applet jar to the jboss classpath. But even that does not
work.

I guess the browser should be able to load applet through the jboss server.
Am I doing anything wrong here?


- Vish.


Query Regarding SOAP Header

2005-07-01 Thread Amit
Hi All,
I have deployed a web service using AXIS and I am able
to access the same without any problems from a Java
client. I was trying to access the same using .NET
client and I ran into some issues which created doubts
regarding structure of soap header. I am using
following header
soap:headerVersion1.0/Version/soap:header
Is this a valid header accroding to soap? I am not
able to create the same using .NET. It seems that you
can only create the headers that have other elements
and no values. 
E.g. ABabc/BCab/c/A. Could not put any
value for the element A. E.g AABC/A.

Please let me know if anyone has encountered such
problem before and any pointers would be very useful.

Thanks in Advance,
Amit




 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com


SOAP Attachments -- Example Doesn't Work

2005-07-01 Thread Mark Leone
I have Axis 1.2 RC3 in Tomcat 5.5.8, and I tried to call the sample 
attachments service (samples.attachments.EchoAttachmentsService).with 
the sample client (samples.attachments.EchoAttachment). I deployed the 
service with the attachdeploy.wsdd in the samples/attachments directory, 
and it seemed to be successful. The Axis servlet displays the service in 
the list of deployed services, but when I click on the wsdl link I get 
the following:



   AXIS error

Sorry, something seems to have gone wrong... here are the details:

Fault - ; nested exception is: 
	WSDLException: faultCode=OTHER_ERROR: Can't find prefix for 'urn:EchoAttachmentsService'. Namespace prefixes must be set on the Definition object using the addNamespace(...) method.: 


AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode: 
faultString: WSDLException: faultCode=OTHER_ERROR: Can't find prefix for 'urn:EchoAttachmentsService'. Namespace prefixes must be set on the Definition object using the addNamespace(...) method.: 
faultActor: 
faultNode: 
faultDetail: 


I tried to run the client anyway, and I get the following in the Tomcat log

In echo
Received javax.activation.DataHandler.
- java.io.IOException:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/related; type=text/xml; start=4797A406CB66DEBB0324404AE4600781; 
	boundary==_Part_0_17700115.1120281455852

at 
javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:841)
at javax.activation.DataHandler.writeTo(DataHandler.java:295)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1209)
at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1611)
at 
org.apache.axis.attachments.MimeUtils.writeToMultiPartStream(MimeUtils.java:238)
at 
org.apache.axis.attachments.AttachmentsImpl.writeContentToStream(AttachmentsImpl.java:500)
at org.apache.axis.Message.writeTo(Message.java:447)
at 
org.apache.axis.transport.http.AxisServlet.sendResponse(AxisServlet.java:1018)
at 
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:895)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at 
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:743)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)

I'd like to know what's going wrong here, but I'm also trying to figure out how 
attachments are implemented in this example,
because it seems to be not what I expected. When I generated a wsdl file using 
WSDL2Java from the service class, the wsdl didn't
include mime:multipart/related elements in the bindings, as the wsdl spec shows 
for handling attachmetns. The wsdl just showed
a DataHandler object and a w3c.org.DOM.Document object being passed in both 
directions.

Then when I looked at the source code I saw that there are three methods: 
echo() and echoDir() accept and return DataHandler
and DataHandler[] objects, respectively, and this is consistent with what's in 
the typeMapping in the wsdd. But there's also
a method attachments() which accepts and returns a org.w3c.DOM.Document object. 
The implementation shows that the Document
has href attributes that point to other MIME parts, which is what I was 
expecting to see in the wsdl. But the attachments()
method isn't called by the client at all, and there is no mention of a MIME structure in the wsdl for this method. Is this 
method called by the DataHandler objects that are passed via echo() and echoDir()? If not, how does it get called?

I know it does, because it threw a no support for