Re: Why m_pCall-initialize(CPP_RPC_PROVIDER)) fails?

2005-10-12 Thread John Hawkins

Hmm, I thought we'd got rid of this
- there is certainly a JIRA that was trying to address all these sorts
of issues.http://issues.apache.org/jira/browse/AXISCPP-657
Hmm, looks like it never had any specific
issues addressed in it ! Maybe you can use this JIRA to fix it ?

cheers,
John.







Tomaz Rotovnik
[EMAIL PROTECTED] 
11/10/2005 22:38



Please respond to
Apache AXIS C User List





To
Apache AXIS C User
List axis-c-user@ws.apache.org


cc



Subject
Re: Why m_pCall-initialize(CPP_RPC_PROVIDER))
fails?








Hi

When I use multithreading on client side I found out that for each 
transaction HTTPChannel.dll library is loaded. Is this necessary? Why only

this dll and not also AxisXMLParser and HTTPTransport?

Best Regards

Tomaz




[axis2 0.92] Suggested platform?

2005-10-12 Thread Johan Andersson



Hello all,

I have some serious problems getting version 0.92 
to work properly on Tomcat.

In my logs I find this error: 

java.lang.NoSuchMethodError: 
javax.servlet.http.HttpServletResponse.setCharacterEncoding(Ljava/lang/String;)Vat 
org.apache.axis2.transport.http.ServletBasedOutTransportInfo.setCharacterEncoding(ServletBasedOutTransportInfo.java:33)at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:134)at 
org.apache.axis2.engine.AxisEngine.sendFault(AxisEngine.java:182)at 
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:210)at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:716)
Which I understand (through some reading in the 
mailing list archives) is related to an issue where axis2 (0.92) requires a 
servlet 2.4 engine.
Tomcat 5.5 is servlet 2.4 but is also (as far as I 
can understand) jdk 1.5 which I have read is not fully compatible with version 
0.92.

Anyone have a suggestions how I get this version 
running on Tomcat?
What servlet engine is the Axis2 team 
running?

Another question, is there a rough road map of the 
upcoming Axis2 releases and the final 1.0 release?

Best Regards,
Johan


Re: Duplicate operation names

2005-10-12 Thread Chris Mannion



Thanks Anne,

That's going to be very helpful amunition in the 
political wranglings I'm having to fight my way through.
Chris MannionIT Junction020 8452 4274

  - Original Message - 
  From: 
  Anne Thomas 
  Manes 
  To: axis-user@ws.apache.org 
  Sent: Tuesday, October 11, 2005 9:12 
  PM
  Subject: Re: Duplicate operation 
  names
  It is permitted by the WSDL spec, but it has been outlawed by 
  the WS-I Basic Profile. It's a bad practice that causes a lot of 
  interoperability issues. Anne
  On 10/11/05, Chris 
  Mannion [EMAIL PROTECTED] 
  wrote:
  
Hi

I'm being given an error from axisbecause 
the wsdl file of the webservices I'm trying to make calls to defines two 
different operations with the same name. I've contacted the owners of 
the webservice and they assure me that it isn't a mistake in their wsdl, the 
service is designed that way as each of the two operations take different 
parameters and which is being called is dynamically determined by the server 
based on the parameters passed.
Sadly my code doesn't get as far as making the 
call as axis seems unhappy with there being two operations with the same 
name. Does anyone know if the wsdl specification explicitly prohibits 
operation-name overloading like this or is the object specific to 
axis?

The exception I get is below, as the wsdl 
contains two operations name CardPaymentRequest (I've masked the portType, 
it is correct in the original output)

javax.xml.rpc.ServiceException: Error 
processing WSDL document: java.lang.IllegalArgumentException: 
Duplicate operation with name=CardPaymentRequest, found in portType '{http://xxx.xxx.xxx.uk/}CardPaymentsSoap'.at 
org.apache.axis.client.Service.initService(Service.java:249)at 
org.apache.axis.client.Service.init(Service.java:164)at 
org.apache.axis.client.ServiceFactory.createService(ServiceFactory.java:198)at 
govConnect.WebServiceTools.init(WebServiceTools.java:79)at 
ep.callWS.service(callWS.java:58)at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)at 
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:419)at 
org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:169)at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)at 
java.lang.Thread.run(Thread.java:536)
Chris MannionIT Junction020 8452 
4274


Release notes for Axis 1.3

2005-10-12 Thread Jyrki Saarinen
Hello all,

is there a release notes or changelog somewhere available? I couldn't find 
such file in the distribution package of Axis 1.3.

Jyrki


Re: Release notes for Axis 1.3

2005-10-12 Thread Toshiyuki Kimura

It should be in the full (including sources) dist package.
Or, you can find out it on the repository:

http://svn.apache.org/viewcvs.cgi/*checkout*/webservices/
axis/branches/AXIS_1_3_FINAL/changelog.html

http://svn.apache.org/viewcvs.cgi/*checkout*/webservices/
axis/branches/AXIS_1_3_FINAL/release-notes.html

---
Toshi

On Wed, 12 Oct 2005, Jyrki Saarinen wrote:


Hello all,

is there a release notes or changelog somewhere available?
I couldn't find such file in the distribution package of
Axis 1.3.

Jyrki



Re: [axis2 0.92] Suggested platform?

2005-10-12 Thread Davanum Srinivas
Please log a bug (if there isn't one already). we need to support both
Servlet 2.3 and 2.4

thanks,
dims

On 10/12/05, Johan Andersson [EMAIL PROTECTED] wrote:

 Hello all,

 I have some serious problems getting version 0.92 to work properly on
 Tomcat.

 In my logs I find this error:

 java.lang.NoSuchMethodError:
 javax.servlet.http.HttpServletResponse.setCharacterEncoding(Ljava/lang/String;)V
  at
 org.apache.axis2.transport.http.ServletBasedOutTransportInfo.setCharacterEncoding(ServletBasedOutTransportInfo.java:33)
  at
 org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:134)
  at
 org.apache.axis2.engine.AxisEngine.sendFault(AxisEngine.java:182)
  at
 org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:210)
  at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:716)

 Which I understand (through some reading in the mailing list archives) is
 related to an issue where axis2 (0.92) requires a servlet 2.4 engine.
 Tomcat 5.5 is servlet 2.4 but is also (as far as I can understand) jdk 1.5
 which I have read is not fully compatible with version 0.92.

 Anyone have a suggestions how I get this version running on Tomcat?
 What servlet engine is the Axis2 team running?

 Another question, is there a rough road map of the upcoming Axis2 releases
 and the final 1.0 release?

 Best Regards,
 Johan


--
Davanum Srinivas : http://wso2.com/blogs/


Problem using wsdl with Axis 2.0

2005-10-12 Thread Farooq Mahmood
Hi,
We are using axis2 v0.92 to deploy webservices, but we
are getting some problem while associating .wsdl 
file with the webservice. One of the solution we saw
in axis offical website mailing list, but the reply 
was little bit confusing. Following is the text of
that mailing thread.

Hi Gordon;

 It should work , but you need to do some
modifications
 1. You need to have services.xml instead of
service.xml
 2. There should be a service element in side
services.xml similar to 
 service element in WSDL file

 as an example , say you have a wsdl with following
service element

  service name=MySerevice
port name=MySerevicePort
binding=mh:MySereviceBinding
soap:address 

location=http://www.Monson-Haefel.com/jwsbook/MySereviceService/
/port
/service

 Then the services.xml should look like follows
 op 1 :
  services
 service MySerevice
 ..
 ..
 /service
  /services

 op 2 :  there should be a service archive file with
the name 
 MySerevice.aar and its services.xml should look like
follows
  service 
 ..
   /service




 Thanks,
 Deepal


The very first point in the solution says You need to
have services.xml instead of service.xml. 
service.xml is the default xml file which describes
webservice operations. Its work fine. When i added my 
services.wsdl file I got an error. My wsdl file and
xml file is as follows:


services.xml

services
service name=NameServiceSkeletonTest
port name=Service1Soap
binding=tns:GetNameSoapBinding
address
location=http://localhost:8080/axis2/services/nameservice;
/
/port
parameter locked=xsd:false
name=ServiceClassnameservice.NameService/parameter
operation name=getName/
/service
/services



services.wsdl

?xml version=1.0 encoding=utf-8?
wsdl:definitions
xmlns:http=http://schemas.xmlsoap.org/wsdl/http/;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:s=http://www.w3.org/2001/XMLSchema;
xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:tns=http://tempuri.org/;
xmlns:tm=http://microsoft.com/wsdl/mime/textMatching/;
xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/;
targetNamespace=http://tempuri.org/;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
  wsdl:types
s:schema elementFormDefault=qualified
targetNamespace=http://tempuri.org/;
  s:element name=GetNameRequest
   s:element name=input type=s:string / 

  /s:element
  s:element name=GetNameResponse
s:element name=result type=s:string /
  /s:element  
/s:schema
  /wsdl:types
  wsdl:message name=GetNameSoapIn
wsdl:part name=parameters
element=tns:GetNameRequest /
  /wsdl:message
  wsdl:message name=GetNameSoapOut
wsdl:part name=parameters
element=tns:GetNameResponse /
  /wsdl:message

  wsdl:portType name=Service1Soap
wsdl:operation name=getName
  wsdl:input message=tns:GetNameSoapIn /
  wsdl:output message=tns:GetNameSoapOut /
/wsdl:operation
  /wsdl:portType

  wsdl:binding name=Service1Soap
type=tns:Service1Soap
soap:binding
transport=http://schemas.xmlsoap.org/soap/http;
style=document /
wsdl:operation name=getName
  soap:operation
soapAction=http://tempuri.org/getName;
style=document /
  wsdl:input
soap:body use=literal /
  /wsdl:input  
/wsdl:operation
  /wsdl:binding

  wsdl:service name=NameServiceSkeletonTest
documentation
xmlns=http://schemas.xmlsoap.org/wsdl/; /
wsdl:port name=Service1Soap
binding=tns:GetNameSoapBinding
  soap:address
location=http://localhost:8080/axis2/services/nameservice;
/
/wsdl:port
  /wsdl:service
/wsdl:definitions


Regds,
Farooq


Re: performance

2005-10-12 Thread Jyrki Saarinen
On Saturday 08 October 2005 01:19, Eric Johnson wrote:
 In Axis 1.2.1, you probably want to set the system property
 -Daxis.xml.reuseParsers=true.  In Axis 1.3, I believe the code was
 changed so this is the default.

 Certainly don't take that as the final word, it is just the one I know
 about.

What this setting is supposed to do? At least on my application it seemed to 
slow it down a little bit..

Jyrki


Re: finding client-config.wsdd icw WebStart

2005-10-12 Thread Johan Walters
You are right, I meant that I supplied my own client-config.wsdd file
to the EngineConfiguration so the axis engine should be using it now
for sure. However, the handlers still do not work :-(

Had anybody had problems with handlers like this? I defined the
SimpleSessionHandler just as in all examples, and I add it to the
request and response flow of both server and client. The server does
it's job, but the client doesn't. Any idea's why the client is still
ignoring the session ID's?

Johan

2005/10/11, zze-ELSOKHON Tony RD-BIZZ-ISS [EMAIL PROTECTED]:

 Johan;

 When you create a customized EngineConfiguration, Axis uses it directly to 
 configure the client-side engine and stops looking for a client-config.wsdd 
 file.

 Tony

 -Message d'origine-
 De: Johan Walters [mailto:[EMAIL PROTECTED]
 Envoyé: mardi 11 octobre 2005 16:57
 À: axis-user@ws.apache.org
 Objet: Re: finding client-config.wsdd icw WebStart

 Thank you, after trying creating a EngineConfiguration myself I don't
 get errors anymore so I think the client-config.wsdd file is found.

 The problem still is, the handlers that are supposed to return SOAP
 headers with the session ID still do not work. It might even well be
 the case that my client already found client-config.wsdd before, but I
 just assumed it didn't because no SOAP session headers appear.
 Every message from the server does contain a soap header with a new
 session ID, the client does not include any soap header at all as it
 should have. So the server keeps sending new ID's every time.

 Perhaps any ideas why SimpleSessionHandler fails at my client side?

 Johan Walters


 2005/10/11, zze-ELSOKHON Tony RD-BIZZ-ISS [EMAIL PROTECTED]:
 
  John,
 
  You can still try using an XMLStringProvider. It should work if you figure 
  out the possible encoding problems.
 
  You can also include a client-config.wsdd file in one of the jars that are 
  on the classpath. Axis is able to retrieve it there.
 
  Even better, you can build programmatically a customized Axis configuration 
  engine by implementing the interface org.apache.axis.EngineConfiguration.
  You can find some sample code here:
  http://wiki.apache.org/ws/FrontPage/Axis/AxisClientConfiguration
 
  Regards,
 
  Tony ELSOKHON
 
  -Message d'origine-
  De: Johan Walters [mailto:[EMAIL PROTECTED]
  Envoyé: mardi 11 octobre 2005 14:18
  À: axis-user@ws.apache.org
  Objet: finding client-config.wsdd icw WebStart
 
  I'm having a strange problem I cannot figure out.
 
  I am using Axis 1.2. Currently, I have a working webstart application
  that uses axis. It is able to communicate succesfully to my server
  using soap. Now I would like to implement soap-header based sessions.
  In order to do that, I have to supply a client-config.wsdd file to the
  client. There are 4 ways to to this:
 
  1) Put the client-config.wsdd file in the working directory. Since
  webstart only uses weird cache directories, this is no option.
 
  2) Put the client-config.wsdd file in the classpath. There is no
  option for inlcuding new directories to the classpath once webstart
  (and thus the VM) is running, right? So no-go here either.
 
  3) Put the client-config.wsdd file somewhere you like and put the
  parent directory of the file in a system property called
  axis.ClientConfigFile. This gives me the following error (just the
  first few lines):
 
  org.apache.axis.InternalException:
  org.apache.axis.ConfigurationException:
  org.apache.axis.ConfigurationException: No engine configuration file -
  aborting!
  org.apache.axis.ConfigurationException: No engine configuration file - abor=
  ting!
at org.apache.axis.configuration.FileProvider.configureEngine(FileP=
  rovider.java:175)
at org.apache.axis.AxisEngine.init(AxisEngine.java:172)
at org.apache.axis.AxisEngine.init(AxisEngine.java:156)
at org.apache.axis.client.AxisClient.init(AxisClient.java:52)
at org.apache.axis.client.Service.getAxisClient(Service.java:103)
at org.apache.axis.client.Service.init(Service.java:112)
at client.JarDistributionServiceLocator.init  ... ...
 
  Somehow, the FileProvider failed to load the file.
 
  4) I created a FileProvider myself, and even tried a XMLStringProvider
  like this:
 
  XP =3D new XMLStringProvider(StringContainingClientConfigWSDD)
  ...
  locator =3D new JarDistributionServiceLocator();
  XP.configureEngine(locator.getEngine());
 
  Both the FileProvider and XMLStringProvider give the following error:
 
  org.apache.axis.InternalException:
  org.apache.axis.ConfigurationException: org.xml.sax.SAXException:
  Fatal Error: URI=3Dnull Line=3D-1: Premature end of file.
  org.xml.sax.SAXException: Fatal Error: URI=3Dnull Line=3D-1: Premature end =
  of file.
at org.apache.axis.utils.XMLUtils$ParserErrorHandler.fatalError
  (XMLUtils.java:723)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fata=
  lError(Unknown
  Source)
at 

AW: finding client-config.wsdd icw WebStart

2005-10-12 Thread Dorner, Thomas
The client didn´t find the client-config.wsdd

You should set the path to client...wsdd with a JVM-Option at the server!
Like this:

-Daxis.ClientConfigFile=C:/projects/sources/.../WEB-INF/client-config.wsdd 
 
 

Thomas Dorner
T-Systems International GmbH
 

 
 
 
 

-Ursprüngliche Nachricht-
Von: Johan Walters [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 12. Oktober 2005 14:45
An: axis-user@ws.apache.org
Betreff: Re: finding client-config.wsdd icw WebStart

You are right, I meant that I supplied my own client-config.wsdd file to the
EngineConfiguration so the axis engine should be using it now for sure.
However, the handlers still do not work :-(

Had anybody had problems with handlers like this? I defined the
SimpleSessionHandler just as in all examples, and I add it to the request
and response flow of both server and client. The server does it's job, but
the client doesn't. Any idea's why the client is still ignoring the session
ID's?

Johan

2005/10/11, zze-ELSOKHON Tony RD-BIZZ-ISS
[EMAIL PROTECTED]:

 Johan;

 When you create a customized EngineConfiguration, Axis uses it directly to
configure the client-side engine and stops looking for a client-config.wsdd
file.

 Tony

 -Message d'origine-
 De: Johan Walters [mailto:[EMAIL PROTECTED]
 Envoyé: mardi 11 octobre 2005 16:57
 À: axis-user@ws.apache.org
 Objet: Re: finding client-config.wsdd icw WebStart

 Thank you, after trying creating a EngineConfiguration myself I don't 
 get errors anymore so I think the client-config.wsdd file is found.

 The problem still is, the handlers that are supposed to return SOAP 
 headers with the session ID still do not work. It might even well be 
 the case that my client already found client-config.wsdd before, but I 
 just assumed it didn't because no SOAP session headers appear.
 Every message from the server does contain a soap header with a new 
 session ID, the client does not include any soap header at all as it 
 should have. So the server keeps sending new ID's every time.

 Perhaps any ideas why SimpleSessionHandler fails at my client side?

 Johan Walters


 2005/10/11, zze-ELSOKHON Tony RD-BIZZ-ISS
[EMAIL PROTECTED]:
 
  John,
 
  You can still try using an XMLStringProvider. It should work if you
figure out the possible encoding problems.
 
  You can also include a client-config.wsdd file in one of the jars that
are on the classpath. Axis is able to retrieve it there.
 
  Even better, you can build programmatically a customized Axis
configuration engine by implementing the interface
org.apache.axis.EngineConfiguration.
  You can find some sample code here:
  http://wiki.apache.org/ws/FrontPage/Axis/AxisClientConfiguration
 
  Regards,
 
  Tony ELSOKHON
 
  -Message d'origine-
  De: Johan Walters [mailto:[EMAIL PROTECTED]
  Envoyé: mardi 11 octobre 2005 14:18
  À: axis-user@ws.apache.org
  Objet: finding client-config.wsdd icw WebStart
 
  I'm having a strange problem I cannot figure out.
 
  I am using Axis 1.2. Currently, I have a working webstart 
  application that uses axis. It is able to communicate succesfully to 
  my server using soap. Now I would like to implement soap-header based
sessions.
  In order to do that, I have to supply a client-config.wsdd file to 
  the client. There are 4 ways to to this:
 
  1) Put the client-config.wsdd file in the working directory. Since 
  webstart only uses weird cache directories, this is no option.
 
  2) Put the client-config.wsdd file in the classpath. There is no 
  option for inlcuding new directories to the classpath once webstart 
  (and thus the VM) is running, right? So no-go here either.
 
  3) Put the client-config.wsdd file somewhere you like and put the 
  parent directory of the file in a system property called 
  axis.ClientConfigFile. This gives me the following error (just the 
  first few lines):
 
  org.apache.axis.InternalException:
  org.apache.axis.ConfigurationException:
  org.apache.axis.ConfigurationException: No engine configuration file 
  - aborting!
  org.apache.axis.ConfigurationException: No engine configuration file 
  - abor= ting!
at 
  org.apache.axis.configuration.FileProvider.configureEngine(FileP=
  rovider.java:175)
at org.apache.axis.AxisEngine.init(AxisEngine.java:172)
at org.apache.axis.AxisEngine.init(AxisEngine.java:156)
at org.apache.axis.client.AxisClient.init(AxisClient.java:52)
at org.apache.axis.client.Service.getAxisClient(Service.java:103)
at org.apache.axis.client.Service.init(Service.java:112)
at client.JarDistributionServiceLocator.init  ... ...
 
  Somehow, the FileProvider failed to load the file.
 
  4) I created a FileProvider myself, and even tried a 
  XMLStringProvider like this:
 
  XP =3D new XMLStringProvider(StringContainingClientConfigWSDD)
  ...
  locator =3D new JarDistributionServiceLocator(); 
  XP.configureEngine(locator.getEngine());
 
  Both the FileProvider and XMLStringProvider give the following 

Re: performance

2005-10-12 Thread Jyrki Saarinen
On Saturday 08 October 2005 01:19, Eric Johnson wrote:
 In Axis 1.2.1, you probably want to set the system property
 -Daxis.xml.reuseParsers=true.  In Axis 1.3, I believe the code was
 changed so this is the default.

In case of someone else is interested on this, it isn't on as default:

String value = 
AxisProperties.getProperty(AxisEngine.PROP_XML_REUSE_SAX_PARSERS,
 + true);
if (value.equalsIgnoreCase(true) ||
value.equals(1) ||
value.equalsIgnoreCase(yes)) {
enableParserReuse = true;
} else {
enableParserReuse = false;
}

Jyrki


Re: performance

2005-10-12 Thread Jyrki Saarinen
On Wednesday 12 October 2005 15:57, Jyrki Saarinen wrote:
 On Saturday 08 October 2005 01:19, Eric Johnson wrote:
  In Axis 1.2.1, you probably want to set the system property
  -Daxis.xml.reuseParsers=true.  In Axis 1.3, I believe the code was
  changed so this is the default.

 In case of someone else is interested on this, it isn't on as default:

 String value =
 AxisProperties.getProperty(AxisEngine.PROP_XML_REUSE_SAX_PARSERS,
  + true);
 if (value.equalsIgnoreCase(true) ||
 value.equals(1) ||
 value.equalsIgnoreCase(yes)) {
 enableParserReuse = true;
 } else {
 enableParserReuse = false;
 }

 Jyrki

Äh, sorry. Of course it is on if the property is not specified, in which case 
AxisProperties.getProperty() returns true;

Jyrki


Re: performance

2005-10-12 Thread Jyrki Saarinen

About performance; by default Axis uses the XML parser from J2SDK 1.4 when 
executed in that environment, right? Is it possible to plug in a parser that 
has better performance?

Jyrki


Re: finding client-config.wsdd icw WebStart

2005-10-12 Thread Johan Walters
First of all, because I'm using webstart my client-config.wsdd is
packed into a jar with my client code, where Axis should find it, yet
no headers with session ID's from the client.

Second, I tried storing the client-config.wsdd locally on the client,
and add it as a system property, like you suggested:
System.setProperty(axis.ClientConfigFile, configFile.getCanonicalPath());
Still, no headers with session ID's.

Third, I created a EngingeConfiguration and let it use this same file
using a FileProvider. Still no headers.

Because all options fail, it makes me belief that my
client-config.wsdd file IS used, but something else goes wrong. I
don't know where and I don't know where to look for clues. Any help is
welcome (and thanks for replies even if they didn't help ;-) )

Johan Walters


2005/10/12, Dorner, Thomas [EMAIL PROTECTED]:
 The client didn´t find the client-config.wsdd

 You should set the path to client...wsdd with a JVM-Option at the server!
 Like this:

 -Daxis.ClientConfigFile=C:/projects/sources/.../WEB-INF/client-config.wsdd



 Thomas Dorner
 T-Systems International GmbH







 -Ursprüngliche Nachricht-
 Von: Johan Walters [mailto:[EMAIL PROTECTED]
 Gesendet: Mittwoch, 12. Oktober 2005 14:45
 An: axis-user@ws.apache.org
 Betreff: Re: finding client-config.wsdd icw WebStart

 You are right, I meant that I supplied my own client-config.wsdd file to the
 EngineConfiguration so the axis engine should be using it now for sure.
 However, the handlers still do not work :-(

 Had anybody had problems with handlers like this? I defined the
 SimpleSessionHandler just as in all examples, and I add it to the request
 and response flow of both server and client. The server does it's job, but
 the client doesn't. Any idea's why the client is still ignoring the session
 ID's?

 Johan

 2005/10/11, zze-ELSOKHON Tony RD-BIZZ-ISS
 [EMAIL PROTECTED]:
 
  Johan;
 
  When you create a customized EngineConfiguration, Axis uses it directly to
 configure the client-side engine and stops looking for a client-config.wsdd
 file.
 
  Tony
 
  -Message d'origine-
  De: Johan Walters [mailto:[EMAIL PROTECTED]
  Envoyé: mardi 11 octobre 2005 16:57
  À: axis-user@ws.apache.org
  Objet: Re: finding client-config.wsdd icw WebStart
 
  Thank you, after trying creating a EngineConfiguration myself I don't
  get errors anymore so I think the client-config.wsdd file is found.
 
  The problem still is, the handlers that are supposed to return SOAP
  headers with the session ID still do not work. It might even well be
  the case that my client already found client-config.wsdd before, but I
  just assumed it didn't because no SOAP session headers appear.
  Every message from the server does contain a soap header with a new
  session ID, the client does not include any soap header at all as it
  should have. So the server keeps sending new ID's every time.
 
  Perhaps any ideas why SimpleSessionHandler fails at my client side?
 
  Johan Walters
 
 
  2005/10/11, zze-ELSOKHON Tony RD-BIZZ-ISS
 [EMAIL PROTECTED]:
  
   John,
  
   You can still try using an XMLStringProvider. It should work if you
 figure out the possible encoding problems.
  
   You can also include a client-config.wsdd file in one of the jars that
 are on the classpath. Axis is able to retrieve it there.
  
   Even better, you can build programmatically a customized Axis
 configuration engine by implementing the interface
 org.apache.axis.EngineConfiguration.
   You can find some sample code here:
   http://wiki.apache.org/ws/FrontPage/Axis/AxisClientConfiguration
  
   Regards,
  
   Tony ELSOKHON
  
   -Message d'origine-
   De: Johan Walters [mailto:[EMAIL PROTECTED]
   Envoyé: mardi 11 octobre 2005 14:18
   À: axis-user@ws.apache.org
   Objet: finding client-config.wsdd icw WebStart
  
   I'm having a strange problem I cannot figure out.
  
   I am using Axis 1.2. Currently, I have a working webstart
   application that uses axis. It is able to communicate succesfully to
   my server using soap. Now I would like to implement soap-header based
 sessions.
   In order to do that, I have to supply a client-config.wsdd file to
   the client. There are 4 ways to to this:
  
   1) Put the client-config.wsdd file in the working directory. Since
   webstart only uses weird cache directories, this is no option.
  
   2) Put the client-config.wsdd file in the classpath. There is no
   option for inlcuding new directories to the classpath once webstart
   (and thus the VM) is running, right? So no-go here either.
  
   3) Put the client-config.wsdd file somewhere you like and put the
   parent directory of the file in a system property called
   axis.ClientConfigFile. This gives me the following error (just the
   first few lines):
  
   org.apache.axis.InternalException:
   org.apache.axis.ConfigurationException:
   org.apache.axis.ConfigurationException: No engine configuration file
   - aborting!
   org.apache.axis.ConfigurationException: No 

Problem with security manager and JWS class - What is the URL of the compiled JWS classes for the policy file?

2005-10-12 Thread Felix Dierich

Hi Axis community!

I have a problem with a .jws class running on a Tomcat 4.1 with security 
switched on (on Debian GNU/Linux with Blackdown Java 1.4). The JWS class 
(which is not written by me) tries to connect to a MySQL server on the 
same machine which is prevented by the security manager, although the 
following grant is made in the policy file:


grant codeBase file:${catalina.home}/webapps/anemos/- {
  permission java.security.AllPermission;
};

Another web service installed at the same webapp with WSDD can make DB 
connections without problems.


If I add

grant {
  permission java.security.AllPermission;
};

to the policy file, everything works fine. So the question is (I think): 
What is the URL of the compiled JWS classes?


This is the output in catalina.out:

Connection Error: com.mysql.jdbc.CommunicationsException: Communications 
link failure due to underlying exception:


** BEGIN NESTED EXCEPTION **

java.security.AccessControlException
MESSAGE: access denied (java.net.SocketPermission localhost resolve)

STACKTRACE:

java.security.AccessControlException: access denied 
(java.net.SocketPermission localhost resolve)
at 
java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
at 
java.security.AccessController.checkPermission(AccessController.java:401)
at 
java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
at 
java.lang.SecurityManager.checkConnect(SecurityManager.java:1023)

at java.net.InetAddress.getAllByName0(InetAddress.java:1000)
at java.net.InetAddress.getAllByName0(InetAddress.java:981)
at java.net.InetAddress.getAllByName(InetAddress.java:975)
at 
com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:137)

at com.mysql.jdbc.MysqlIO.init(MysqlIO.java:283)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2541)
at com.mysql.jdbc.Connection.init(Connection.java:1474)
at 
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:264)
at 
com.mysql.jdbc.jdbc2.optional.MysqlDataSource.getConnection(MysqlDataSource.java:425)
at 
com.mysql.jdbc.jdbc2.optional.MysqlDataSource.getConnection(MysqlDataSource.java:140)

at AnemosSDRRequestESB.AnemosConnect(AnemosSDRRequestESB.java:7484)
...


I have switched on the debug mode and it adds:

access: access allowed (java.io.FilePermission 
/var/lib/tomcat4/webapps/anemos/WEB-INF/lib/mysql-connector-java-3.1.10-bin.jar 
reaaccess: access denied (java.util.PropertyPermission 
com.mysql.jdbc.logger read)

java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:1064)
at 
java.security.AccessControlContext.checkPermission(AccessControlContext.java:258)
at 
java.security.AccessController.checkPermission(AccessController.java:401)
at 
java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
at 
java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1276)

at java.lang.System.getProperty(System.java:573)
at 
com.mysql.jdbc.ConnectionProperties.postInitialization(ConnectionProperties.java:2383)
at 
com.mysql.jdbc.ConnectionProperties.initializeProperties(ConnectionProperties.java:2365)
at 
com.mysql.jdbc.Connection.initializeDriverProperties(Connection.java:3617)

at com.mysql.jdbc.Connection.init(Connection.java:1471)
at 
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:264)
at 
com.mysql.jdbc.jdbc2.optional.MysqlDataSource.getConnection(MysqlDataSource.java:425)
at 
com.mysql.jdbc.jdbc2.optional.MysqlDataSource.getConnection(MysqlDataSource.java:140)

at AnemosSDRRequestESB.AnemosConnect(AnemosSDRRequestESB.java:7484)
[...]
access: access allowed (java.util.PropertyPermission java.security.debug 
read)

access: domain that failed ProtectionDomain  (null no certificates)
 [EMAIL PROTECTED]
 no principals
 [EMAIL PROTECTED] (
 (java.util.PropertyPermission java.version read)
 (java.util.PropertyPermission java.home read)
 (java.util.PropertyPermission java.vm.name read)
 (java.util.PropertyPermission java.vm.vendor read)
 (java.util.PropertyPermission javax.sql.* read)
 (java.util.PropertyPermission os.name read)
 (java.util.PropertyPermission java.vendor.url read)
 (java.util.PropertyPermission java.vm.specification.vendor read)
 (java.util.PropertyPermission java.specification.vendor read)
 (java.util.PropertyPermission os.version read)
 (java.util.PropertyPermission java.specification.name read)
 (java.util.PropertyPermission java.class.version read)
 (java.util.PropertyPermission file.separator read)
 (java.util.PropertyPermission java.vm.version read)
 (java.util.PropertyPermission os.arch read)
 (java.util.PropertyPermission java.naming.* read)
 (java.util.PropertyPermission jaxp.debug read)
 (java.util.PropertyPermission java.vm.specification.name read)
 

are wsdl2java generated client stubs thread-safe?

2005-10-12 Thread Paul Mackles
Hi - I have what I hope is a simple question... Are the
wsdl2java-generated client stubs thread-safe? In other words, if I call:

handleToWs = new WsServiceLocator().getWs(new
URL(http://blah.blah.com/ws;));

at application startup and then use 'handleToWs' in multiple threads,
will I run into problems? My hunch is that I won't (I see some
synchronized blocks in the generated code) but I can't find anything
which clearly states: client stubs are thread safe. Are there other
downside to the approach that I might be missing?

I am currently using Axis1.1 but an upgrade to 1.2 is in the works.

Thanks,
Paul


AW: finding client-config.wsdd icw WebStart

2005-10-12 Thread Dorner, Thomas
Pls show us your client-config.wsdd 
 

Thomas Dorner
 
 
 
 

-Ursprüngliche Nachricht-
Von: Johan Walters [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 12. Oktober 2005 15:13
An: axis-user@ws.apache.org
Betreff: Re: finding client-config.wsdd icw WebStart

First of all, because I'm using webstart my client-config.wsdd is packed
into a jar with my client code, where Axis should find it, yet no headers
with session ID's from the client.

Second, I tried storing the client-config.wsdd locally on the client, and
add it as a system property, like you suggested:
System.setProperty(axis.ClientConfigFile, configFile.getCanonicalPath());
Still, no headers with session ID's.

Third, I created a EngingeConfiguration and let it use this same file using
a FileProvider. Still no headers.

Because all options fail, it makes me belief that my client-config.wsdd file
IS used, but something else goes wrong. I don't know where and I don't know
where to look for clues. Any help is welcome (and thanks for replies even if
they didn't help ;-) )

Johan Walters


2005/10/12, Dorner, Thomas [EMAIL PROTECTED]:
 The client didn´t find the client-config.wsdd

 You should set the path to client...wsdd with a JVM-Option at the server!
 Like this:

 -Daxis.ClientConfigFile=C:/projects/sources/.../WEB-INF/client-config.
 wsdd



 Thomas Dorner
 T-Systems International GmbH







 -Ursprüngliche Nachricht-
 Von: Johan Walters [mailto:[EMAIL PROTECTED]
 Gesendet: Mittwoch, 12. Oktober 2005 14:45
 An: axis-user@ws.apache.org
 Betreff: Re: finding client-config.wsdd icw WebStart

 You are right, I meant that I supplied my own client-config.wsdd file 
 to the EngineConfiguration so the axis engine should be using it now for
sure.
 However, the handlers still do not work :-(

 Had anybody had problems with handlers like this? I defined the 
 SimpleSessionHandler just as in all examples, and I add it to the 
 request and response flow of both server and client. The server does 
 it's job, but the client doesn't. Any idea's why the client is still 
 ignoring the session ID's?

 Johan

 2005/10/11, zze-ELSOKHON Tony RD-BIZZ-ISS
 [EMAIL PROTECTED]:
 
  Johan;
 
  When you create a customized EngineConfiguration, Axis uses it 
  directly to
 configure the client-side engine and stops looking for a 
 client-config.wsdd file.
 
  Tony
 
  -Message d'origine-
  De: Johan Walters [mailto:[EMAIL PROTECTED]
  Envoyé: mardi 11 octobre 2005 16:57
  À: axis-user@ws.apache.org
  Objet: Re: finding client-config.wsdd icw WebStart
 
  Thank you, after trying creating a EngineConfiguration myself I 
  don't get errors anymore so I think the client-config.wsdd file is
found.
 
  The problem still is, the handlers that are supposed to return SOAP 
  headers with the session ID still do not work. It might even well be 
  the case that my client already found client-config.wsdd before, but 
  I just assumed it didn't because no SOAP session headers appear.
  Every message from the server does contain a soap header with a new 
  session ID, the client does not include any soap header at all as it 
  should have. So the server keeps sending new ID's every time.
 
  Perhaps any ideas why SimpleSessionHandler fails at my client side?
 
  Johan Walters
 
 
  2005/10/11, zze-ELSOKHON Tony RD-BIZZ-ISS
 [EMAIL PROTECTED]:
  
   John,
  
   You can still try using an XMLStringProvider. It should work if 
   you
 figure out the possible encoding problems.
  
   You can also include a client-config.wsdd file in one of the jars 
   that
 are on the classpath. Axis is able to retrieve it there.
  
   Even better, you can build programmatically a customized Axis
 configuration engine by implementing the interface 
 org.apache.axis.EngineConfiguration.
   You can find some sample code here:
   http://wiki.apache.org/ws/FrontPage/Axis/AxisClientConfiguration
  
   Regards,
  
   Tony ELSOKHON
  
   -Message d'origine-
   De: Johan Walters [mailto:[EMAIL PROTECTED]
   Envoyé: mardi 11 octobre 2005 14:18
   À: axis-user@ws.apache.org
   Objet: finding client-config.wsdd icw WebStart
  
   I'm having a strange problem I cannot figure out.
  
   I am using Axis 1.2. Currently, I have a working webstart 
   application that uses axis. It is able to communicate succesfully 
   to my server using soap. Now I would like to implement soap-header 
   based
 sessions.
   In order to do that, I have to supply a client-config.wsdd file to 
   the client. There are 4 ways to to this:
  
   1) Put the client-config.wsdd file in the working directory. Since 
   webstart only uses weird cache directories, this is no option.
  
   2) Put the client-config.wsdd file in the classpath. There is no 
   option for inlcuding new directories to the classpath once 
   webstart (and thus the VM) is running, right? So no-go here either.
  
   3) Put the client-config.wsdd file somewhere you like and put the 
   parent directory of the file in a system property called 
   

Re: performance

2005-10-12 Thread Ron Reynolds
Axis uses JAXP to find its XML parser and JAXP uses a set of rules to dictate 
what factory class to use to create its
parsers, transformers, and so forth as defined here -
http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/parsers/DocumentBuilderFactory.html#newInstance()

so before it uses the default internal parser (it used to be Crimson, tho i 
heard an old Xerces was added to the new
JRE - is that true?) it will first check 
System.getProperty(javax.xml.parsers.DocumentBuilderFactory),
$JAVA_HOME/lib/jaxp.properties, and
Thread.currentThread().getContextClassLoader().getResourceAsStream(META-INF/services/javax.xml.parsers.DocumentBuilderFactory).
 note, the thread's context classloader has to be properly set to a loader at 
or below the app loader for this to work
properly (i.e., find a resource on the classpath or below - otherwise you get 
an impl at the lib/ext or bootclasspath
level).  this also depends on the xerces (or whatever parser you want to use) 
jar having a
META-INF/services/javax.xml.parsers.DocumentBuilderFactory file containing the 
classname of the factory to use.


 About performance; by default Axis uses the XML parser from J2SDK 1.4 when
 executed in that environment, right? Is it possible to plug in a parser that
 has better performance?

 Jyrki





Monitor progress of an AXIS SOAP request and response over http transport

2005-10-12 Thread Wade Chandler
I'm trying to find a way to monitor the SOAP request
and response in AXIS.  I'm using the HTTP transport. 
I don't see anything that will allow me to watch the
progress of the entire process or even pieces.  I
figured for an attachment upload I could wrap an IO
stream and watch those leave out as the rest will be
minimal as long as there is no caching is taking place
and this would not be a true way to watch the progress
of the outbound streams, but during a
response/retrieve I really don't see any way at the
moment.  I've been trying to dig around in the AXIS
code, but my time line is pretty limited.  Has anyone
else come up with a working solution?  I saw some
posts in the archive, but I have yet to see any real
answers to the question other than wrapping IO
streams, but it still doesn't help with the response
and any downloads of attachments.

Thanks and any input is appreciated,

Wade


Re: are wsdl2java generated client stubs thread-safe?

2005-10-12 Thread Ron Reynolds
session-management, if any.  auth tokens.  resolving a response to the request 
that caused it (depending on what
protocol you're using).  there are many things that could be negatively 
impacted if you have many threads use the same
client stub instance.  they should be reusable, tho, so perhaps you could use a 
stub pool to hand them out to your
threads as-needed (i assume this is for performance reasons?).  the rule of 
thumb i've always heard is that if it
doesn't say it's thread-safe assume it's NOT.

 Hi - I have what I hope is a simple question... Are the
 wsdl2java-generated client stubs thread-safe? In other words, if I call:

 handleToWs = new WsServiceLocator().getWs(new
 URL(http://blah.blah.com/ws;));

 at application startup and then use 'handleToWs' in multiple threads,
 will I run into problems? My hunch is that I won't (I see some
 synchronized blocks in the generated code) but I can't find anything
 which clearly states: client stubs are thread safe. Are there other
 downside to the approach that I might be missing?

 I am currently using Axis1.1 but an upgrade to 1.2 is in the works.

 Thanks,
 Paul





Re: finding client-config.wsdd icw WebStart

2005-10-12 Thread Johan Walters
Sorry! I found the problem.
The client-config.wsdd I was using, was generated by
org.apache.axis.utils.Admin client deploy.wsdd
However, the result did not include request/responseflow items for the
SimpleSessionHandler in the globalConfiguration part as well, only in
the service part.

For completeness, some more info for people who run into the same
problem in the future:
I used the example deploy.wsdd file from
http://www.fawcette.com/javapro/2003_04/online/wsdl_kjones_04_29_03/default_pf.aspx
The article continues with generating a client-config.wsdd file from
it, which does contain the globalConfiguration request- and
reponseFlow parts. With me, these weren't there and I had to add them
manually to client-config.wsdd.
Adding them to deploy.wsdd in the first place and then auto-generating
the client-config.wsdd as described also works (somehow the server
adds the session ID in the soap header twice, though).

Johan Walters

2005/10/12, Johan Walters [EMAIL PROTECTED]:
 First of all, because I'm using webstart my client-config.wsdd is
 packed into a jar with my client code, where Axis should find it, yet
 no headers with session ID's from the client.

 Second, I tried storing the client-config.wsdd locally on the client,
 and add it as a system property, like you suggested:
 System.setProperty(axis.ClientConfigFile, configFile.getCanonicalPath());
 Still, no headers with session ID's.

 Third, I created a EngingeConfiguration and let it use this same file
 using a FileProvider. Still no headers.

 Because all options fail, it makes me belief that my
 client-config.wsdd file IS used, but something else goes wrong. I
 don't know where and I don't know where to look for clues. Any help is
 welcome (and thanks for replies even if they didn't help ;-) )

 Johan Walters


 2005/10/12, Dorner, Thomas [EMAIL PROTECTED]:
  The client didn´t find the client-config.wsdd
 
  You should set the path to client...wsdd with a JVM-Option at the server!
  Like this:
 
  -Daxis.ClientConfigFile=C:/projects/sources/.../WEB-INF/client-config.wsdd
 
 
 
  Thomas Dorner
  T-Systems International GmbH
 
 
 
 
 
 
 
  -Ursprüngliche Nachricht-
  Von: Johan Walters [mailto:[EMAIL PROTECTED]
  Gesendet: Mittwoch, 12. Oktober 2005 14:45
  An: axis-user@ws.apache.org
  Betreff: Re: finding client-config.wsdd icw WebStart
 
  You are right, I meant that I supplied my own client-config.wsdd file to the
  EngineConfiguration so the axis engine should be using it now for sure.
  However, the handlers still do not work :-(
 
  Had anybody had problems with handlers like this? I defined the
  SimpleSessionHandler just as in all examples, and I add it to the request
  and response flow of both server and client. The server does it's job, but
  the client doesn't. Any idea's why the client is still ignoring the session
  ID's?
 
  Johan
 
  2005/10/11, zze-ELSOKHON Tony RD-BIZZ-ISS
  [EMAIL PROTECTED]:
  
   Johan;
  
   When you create a customized EngineConfiguration, Axis uses it directly to
  configure the client-side engine and stops looking for a client-config.wsdd
  file.
  
   Tony
  
   -Message d'origine-
   De: Johan Walters [mailto:[EMAIL PROTECTED]
   Envoyé: mardi 11 octobre 2005 16:57
   À: axis-user@ws.apache.org
   Objet: Re: finding client-config.wsdd icw WebStart
  
   Thank you, after trying creating a EngineConfiguration myself I don't
   get errors anymore so I think the client-config.wsdd file is found.
  
   The problem still is, the handlers that are supposed to return SOAP
   headers with the session ID still do not work. It might even well be
   the case that my client already found client-config.wsdd before, but I
   just assumed it didn't because no SOAP session headers appear.
   Every message from the server does contain a soap header with a new
   session ID, the client does not include any soap header at all as it
   should have. So the server keeps sending new ID's every time.
  
   Perhaps any ideas why SimpleSessionHandler fails at my client side?
  
   Johan Walters
  
  
   2005/10/11, zze-ELSOKHON Tony RD-BIZZ-ISS
  [EMAIL PROTECTED]:
   
John,
   
You can still try using an XMLStringProvider. It should work if you
  figure out the possible encoding problems.
   
You can also include a client-config.wsdd file in one of the jars that
  are on the classpath. Axis is able to retrieve it there.
   
Even better, you can build programmatically a customized Axis
  configuration engine by implementing the interface
  org.apache.axis.EngineConfiguration.
You can find some sample code here:
http://wiki.apache.org/ws/FrontPage/Axis/AxisClientConfiguration
   
Regards,
   
Tony ELSOKHON
   
-Message d'origine-
De: Johan Walters [mailto:[EMAIL PROTECTED]
Envoyé: mardi 11 octobre 2005 14:18
À: axis-user@ws.apache.org
Objet: finding client-config.wsdd icw WebStart
   
I'm having a strange problem I cannot figure out.
   
I am using 

RE: Monitor progress of an AXIS SOAP request and response over http transport

2005-10-12 Thread Grossberger, Guenter
Hi!

I don't exactly get what you want to monitor. You can watch the HTTP-Request 
and Response with the TCPMonitor:
java org.apache.axis.utils.tcpmon ListenPort TargetHost TargetPort

Of course, you have to set instruct your client to send the request to 
ListenPort instead. If you're running Axis on Tomcat with Eclipse you can set 
breakpoints anywhere you like.

You can also use the logging for monitoring purposes.

Best regards,

--
DI Günter Grossberger
Consultant Tel: +43 1 329 50 161
Software AG Österreich Fax: +43 1 329 50 171
Guglgasse 7-9  GSM: +43 676 833 29 261
1030 Wien  http://www.softwareag.com/austria
 

 -Original Message-
 From: Wade Chandler [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, October 12, 2005 4:12 PM
 To: axis-user@ws.apache.org
 Subject: Monitor progress of an AXIS SOAP request and 
 response over http transport
 
 I'm trying to find a way to monitor the SOAP request
 and response in AXIS.  I'm using the HTTP transport. 
 I don't see anything that will allow me to watch the
 progress of the entire process or even pieces.  I
 figured for an attachment upload I could wrap an IO
 stream and watch those leave out as the rest will be
 minimal as long as there is no caching is taking place
 and this would not be a true way to watch the progress
 of the outbound streams, but during a
 response/retrieve I really don't see any way at the
 moment.  I've been trying to dig around in the AXIS
 code, but my time line is pretty limited.  Has anyone
 else come up with a working solution?  I saw some
 posts in the archive, but I have yet to see any real
 answers to the question other than wrapping IO
 streams, but it still doesn't help with the response
 and any downloads of attachments.
 
 Thanks and any input is appreciated,
 
 Wade
 


RE: Monitor progress of an AXIS SOAP request and response over http transport

2005-10-12 Thread Wade Chandler
--- Grossberger, Guenter
[EMAIL PROTECTED] wrote:

 Hi!
 
 I don't exactly get what you want to monitor. You
 can watch the HTTP-Request and Response with the
 TCPMonitor:
 java org.apache.axis.utils.tcpmon ListenPort
 TargetHost TargetPort
 
 Of course, you have to set instruct your client to
 send the request to ListenPort instead. If you're
 running Axis on Tomcat with Eclipse you can set
 breakpoints anywhere you like.
 
 You can also use the logging for monitoring
 purposes.
 
 Best regards,
 
 --
 DI Günter Grossberger
 Consultant Tel: +43 1 329 50 161
 Software AG Österreich Fax: +43 1 329 50 171
 Guglgasse 7-9  GSM: +43 676 833 29 261
 1030 Wien 
 http://www.softwareag.com/austria
  
 
  -Original Message-
  From: Wade Chandler
 [mailto:[EMAIL PROTECTED] 
  Sent: Wednesday, October 12, 2005 4:12 PM
  To: axis-user@ws.apache.org
  Subject: Monitor progress of an AXIS SOAP request
 and 
  response over http transport
  
  I'm trying to find a way to monitor the SOAP
 request
  and response in AXIS.  I'm using the HTTP
 transport. 
  I don't see anything that will allow me to watch
 the
  progress of the entire process or even pieces.  I
  figured for an attachment upload I could wrap an
 IO
  stream and watch those leave out as the rest will
 be
  minimal as long as there is no caching is taking
 place
  and this would not be a true way to watch the
 progress
  of the outbound streams, but during a
  response/retrieve I really don't see any way at
 the
  moment.  I've been trying to dig around in the
 AXIS
  code, but my time line is pretty limited.  Has
 anyone
  else come up with a working solution?  I saw some
  posts in the archive, but I have yet to see any
 real
  answers to the question other than wrapping IO
  streams, but it still doesn't help with the
 response
  and any downloads of attachments.
  
  Thanks and any input is appreciated,
  
  Wade
  
 

By monitor progress I mean the progress of the sending
and receiving of bytes from one end to the other.  I
want to be able to display good user feedback about
the progress of the outbound request and inbound
response.  I'm using attachments, and I need to be
able to show the progress better than simply giving an
indefinite progress meter that says uploading or
downloading files and bounces back and forth.  I was
wondering if anyone has any ideas they have working
now, or if anyone has some good ideas they might have
thought about on the topic.

Thanks for the input,

Wade


WSDL generated from reflection?

2005-10-12 Thread Robert Nicholson
I intend to replace a proprietory web framework with Axis but can  
anybody tell me if Axis supports generation of WSDL using reflection?  
I don't care about the naming of arguments.


Axis HTTP connection model

2005-10-12 Thread Jarmo Doc
Does the Axis (1.2/1.3) client work like a browser (open HTTP connection, 
send SOAP message, get response, close connection) or are its connections 
persistent?  Thanks.


_
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/




Extracting type with WSDL4J

2005-10-12 Thread fabricio
Hello all,

I'm trying to use WSDL4J API to extract type section of a WSDL file. I used
the following command to achieve it:

WSDLFactory wsdlFactory = WSDLFactory.newInstance();
WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
Definition def = wsdlReader.readWSDL(urlWSDL);
Types wsdlTypes = def.getTypes();
Element typeSection = wsdlTypes.getDocumentationElement();

But my typeSection element is always null!!! And my wsdlTypes variable is it:

Types:
SchemaExtensibilityElement ({http://www.w3.org/2001/XMLSchema}schema):
required=null
element=schema targetNamespace=urn:WSPessoa
xmlns=http://www.w3.org/2001/XMLSchema;
   import namespace=http://schemas.xmlsoap.org/soap/encoding/; /
   complexType name=Pessoa
sequence
 element name=idade type=xsd:int /
 element name=nome nillable=true type=xsd:string /
/sequence
   /complexType
   complexType name=ArrayOfPessoa
complexContent
 restriction base=soapenc:Array
  attribute ref=soapenc:arrayType wsdl:arrayType=tns1:Pessoa[] /
 /restriction
/complexContent
   /complexType
  /schema


Does anyone know why this is wrong please?

Thanks in advance,

Fabrício.


This message was sent using IMP, the Internet Messaging Program.


RE: WSDL generated from reflection?

2005-10-12 Thread Grossberger, Guenter
See http://ws.apache.org/axis/java/user-guide.html#Java2WSDLBuildingWSDLFromJava

Best regards,

--
DI Günter Grossberger
Consultant Tel: +43 1 329 50 161
Software AG Österreich Fax: +43 1 329 50 171
Guglgasse 7-9  GSM: +43 676 833 29 261
1030 Wien  http://www.softwareag.com/austria
 

 -Original Message-
 From: Robert Nicholson [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, October 12, 2005 4:31 PM
 To: axis-user@ws.apache.org
 Subject: WSDL generated from reflection?
 
 I intend to replace a proprietory web framework with Axis but can  
 anybody tell me if Axis supports generation of WSDL using 
 reflection?  
 I don't care about the naming of arguments.
 


Re: WSDL generated from reflection?

2005-10-12 Thread Robert Nicholson
That suggests I can only generated static WSDL from my java source.  
I'm interested in generating WSDL dynamically from the signatures of  
public methods in my service's class.


On Oct 12, 2005, at 10:13 AM, Grossberger, Guenter wrote:

See http://ws.apache.org/axis/java/user- 
guide.html#Java2WSDLBuildingWSDLFromJava


Best regards,

--
DI Günter Grossberger
Consultant Tel: +43 1 329 50 161
Software AG Österreich Fax: +43 1 329 50 171
Guglgasse 7-9  GSM: +43 676 833 29 261
1030 Wien  http://www.softwareag.com/austria




-Original Message-
From: Robert Nicholson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 12, 2005 4:31 PM
To: axis-user@ws.apache.org
Subject: WSDL generated from reflection?

I intend to replace a proprietory web framework with Axis but can
anybody tell me if Axis supports generation of WSDL using
reflection?
I don't care about the naming of arguments.





Dynamic URL in Service Locator

2005-10-12 Thread Pujari, Ashish \(CONT\)
A Web Services client in a production environment will require to point
to different WSDL URL locations based on a application configuration
file. However, the WSDL2Java generated ServiceLocator has a hardcoded
URL and is stored in a jar. 

Is there any Axis feature that allows a client side URL configuration
file ?

Thanks,
Ashish


Re: performance

2005-10-12 Thread Jyrki Saarinen
On Wednesday 12 October 2005 17:07, Ron Reynolds wrote:
 Axis uses JAXP to find its XML parser and JAXP uses a set of rules to
 dictate what factory class to use to create its parsers, transformers, and
 so forth as defined here -
 http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/parsers/DocumentBuilderFa
ctory.html#newInstance()

Any ideas if Piccolo [1] is usable with Axis and Tomcat? It should be probably 
placed under $CATALINA_HOME/common/endorsed according to Tomcat 
classloader-howto documentation. 

[1]
http://piccolo.sourceforge.net/

Jyrki


Problem in Call.invokeBlocking when request has parameters[Axis2]

2005-10-12 Thread Uday Kamath



1. My wsdl (just 
part where it doesn't work) looks like 
message name="getPurchaseOrderById"


 part xmlns:partns="http://www.w3.org/2001/XMLSchema" 
type="partns:string" 
name="string" / 
 /message
message name="getPurchaseOrderByIdResponse"


 part xmlns:partns="java:examples.webservices.purchaseOrder.statelessSession" 
type="partns:PurchaseOrder" 
name="result" / 
 /message
operation name="getPurchaseOrderById"


 input message="tns:getPurchaseOrderById" / 


 output message="tns:getPurchaseOrderByIdResponse" / 

 /operation
operation name="getPurchaseOrderById"


 soap:operation style="rpc" 
soapAction="" / 

- input


 soap:body namespace="http://www.bea.com/examples/PurchaseOrder" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
use="encoded" / 
 /input

- output


 soap:body namespace="http://www.bea.com/examples/PurchaseOrder" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
use="encoded" / 
 /output
 /operation

2. 
My Client Code looks like 
//get the soap 
factory SOAPFactory factory = 
OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope 
envelope = factory.getDefaultEnvelope();
 envelope.declareNamespace("http://www.w3.org/2001/XMLSchema-instance", 
"xsi"); envelope.declareNamespace("http://www.w3.org/2001/XMLSchema","xsd");EndpointReference 
targetEPR = new 
EndpointReference(AddressingConstants.WSA_TO, 
"http://localhost:8001/webservice/PurchaseOrderService");OMNamespace 
poNameSpace = factory.createOMNamespace("http://www.bea.com/examples/PurchaseOrder", 
"m");OMNamespace defNs 
=factory.createOMNamespace("", ""); OMElement operation = 
factory.createOMElement("getPurchaseOrderById", 
poNameSpace); operation.addChild(getOMElement(factory, 
defNs, "string", "xsd:string", "1234")); 
envelope.getBody().addChild(operation); Call call = new 
Call(); call.setTo(targetEPR); 
call.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, 
false); //Blocking 
invocationOMElement result = (OMElement) 
call.invokeBlocking("getPurchaseOrderById", 
operation);

private static 
OMElement getOMElement(OMFactory factory, OMNamespace ns, String 
elementName, 
String type, String text) {OMElement part = 
factory.createOMElement(elementName, 
null);part.addAttribute("xsi:type", type, 
null);part.addChild(factory.createText(text));return 
part; }

3. This throws 
AxisFault with no Message, If i use this for soap operation where there is no 
parameters passed like getAllPurchaseOrders the same client code works fine. 

4. Also instead 
of using Call to do transport, if i open HttpConnection and get the envelope , 
read it through writer and pass it as byte stream it works fine for both 
getAllPurchaseOrders and getPurchaseOrdersById.Does Call need to do something 
more? If it works for getAllPurchaseOrders and not for getPurchaseOrderById i 
assumed i am not setting namespace etc right, but if this works using my 
HttpConnection i am lost...

Can anyone point 
if i am doing anything wrong?

-Uday




error in wsdl - help please

2005-10-12 Thread Patrick Cogan
Hi,

I get an error when the wsdl is passed by wsdl2java

When I use wsdl2java on my wsdl I get this error:

java.net.MalformedURLException: no protocol: src/java/TrackerService.wsdl

I have looked and looked, comared it with wsdls that do work and check
up on internet resources and I can't find anything wrong with it. Can
someone please have a look and see if they can find anything wrong with
it?

Thanks in advance, the wsdl is below,

Patrick

?xml version=1.0 encoding=UTF-8?
wsdl:definitions targetNamespace=http://www.xchanging.com/wsdl/claimtrack
 xmlns=http://schemas.xmlsoap.org/wsdl/
 xmlns:impl=http://www.xchanging.com/wsdl/claimtrack
 xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/
 xmlns:intf=http://www.xchanging.com/wsdl/claimtrack
 xmlns:exception=http://www.xchanging.com/types/exception
 xmlns:tns=http://www.xchanging.com/types/claimtrack
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/
 xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/
 wsdl:types

  !-- data namespace decleration --
   xsd:schema xmlns:xsd=http://www.w3.org/2001/XMLSchema
   

xmlns:data="" href="http://www.xchanging.com/types/data">http://www.xchanging.com/types/data
  

targetNamespace=http://www.xchanging.com/types/data
  

elementFormDefault=qualified

   xsd:complexType name=doDepartureParameters
xsd:sequence
  
  xsd:element name=barcode
type=xsd:string/
/xsd:sequence
   /xsd:complexType

   xsd:complexType name=doArrivalParameters
xsd:sequence
  
  xsd:element name=barcode
type=xsd:string/
  
  xsd:element name=brokerCode
type=xsd:string/
  
  xsd:element name=brokerRef
type=xsd:string/
  
  xsd:element name=busID
type=xsd:string/
/xsd:sequence
   /xsd:complexType

   xsd:complexType name=doDocManageParameters
xsd:sequence
  
  xsd:element name=depID
type=xsd:int nillable=true /
  
  xsd:element name=busID
type=xsd:int nillable=true /
  
  xsd:element name=barcode
type=xsd:string/
  
  xsd:element name=brokerCode
type=xsd:string/
  
  xsd:element name=brokerRef
type=xsd:string nillable=true /
  
  xsd:element name=xcsCFU
type=xsd:int nillable=true /
  
  xsd:element
name=xcsClaimRef type=xsd:string nillable=true /
  
  xsd:element name=dateOfLoss
type=xsd:long nillable=true /
  
  xsd:element name=osnd
type=xsd:string/
  
  xsd:element
name=internalFileRef type=xsd:string nillable=true /
  
  xsd:element name=comments
type=xsd:string nillable=true /
  
  xsd:element name=statusId
type=xsd:int /
  
  xsd:element
name=currUCRCount type=xsd:int nillable=true /
  
  xsd:element
name=transactionNumber type=xsd:string/
  
  xsd:element
name=sequenceNumber type=xsd:string/
  
  xsd:element name=userId
type=xsd:string nillable=true /
/xsd:sequence
   /xsd:complexType

   xsd:complexType name=response
xsd:sequence
  
  xsd:element name=response
type=xsd:boolean/
/xsd:sequence
   /xsd:complexType

  /xsd:schema

  !-- EXCEPTION namespace decleration --
   xsd:schema xmlns:xsd=http://www.w3.org/2001/XMLSchema
xmlns:exception=http://www.xchanging.com/types/exception
targetNamespace=http://www.xchanging.com/types/exception
elementFormDefault=qualified

xsd:complexType name=trackerJavaException
 xsd:sequence
  
  xsd:element
name=exceptionName type=xsd:string nillable=true /
  
  xsd:element
name=exceptionDetails type=xsd:string nillable=true /
 /xsd:sequence
/xsd:complexType
xsd:complexType name=databaseErrorException
 xsd:sequence
  
  xsd:element name=errorCode
type=xsd:string nillable=true /
  
  xsd:element name=message
type=xsd:string nillable=true /
 /xsd:sequence
/xsd:complexType
   /xsd:schema

  !-- TNS namespace decleration --
  xsd:schema xmlns:xsd=http://www.w3.org/2001/XMLSchema

xmlns:tns=http://www.xchanging.com/types/claimtrack

xmlns:data="" href="http://www.xchanging.com/types/data">http://www.xchanging.com/types/data

xmlns:array=http://www.xchanging.com/types/array

xmlns:exception=http://www.xchanging.com/types/exception
  

targetNamespace=http://www.xchanging.com/types/claimtrack

elementFormDefault=qualified

   xsd:import namespace=http://www.xchanging.com/types/array /
   xsd:import namespace=http://www.xchanging.com/types/data /
   xsd:import
namespace=http://www.xchanging.com/types/exception /

  
xsd:element name=doDeparture type=data:doDepartureParameters
/
   xsd:element name=doArrival type=data:doArrivalParameters /
  
xsd:element name=doDocManage type=data:doDocManageParameters
/

   xsd:element name=doDepartureResponse type=data:response /
   xsd:element name=doArrivalResponse type=data:response /
   xsd:element name=doDocManageResponse type=data:response /

  
xsd:element name=trackerJavaException
type=exception:trackerJavaException nillable=true /
  
xsd:element name=databaseErrorException
type=exception:databaseErrorException nillable=true /
  /xsd:schema
 /wsdl:types

 wsdl:message name=doDepartureRequest
  wsdl:part name=parameters element=tns:doDeparture /
 /wsdl:message
 wsdl:message name=doDepartureResponse
 

Re: Help with Axis Handlers!!

2005-10-12 Thread Soactive Inc
I think you are facing the same issues as in the following threads:

http://mail-archives.apache.org/mod_mbox/ws-axis-user/200503.mbox/[EMAIL PROTECTED]

http://www.mail-archive.com/axis-user@ws.apache.org/msg03143.html

Reasons I can think of are that when using the ((SOAPMessageContext)context).setMessage(soapMessage) API you may need to be careful to ensure that it isn't actually modifying the 'request' soapMessage.


That said, I think you still can resolve the problem that
you are facing, since really you are not trying to modify the request
message. 

In the response handler, you may want to try this:

/ some logic here to generate response...

org.apache.axis.MessageContext context = org.apache.axis.MessageContext.getCurrentContext();

context.setResponseMessage((Message) responseMessage);

return true;
  


Best,
-Arun

On 10/11/05, Mathew, Jose [EMAIL PROTECTED] wrote:







Well, I could track it down to Invocation arguments 
were modified exception in HandlerChainImpl class. Apparently axis checks to 
see if the original invocation arguments were modified in the postinvoke( ) 
method there. So does that mean that altering the SOAPBody in a handleris 
not allowed?? 

- Jose



From: Mathew, Jose Sent: Tuesday, 
October 11, 2005 8:53 AMTo: 
axis-user@ws.apache.orgSubject: RE: Help with Axis 
Handlers!!

Thanks 
Arun!

I have 
been using Axis' handlers, now I have switched to JAXPRC Handlers like you 
suggested. One problem, though.. in my scenario, I have just one Handler 
class, and I make use of the handleRequest (return false)and 
handleResponse (return true)methods to process my request and 
response, and completely avoid execution of the actual end point by 
returning false from handleRequest method. In my handleResponse, I need to 
set a new message into the messagecontext . I do it like 
this..

ByteArrayInputStream bis = new 
ByteArrayInputStream(response.getBytes());InputSource is = new 
InputSource((java.io.InputStream)bis);SOAPMessage 
soapMessage= 
MessageFactory.newInstance().createMessage();DocumentBuilder 
parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();Document 
soapDoc = 
parser.parse(is);soapMessage.getSOAPPart().getEnvelope().getBody().addDocument(soapDoc);((SOAPMessageContext)context).setMessage(soapMessage); 
// Is there a setResponseMessage( ) 
instead?((SOAPMessageContext)context).getMessage().writeTo(System.out);


The 
handleResponseproceeds with out any errors, but in the response at the 
client side, i keep getting a Server Error SOAP fault message. I am pretty 
sure that the message I am setting in the SOAPMessageContext is a 'good' SOAP 
message, since it was working while I was using Axis 
Handlers..

Any 
idea what is going wrong? Any help would be greatly 
appreciated.

Thanks 
again

Jose 
Mathew


From: Soactive Inc [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, October 09, 2005 1:04 AMTo: 
axis-user@ws.apache.orgSubject: Re: Help with Axis 
Handlers!!
You need to return false in the request handling function of the 
handler that you would like to skip rest of the handlers:public boolean 
handleRequest(MessageContext mc) { // some 
logic // once you decide to quit the remainder of the chain, 
set the appropriate response message and return false 
context.setResponseMessage(someResponseMessage); return 
false;}-Arun
On 10/7/05, Mathew, 
Jose [EMAIL PROTECTED] 
wrote: 

  I am using Axis 1.2
  As part of something I am trying to do, I 
  would like to break out of a Request handler I have for a service, and return 
  a SOAP response, without going further down the chain (skip deserialization 
  etc) . Is this possible? Can anyone help me with any tips? 

  Thanks.
  Jose 
Mathew




Re: performance

2005-10-12 Thread Ron Reynolds
from their documentation (http://piccolo.sourceforge.net/using.html) it 
certainly sounds like it could replace xerces
as the SAX parser (which i would expect is where most of the XML-oriented work 
happens - the serialiers don't seem to
use DOM - all the SerializationContext code seems to write directly into a 
Writer passed into its ctor).  it's
certainly worth a try - i'm seeing some fairly poor performance with axis 1.2.1 
on the local box (2 seconds to call a
method that only takes milliseconds to do the real work).  will have to do 
some performance measurements and see if
this helps.  another thing is axis does a lot of logging - turning that down 
should help at least a little (tho i
haven't looked at how much overhead is added by JCL when the underlying log4j 
category is turned off).  all the
reflection and lookup overhead the JCL does should only be when creating a new 
Log (and since all Logs are stored in
final static references that overhead is minor).

 On Wednesday 12 October 2005 17:07, Ron Reynolds wrote:
 Axis uses JAXP to find its XML parser and JAXP uses a set of rules to
 dictate what factory class to use to create its parsers, transformers, and
 so forth as defined here -
 http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/parsers/DocumentBuilderFa
ctory.html#newInstance()

 Any ideas if Piccolo [1] is usable with Axis and Tomcat? It should be probably
 placed under $CATALINA_HOME/common/endorsed according to Tomcat
 classloader-howto documentation.

 [1]
 http://piccolo.sourceforge.net/

 Jyrki





Re: performance

2005-10-12 Thread Eric Johnson

Jyrki,

Jyrki Saarinen wrote:


On Saturday 08 October 2005 01:19, Eric Johnson wrote:
 


In Axis 1.2.1, you probably want to set the system property
-Daxis.xml.reuseParsers=true.  In Axis 1.3, I believe the code was
changed so this is the default.
   

What this setting is supposed to do? At least on my application it seemed to 
slow it down a little bit..


 

The SAX parsers are reused, rather than being recreated for each parse.  
On my machine, in my testing, reusing parsers saved about 1ms on each 
request.


See: http://issues.apache.org/jira/browse/AXIS-2179.


Jyrki

 



Re: performance

2005-10-12 Thread Jyrki Saarinen
On Wednesday 12 October 2005 19:01, Ron Reynolds wrote:
 from their documentation (http://piccolo.sourceforge.net/using.html) it
 certainly sounds like it could replace xerces as the SAX parser (which i
 would expect is where most of the XML-oriented work happens - the
 serialiers don't seem to use DOM - all the SerializationContext code seems
 to write directly into a Writer passed into its ctor).  i

I placed Piccolo.jar to $CATALINA_HOME/common according to Tomcat's 
classloader howto, and this is what I got when I tried to access my web 
services with a browser: (normally Axis serves

Hi there, this is an AXIS service!
   Perhaps there will be a form for invoking the service here...)

org.apache.axis.InternalException: org.apache.axis.ConfigurationException: 
java
.lang.IllegalStateException: can't declare any more prefixes in this context
java.lang.IllegalStateException: can't declare any more prefixes in this 
contex
t
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:691)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
at 
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448
)

Jyrki


Re: performance

2005-10-12 Thread Jyrki Saarinen
On Wednesday 12 October 2005 19:06, Eric Johnson wrote:

 The SAX parsers are reused, rather than being recreated for each parse.
 On my machine, in my testing, reusing parsers saved about 1ms on each
 request.

 See: http://issues.apache.org/jira/browse/AXIS-2179.

Yep, I checked the Axis source and it should definately speed things up. My 
measurement of application slowing down with this setting must be noise then.

The other thing is that my remote methods are quite CPU consuming so this 
setting shouldn't effect that much.

How many ms a null op with Axis takes by the way?

Jyrki


Namespaces in SOAP messages generated by Axis API

2005-10-12 Thread Filippo Diotalevi
Hi, I have a problem using Axis APIs to call a wrapped
web service. The problem seems to be in the fact that
the soap message does not have namespaces
declarations.

My java code is:

Service  service = new Service();
Call call = (Call) service.createCall();
call.setEncodingStyle(null);
call.setTargetEndpointAddress( new java.net.URL(url)
);
call.setOperationStyle(Style.WRAPPED);
call.setOperationUse(Use.LITERAL);
//various registerTypeMapping s here...
QName name = new QName(http://ws.service.rc.nec;,
pubblicaRisorsaT1, m);
call.setOperationName( name );
call.addParameter(QNames.IN0, QNames.PUBBL_T1_REQ,
PubblicazioneRisorsaT1Req.class, ParameterMode.IN );
call.setReturnType(new
javax.xml.namespace.QName(http://ws.model.rc.nec;,
EsitoRichiesta, m1));
call.setReturnClass(EsitoRichiesta.class);
result = (EsitoRichiesta) call.invoke( new Object[]
{req} );


The SOAP message generated is:
soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
soapenv:Body
  pubblicaRisorsaT1 xmlns=http://ws.service.rc.nec;
in0
  credenzialiRichiesta
passwordeuolweqewq/password
usernameaweqwemmao/username
  /credenzialiRichiesta
  operazioneT1
dataOra2005-10-12T16:19:07.557Z/dataOra
noteNote/note
  /operazioneT1
/in0
  /pubblicaRisorsaT1
/soapenv:Body
/soapenv:Envelope

and it doesn't work because there's no indication of
the namespaces in elements credenzialiRichiesta,
password, username, operazioneT1 .

Am I missing any configuration step?

Thank you 

filippo








___ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it


Newbie: Recreating Zip file in MTOM service class?

2005-10-12 Thread Antony Grinyer
Hi,

Being an axis2 newbie, I've managed to create an MTOM client and
service, passing a Zip file to the service, however I'm unsure what to
do at the service end to recreate the zip? The example on the axis2
website just shows what to do with an image. Here's snippets of my code:

CLIENT:

 snip 

OMElement zip = fac.createOMElement(zip, omNs);
 
File file = new File(filePath);

byte[] bytes = new byte[(int)file.length()];
bytes = BDBXMLUtils.getBytesFromFile(file);
ByteArrayDataSource dataSource = new ByteArrayDataSource(bytes);
dataHandler = new DataHandler(dataSource);
OMText textData = fac.createText(dataHandler, true);
zip.addChild(textData);

 snip 

The do all the client calls to the addDocumentsAsZip web service method.

SERVICE:

public OMElement addDocumentsAsZip(OMElement element)
throws XMLStreamException
  {
OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespace omNs =
fac.createOMNamespace(http://some.namespace/anything;, anything);

OMElement zipEle = element.getFirstElement();
OMElement zipName = (OMElement) zipEle.getNextSibling();
OMText binaryNode = (OMText) zipEle.getFirstChild();
String fileName = zipName.getText();

DataHandler actualDH = (DataHandler)binaryNode.getDataHandler(); 

// Now, how do I get the data back into a zip?

 snip 

I know there's the Java util.zip package but how do I recreate my zip
from the DataHandler?

Any help gratefully appreciated.
Thanks,
Antony




client for document-style WebService

2005-10-12 Thread Carmine Gargiulo

Hi

i've a BIG problem

for my work i MUST ask infodata to document-style WebService.

In the net i've found a lot of example of clients for RPC-style WS...but  
not for document-style WebService.


In general the code was:

  String nameWS = http://localhost:8080/axis/services/wsRemote;;
  URL endPointWS = new URL(nameWS);

  // init
  Service service = new Service();
  Call call = (Call) service.createCall();

  call.setTargetEndpointAddress(endPointWS);
  call.setOperationName(getFileToString);

  String op1 = new String(myParam);

  call.addParameter(op1, XMLType.XSD_STRING, ParameterMode.IN);

  call.setReturnType(XMLType.XSD_STRING);

  ret = String.valueOf(call.invoke(new Object[] {op1}));



I'm junior of axis and WebService.and I think that for document-style  
WebService the cose above not is rith.


The WS give me a XML but i don't know ...how take this xmland if this  
XML is in HD or in memory or other.


Please help me!! I'S VERY URGENT

--
Carmine Gargiulo

Carmine Gargiulo usa il rivoluzionario client e-mail di Opera:  
http://www.opera.com/m2/



--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f

Sponsor:
Digitalpix stampa le tue migliori foto digitali 
* su vera carta fotografica professionale.

Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1532d=12-10


Re: client for document-style WebService

2005-10-12 Thread Brian Bonner
If you have the WSDL for a document-style webservice, you can use 
WSDL2Java to generate yourself a client that you can work with.  Then 
you can call the service using the generated client.


Brian



Carmine Gargiulo wrote:

Hi

i've a BIG problem

for my work i MUST ask infodata to document-style WebService.

In the net i've found a lot of example of clients for RPC-style 
WS...but not for document-style WebService.


In general the code was:

  String nameWS = http://localhost:8080/axis/services/wsRemote;;
  URL endPointWS = new URL(nameWS);

  // init
  Service service = new Service();
  Call call = (Call) service.createCall();

  call.setTargetEndpointAddress(endPointWS);
  call.setOperationName(getFileToString);

  String op1 = new String(myParam);

  call.addParameter(op1, XMLType.XSD_STRING, ParameterMode.IN);

  call.setReturnType(XMLType.XSD_STRING);

  ret = String.valueOf(call.invoke(new Object[] {op1}));



I'm junior of axis and WebService.and I think that for 
document-style WebService the cose above not is rith.


The WS give me a XML but i don't know ...how take this xmland if 
this XML is in HD or in memory or other.


Please help me!! I'S VERY URGENT

--Carmine Gargiulo

Carmine Gargiulo usa il rivoluzionario client e-mail di Opera: 
http://www.opera.com/m2/



--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f

Sponsor:
Digitalpix stampa le tue migliori foto digitali* su vera carta 
fotografica professionale.

Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1532d=12-10




Re: client for document-style WebService

2005-10-12 Thread Carmine Gargiulo

Whaat??? sure?? :D

WSDL2Java generate a client in java with call functions??


In data Wed, 12 Oct 2005 19:22:25 +0200, Brian Bonner  
[EMAIL PROTECTED] ha scritto:


If you have the WSDL for a document-style webservice, you can use  
WSDL2Java to generate yourself a client that you can work with.  Then  
you can call the service using the generated client.


Brian



Carmine Gargiulo wrote:

Hi

i've a BIG problem

for my work i MUST ask infodata to document-style WebService.

In the net i've found a lot of example of clients for RPC-style  
WS...but not for document-style WebService.


In general the code was:

  String nameWS = http://localhost:8080/axis/services/wsRemote;;
  URL endPointWS = new URL(nameWS);

  // init
  Service service = new Service();
  Call call = (Call) service.createCall();

  call.setTargetEndpointAddress(endPointWS);
  call.setOperationName(getFileToString);

  String op1 = new String(myParam);

  call.addParameter(op1, XMLType.XSD_STRING, ParameterMode.IN);

  call.setReturnType(XMLType.XSD_STRING);

  ret = String.valueOf(call.invoke(new Object[] {op1}));



I'm junior of axis and WebService.and I think that for  
document-style WebService the cose above not is rith.


The WS give me a XML but i don't know ...how take this xmland if  
this XML is in HD or in memory or other.


Please help me!! I'S VERY URGENT

--Carmine Gargiulo

Carmine Gargiulo usa il rivoluzionario client e-mail di Opera:  
http://www.opera.com/m2/



-- Email.it, the professional e-mail, gratis per te:  
http://www.email.it/f


Sponsor:
Digitalpix stampa le tue migliori foto digitali* su vera carta  
fotografica professionale.

Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1532d=12-10






--
Carmine Gargiulo

Carmine Gargiulo usa il rivoluzionario client e-mail di Opera:  
http://www.opera.com/m2/



--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f

Sponsor:
Problemi di Liquidità? Con Logos Finanziaria 30.000 € in 24 ore a dipendenti e 
lavoratori autonomi con rimborsi fino a 120 mesi, clicca qui
* 
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2911d=12-10


Re: WSDL generated from reflection?

2005-10-12 Thread Ron Reynolds
well, custom serializers support the writeSchema() method which allows one to 
return the XSD that the serialier will
accept so there MUST be a pluggable architecture in Axis for generating schemas 
on the fly (invoked via the
service-url?WSDL url).  digging through a bit of the Axis 1.2.1 code shows 
there is a method called
generateWSDL(MessageContext) on the org.apache.axis.Handler interface.  
org.apache.axis.handlers.soap.SOAPService
implements this method - might be a good place to start.  hth a little.
ron.

 That suggests I can only generated static WSDL from my java source.
 I'm interested in generating WSDL dynamically from the signatures of
 public methods in my service's class.

 On Oct 12, 2005, at 10:13 AM, Grossberger, Guenter wrote:

 See http://ws.apache.org/axis/java/user-
 guide.html#Java2WSDLBuildingWSDLFromJava

 Best regards,

 --
 DI Günter Grossberger
 Consultant Tel: +43 1 329 50 161
 Software AG Österreich Fax: +43 1 329 50 171
 Guglgasse 7-9  GSM: +43 676 833 29 261
 1030 Wien  http://www.softwareag.com/austria



 -Original Message-
 From: Robert Nicholson [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 12, 2005 4:31 PM
 To: axis-user@ws.apache.org
 Subject: WSDL generated from reflection?

 I intend to replace a proprietory web framework with Axis but can
 anybody tell me if Axis supports generation of WSDL using
 reflection?
 I don't care about the naming of arguments.







RE: WSDL generated from reflection?

2005-10-12 Thread Grossberger, Guenter
Hi!

I found class org.apache.axis.wsdl.fromJava.Emitter whose documentation says:
This class emits WSDL from Java classes. It is used by the ?WSDL Axis browser 
function and Java2WSDL commandline utility. See Java2WSDL and Java2WSDLFactory 
for more information.

So you could write your own fromClass.Emitter that uses reflection baseed on 
the fromJava.Emitter.

Best regards,
Guenter



 -Original Message-
 From: Ron Reynolds [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, October 12, 2005 7:36 PM
 To: axis-user@ws.apache.org
 Subject: Re: WSDL generated from reflection?
 
 well, custom serializers support the writeSchema() method 
 which allows one to return the XSD that the serialier will
 accept so there MUST be a pluggable architecture in Axis for 
 generating schemas on the fly (invoked via the
 service-url?WSDL url).  digging through a bit of the Axis 
 1.2.1 code shows there is a method called
 generateWSDL(MessageContext) on the org.apache.axis.Handler 
 interface.  org.apache.axis.handlers.soap.SOAPService
 implements this method - might be a good place to start.  hth 
 a little.
 ron.
 
  That suggests I can only generated static WSDL from my java source.
  I'm interested in generating WSDL dynamically from the signatures of
  public methods in my service's class.
 
  On Oct 12, 2005, at 10:13 AM, Grossberger, Guenter wrote:
 
  See http://ws.apache.org/axis/java/user-
  guide.html#Java2WSDLBuildingWSDLFromJava
 
  Best regards,
 
  --
  DI Günter Grossberger
  Consultant Tel: +43 1 329 50 161
  Software AG Österreich Fax: +43 1 329 50 171
  Guglgasse 7-9  GSM: +43 676 833 29 261
  1030 Wien  http://www.softwareag.com/austria
 
 
 
  -Original Message-
  From: Robert Nicholson [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, October 12, 2005 4:31 PM
  To: axis-user@ws.apache.org
  Subject: WSDL generated from reflection?
 
  I intend to replace a proprietory web framework with Axis but can
  anybody tell me if Axis supports generation of WSDL using
  reflection?
  I don't care about the naming of arguments.
 
 
 
 
 
 


RE: Dynamic URL in Service Locator

2005-10-12 Thread Grossberger, Guenter
The service locator has a fixed URL but you can specify a URL in the get
method of the service:

MyService service = new MyServiceLocator();
MyPortType proxy = service.getGPLAArchiv(targetURL);


Best regards,
Guenter
 

 -Original Message-
 From: Pujari, Ashish (CONT) [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, October 12, 2005 5:33 PM
 To: axis-user@ws.apache.org
 Subject: Dynamic URL in Service Locator
 
 A Web Services client in a production environment will 
 require to point
 to different WSDL URL locations based on a application configuration
 file. However, the WSDL2Java generated ServiceLocator has a hardcoded
 URL and is stored in a jar. 
 
 Is there any Axis feature that allows a client side URL configuration
 file ?
 
 Thanks,
 Ashish
 


Re: client for document-style WebService

2005-10-12 Thread Brian Bonner
It will create a proxy with the necessary entities. that reflect how the 
XML document is supposed to appear. You can then use these entities to 
craft a msg to submit to the appropriate operation.


i.e. if your WSDL is expecting a PriceCheckRequest document (and 
includes the appropriate schema info) as a parameter to an operation 
(for example: checkPrice) then it will generate the 
PriceCheckRequest.java class that knows how to serialize itself and it 
generates the proxy with the methods identified in the WSDL.


I hope that gives you what you want. try it out. It's nice. (btw, I 
can't guarantee that your Web Service that your consuming is defined 
correctly or has the appropriate corresponding WSDL to accommodate this).


Brian



Carmine Gargiulo wrote:

Whaat??? sure?? :D

WSDL2Java generate a client in java with call functions??


In data Wed, 12 Oct 2005 19:22:25 +0200, Brian Bonner 
[EMAIL PROTECTED] ha scritto:


If you have the WSDL for a document-style webservice, you can use 
WSDL2Java to generate yourself a client that you can work with. Then 
you can call the service using the generated client.


Brian



Carmine Gargiulo wrote:

Hi

i've a BIG problem

for my work i MUST ask infodata to document-style WebService.

In the net i've found a lot of example of clients for RPC-style 
WS...but not for document-style WebService.


In general the code was:

String nameWS = http://localhost:8080/axis/services/wsRemote;;
URL endPointWS = new URL(nameWS);

// init
Service service = new Service();
Call call = (Call) service.createCall();

call.setTargetEndpointAddress(endPointWS);
call.setOperationName(getFileToString);

String op1 = new String(myParam);

call.addParameter(op1, XMLType.XSD_STRING, ParameterMode.IN);

call.setReturnType(XMLType.XSD_STRING);

ret = String.valueOf(call.invoke(new Object[] {op1}));



I'm junior of axis and WebService.and I think that for 
document-style WebService the cose above not is rith.


The WS give me a XML but i don't know ...how take this xmland if 
this XML is in HD or in memory or other.


Please help me!! I'S VERY URGENT

--Carmine Gargiulo

Carmine Gargiulo usa il rivoluzionario client e-mail di Opera: 
http://www.opera.com/m2/



-- Email.it, the professional e-mail, gratis per te: 
http://www.email.it/f


Sponsor:
Digitalpix stampa le tue migliori foto digitali* su vera carta 
fotografica professionale.

Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1532d=12-10






--Carmine Gargiulo

Carmine Gargiulo usa il rivoluzionario client e-mail di Opera: 
http://www.opera.com/m2/



--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f

Sponsor:
Problemi di Liquidità? Con Logos Finanziaria 30.000 � in 24 ore a 
dipendenti e lavoratori autonomi con rimborsi fino a 120 mesi, clicca qui

*Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2911d=12-10




RE: error in wsdl - help please

2005-10-12 Thread Grossberger, Guenter



XMLSpy says: "The complex type of 'wsdlsoap:fault' does not 
allow attribute 'name' and no attribute wildcard matches 
it."

My wsdl:binding looks like this:

WSDL:binding name="MyBinding" type="tns:MyPortType" SOAP:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/ WSDL:operation name="myOperation" 
SOAP:operation 
soapAction=""/ WSDL:input 
SOAP:body 
use="literal"/
 /WSDL:input WSDL:output 
SOAP:body 
use="literal"/ 
/WSDL:output WSDL:fault name="myFault" 
SOAP:fault 
use="literal"/ 
/WSDL:fault /WSDL:operation/WSDL:binding

Best 
regards,Guenter

  
  
  From: Patrick Cogan 
  [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 12, 2005 
  5:41 PMTo: axis-user@ws.apache.orgSubject: error in wsdl 
  - help please
  Hi,I get an error when the wsdl is passed by 
  wsdl2javaWhen I use wsdl2java on my wsdl I get this 
  error:java.net.MalformedURLException: no protocol: 
  src/java/TrackerService.wsdlI have looked and looked, comared it with 
  wsdls that do work and check up on internet resources and I can't find 
  anything wrong with it. Can someone please have a look and see if they can 
  find anything wrong with it?Thanks in advance, the wsdl is 
  below,Patrick?xml version="1.0" 
  encoding="UTF-8"?wsdl:definitions targetNamespace="http://www.xchanging.com/wsdl/claimtrack" 
  xmlns="http://schemas.xmlsoap.org/wsdl/" 
  xmlns:impl="http://www.xchanging.com/wsdl/claimtrack" 
  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
  xmlns:intf="http://www.xchanging.com/wsdl/claimtrack" 
  xmlns:exception="http://www.xchanging.com/types/exception" 
  xmlns:tns="http://www.xchanging.com/types/claimtrack" 
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
  xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
  wsdl:types  !-- data 
  namespace decleration --   
  xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
 
   xmlns:data=""http://www.xchanging.com/types/data">http://www.xchanging.com/types/data" 

   targetNamespace="http://www.xchanging.com/types/data" 

   
  elementFormDefault="qualified" 
xsd:complexType 
  name="doDepartureParameters"  

  xsd:sequence  
 xsd:element 
  name="barcode" type="xsd:string"/  

  /xsd:sequence  
   /xsd:complexType 
xsd:complexType 
  name="doArrivalParameters"  

  xsd:sequence  
 xsd:element 
  name="barcode" type="xsd:string"/  
 xsd:element 
  name="brokerCode" type="xsd:string"/ 
  
  xsd:element name="brokerRef" type="xsd:string"/ 
  
  xsd:element name="busID" type="xsd:string"/ 
 
  /xsd:sequence  
   /xsd:complexType 
xsd:complexType 
  name="doDocManageParameters"  

  xsd:sequence  
 xsd:element 
  name="depID" type="xsd:int" nillable="true" / 
  
  xsd:element name="busID" type="xsd:int" nillable="true" 
  /   
xsd:element name="barcode" 
  type="xsd:string"/  
 xsd:element 
  name="brokerCode" type="xsd:string"/ 
  
  xsd:element name="brokerRef" type="xsd:string" nillable="true" 
  /   
xsd:element name="xcsCFU" 
  type="xsd:int" nillable="true" / 
  
  xsd:element name="xcsClaimRef" type="xsd:string" nillable="true" 
  /   
xsd:element name="dateOfLoss" 
  type="xsd:long" nillable="true" / 
  
  xsd:element name="osnd" type="xsd:string"/ 
  
  xsd:element name="internalFileRef" type="xsd:string" nillable="true" 
  /   
xsd:element name="comments" 
  type="xsd:string" nillable="true" / 
  
  xsd:element name="statusId" type="xsd:int" / 
  
  xsd:element name="currUCRCount" type="xsd:int" nillable="true" 
  /   
xsd:element name="transactionNumber" 
  type="xsd:string"/  
 xsd:element 
  name="sequenceNumber" type="xsd:string"/ 
  
  xsd:element name="userId" type="xsd:string" nillable="true" 
  /   
   /xsd:sequence 

  /xsd:complexType  
   xsd:complexType 
  name="response"  

  xsd:sequence  
 xsd:element 
  name="response" type="xsd:boolean"/ 
 
  /xsd:sequence  
   /xsd:complexType 
   /xsd:schema 
   !-- EXCEPTION namespace decleration 
  --   xsd:schema 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
 xmlns:exception="http://www.xchanging.com/types/exception" 
 targetNamespace="http://www.xchanging.com/types/exception" 
 
  elementFormDefault="qualified"  
xsd:complexType 
  name="trackerJavaException"  
 
  xsd:sequence  
 xsd:element 
  name="exceptionName" type="xsd:string" nillable="true" 
  /   
xsd:element name="exceptionDetails" 
  type="xsd:string" nillable="true" /  
 
  /xsd:sequence   
   /xsd:complexType  
xsd:complexType 
  name="databaseErrorException"  
 
  xsd:sequence  
 xsd:element 
  name="errorCode" type="xsd:string" nillable="true" / 
  
  xsd:element name="message" type="xsd:string" nillable="true" 
  /
   /xsd:sequence  

  /xsd:complexType   
  /xsd:schema  !-- TNS 
  namespace decleration --  
  xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  

RE: Newbie: Recreating Zip file in MTOM service class?

2005-10-12 Thread Grossberger, Guenter
How about

java.util.zip.ZipInputStream(actualDH.getInputStream());

Best regards,
Guenter


 -Original Message-
 From: Antony Grinyer [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, October 12, 2005 6:42 PM
 To: axis-user@ws.apache.org
 Subject: Newbie: Recreating Zip file in MTOM service class?
 
 Hi,
 
 Being an axis2 newbie, I've managed to create an MTOM client and
 service, passing a Zip file to the service, however I'm unsure what to
 do at the service end to recreate the zip? The example on the axis2
 website just shows what to do with an image. Here's snippets 
 of my code:
 
 CLIENT:
 
  snip 
 
 OMElement zip = fac.createOMElement(zip, omNs);
  
 File file = new File(filePath);
 
 byte[] bytes = new byte[(int)file.length()];
 bytes = BDBXMLUtils.getBytesFromFile(file);
 ByteArrayDataSource dataSource = new ByteArrayDataSource(bytes);
 dataHandler = new DataHandler(dataSource);
 OMText textData = fac.createText(dataHandler, true);
 zip.addChild(textData);
 
  snip 
 
 The do all the client calls to the addDocumentsAsZip web 
 service method.
 
 SERVICE:
 
 public OMElement addDocumentsAsZip(OMElement element)
 throws XMLStreamException
   {
 OMFactory fac = OMAbstractFactory.getOMFactory();
 OMNamespace omNs =
 fac.createOMNamespace(http://some.namespace/anything;, anything);
 
 OMElement zipEle = element.getFirstElement();
 OMElement zipName = (OMElement) zipEle.getNextSibling();
 OMText binaryNode = (OMText) zipEle.getFirstChild();
 String fileName = zipName.getText();
 
 DataHandler actualDH = (DataHandler)binaryNode.getDataHandler(); 
 
 // Now, how do I get the data back into a zip?
 
  snip 
 
 I know there's the Java util.zip package but how do I recreate my zip
 from the DataHandler?
 
 Any help gratefully appreciated.
 Thanks,
 Antony
 
 
 


RE: Dynamic URL in Service Locator

2005-10-12 Thread Pujari, Ashish \(CONT\)

https://bpcatalog.dev.java.net/nonav/soa/client-url-binding/

I do not know if Axis inherently allows externalization of WS client
binding. But the above link provides some solutions.

cheers,
Ashish 


Help -- WSDL2Java Question

2005-10-12 Thread Zhixiang He








Hi,



From the Axis users guide, it says for each entry in
the type section, a java class will be generated by WSDL2Java.



I have a wsdl file which defines 5 XMl data types in schema
part. Eclipse can generate 5 java classes (ContentType, ListRequestType,
ReturnedResultCount, SearchString and SummaryRequestType) based on the schema.
This makes sense.



If I use WSDL2Java to generate client side, I can only get 3
java classes (ContentType, ListRequestType and SummaryRequestType). 



Could someone tell me why? Do I need to give some options to
generate the other twos? The WSDL file is as following.



Thanks a lot. 

Helen





?xml version=1.0
encoding=UTF-8?



xsd:schema



 targetNamespace=http://www.company.com/RID.xsd1




xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/



 xmlns:xsd=http://www.w3.org/2001/XMLSchema



 xmlns:xsd1=http://www.company.com/RID.xsd1



 xsd:simpleType
name=summaryRequestType




xsd:restriction base=xsd:string




xsd:enumeration value=SUMMARY-RADIOLOGY/



 xsd:enumeration
value=SUMMARY-CARDIOLOGY/




xsd:enumeration value=SUMMARY/




xsd:enumeration value=SUMMARY-LABORATORY/




/xsd:restriction



 /xsd:simpleType



 xsd:simpleType
name=listRequestType




xsd:restriction base=xsd:string




xsd:enumeration value=LIST-ALLERGIES/




xsd:enumeration value=LIST-MEDS/




/xsd:restriction



 /xsd:simpleType



 !-- Please list all content types
available, and remove those not available. --



 xsd:simpleType
name=contentType




xsd:restriction base=xsd:string




xsd:enumeration value=text/html/




/xsd:restriction



 /xsd:simpleType



 !-- Indicates that this item is a
returned rows restriction --



 xsd:simpleType
name=ReturnedResultCount




xsd:restriction
base=xsd:positiveInteger
/xsd:restriction



 /xsd:simpleType



 !-- Please use the string
Search as a prefix for all search criteria, and list below --



 !-- Indicates that this item is a
search string --



 xsd:simpleType
name=SearchString




xsd:restriction base=xsd:string
/xsd:restriction



 /xsd:simpleType



/xsd:schema








How do you make wsdl2java classes extend my Abstract Paraent class?

2005-10-12 Thread Mick Knutson

I want my generated classes to extend my own Abstract class.
How can I do this?

Thank You
Mick Knutson

Sr. Java/J2EE Consultant
BASE logic, inc.
(415) 648-1804 (S.F., CA)
http://www.BASELogic.com

HP Consulting Services (Walnut Creek, CA)




How do you make wsdl2java classes extend my Abstract Paraent class?

2005-10-12 Thread Mick Knutson

I want my generated classes to extend my own Abstract class.
How can I do this?

Thank You
Mick Knutson

Sr. Java/J2EE Consultant
BASE logic, inc.
(415) 648-1804 (S.F., CA)
http://www.BASELogic.com

HP Consulting Services (Walnut Creek, CA)




Re: client for document-style WebService

2005-10-12 Thread Carmine Gargiulo

I've asked my work-boss and here's this:

the Webservice send to client a xml soap ...like this:

soap:Envelope xmlns=http://xml.apache.org/axis/wsdd/;  
xmlns:java=http://xml.apache.org/axis/wsdd/providers/java;  
encodingStyle=;

 soap:Body
familystatus
  input
opResidence/op
surnameSmith/surname
  /input
/familystatus
 /soap:Body
/soap:Envelope


I repeat: the webservice is document-style.

Now...the axis code for take this xml soap response??

In data Wed, 12 Oct 2005 19:48:57 +0200, Brian Bonner  
[EMAIL PROTECTED] ha scritto:


It will create a proxy with the necessary entities. that reflect how the  
XML document is supposed to appear. You can then use these entities to  
craft a msg to submit to the appropriate operation.


i.e. if your WSDL is expecting a PriceCheckRequest document (and  
includes the appropriate schema info) as a parameter to an operation  
(for example: checkPrice) then it will generate the  
PriceCheckRequest.java class that knows how to serialize itself and it  
generates the proxy with the methods identified in the WSDL.


I hope that gives you what you want. try it out. It's nice. (btw, I  
can't guarantee that your Web Service that your consuming is defined  
correctly or has the appropriate corresponding WSDL to accommodate this).


Brian



Carmine Gargiulo wrote:

Whaat??? sure?? :D

WSDL2Java generate a client in java with call functions??


In data Wed, 12 Oct 2005 19:22:25 +0200, Brian Bonner  
[EMAIL PROTECTED] ha scritto:


If you have the WSDL for a document-style webservice, you can use  
WSDL2Java to generate yourself a client that you can work with. Then  
you can call the service using the generated client.


Brian



Carmine Gargiulo wrote:

Hi

i've a BIG problem

for my work i MUST ask infodata to document-style WebService.

In the net i've found a lot of example of clients for RPC-style  
WS...but not for document-style WebService.


In general the code was:

String nameWS = http://localhost:8080/axis/services/wsRemote;;
URL endPointWS = new URL(nameWS);

// init
Service service = new Service();
Call call = (Call) service.createCall();

call.setTargetEndpointAddress(endPointWS);
call.setOperationName(getFileToString);

String op1 = new String(myParam);

call.addParameter(op1, XMLType.XSD_STRING, ParameterMode.IN);

call.setReturnType(XMLType.XSD_STRING);

ret = String.valueOf(call.invoke(new Object[] {op1}));



I'm junior of axis and WebService.and I think that for  
document-style WebService the cose above not is rith.


The WS give me a XML but i don't know ...how take this xmland if  
this XML is in HD or in memory or other.


Please help me!! I'S VERY URGENT

--Carmine Gargiulo

Carmine Gargiulo usa il rivoluzionario client e-mail di Opera:  
http://www.opera.com/m2/



-- Email.it, the professional e-mail, gratis per te:  
http://www.email.it/f


Sponsor:
Digitalpix stampa le tue migliori foto digitali* su vera carta  
fotografica professionale.

Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1532d=12-10






--Carmine Gargiulo

Carmine Gargiulo usa il rivoluzionario client e-mail di Opera:  
http://www.opera.com/m2/



-- Email.it, the professional e-mail, gratis per te:  
http://www.email.it/f


Sponsor:
Problemi di Liquidità? Con Logos Finanziaria 30.000 � in 24 ore a  
dipendenti e lavoratori autonomi con rimborsi fino a 120 mesi, clicca  
qui

*Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2911d=12-10






--
Carmine Gargiulo

Carmine Gargiulo usa il rivoluzionario client e-mail di Opera:  
http://www.opera.com/m2/



--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f

Sponsor:
Con la Pietra Naturale puoi grigliare carne, pesce e verdura direttamente in 
tavola!
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2743d=12-10


Serializing schema document

2005-10-12 Thread Anil Arora








I am using AXIS 1.1 and I am trying to serialize a schema
document within my SOAP response XML as so



I need to add some schema information to my return XML as so



soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ 


xmlns:xsd=http://www.w3.org/2001/XMLSchema 


xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance

soapenv:Header

 ns1:Session xsi:nil=true
xmlns:ns1=urn:schemas-microsoft-com:xml-analysis/

/soapenv:Header

soapenv:Body

 DiscoverResponse
xmlns=urn:schemas-microsoft-com:xml-analysis

 return

 ns2:root
xsi:type=ns2:RowResult
xmlns:ns2=urn:schemas-microsoft-com:xml-analysis:rowset

 xsd:schema elementFormDefault=qualified



targetNamespace=urn:schemas-microsoft-com:xml-analysis:rowset 


xmlns:sql=urn:schemas-microsoft-com:xml-sql




xsd:element name=root


xsd:complexType

 xsd:sequence
maxOccurs=unbounded minOccurs=0


xsd:element name=row type=row/

 /xsd:sequence


xsd:complexType

 /xsd:element


xsd:complexType name=row


xsd:sequence maxOccurs=unbounded minOccurs=0

 xsd:element
name=CATALOG_NAME sql:field=CATALOG_NAME
type=xsd:string/

 xsd:element
name=DESCRIPTION sql:field=DESCRIPTION
type=xsd:string/

 /xsd:sequence


 /xsd:complexType

 /xsd:schema

 ns2:row


CATALOG_NAMEInterlace/CATALOG_NAME


DESCRIPTIONInterlace Catalog/DESCRIPTION

 /ns2:row

 /ns2:root

 /return

 /DiscoverResponse

/soapenv:Body

/soapenv:Envelope







Since I had predefined xsd files, I figured that the best
way would be to get my xsd file, create a Document object using the javax
parsers, and then serialize the document using the DocumentSerializer.
However, when I do this, I get the following:



 DiscoverResponse
xmlns=urn:schemas-microsoft-com:xml-analysis

 return

 ns2:root
xsi:type=ns2:RowResult
xmlns:ns2=urn:schemas-microsoft-com:xml-analysis:rowset

 xsd:schema

 xsd:schema
elementFormDefault=qualified 

 targetNamespace=urn:schemas-microsoft-com:xml-analysis:rowset


 xmlns:sql=urn:schemas-microsoft-com:xml-sql

 ...


/xsd:schema

 /xsd:schema



 ...

 /ns2:root

 /return

 /DiscoverResponse





Notice that the xsd:schema is embedded within another
xsd:schema tag. If I try to call
context.writeDOMElement(document.getElement()) directly, I get close to what I
want, but it is not merging the namespaces like I would expect. It is
taking my xsd file as is. Is there a way I can merge the namespaces with
minimal code?



Thanks,

Anil












Problems with logging

2005-10-12 Thread Matteo Miraz
Hi!

I need to make an application that provides some web services. For
this purpose I created a new application named MyTest and I copied
the content of the axis-bin-1_2_1.tar.gz/axis-1_2_1/webapps/axis/ in
that folder. After I get all the required libraries (such as
activation.jar) so the validation test is satisfied. At this time, I
put in WEB-INF/classes all the compiled classes of my application (in
their folder) and I deployed the services using the administration
service.
In my classes I need to log something, so I wrote instructions like these:
  Log log = LogFactory.getLog(MyTest);
  log.debug(Test started);

once I deploy the application to tomcat, on the console I see the following rows

log4j:WARN No appenders could be found for logger
(org.apache.catalina.session.ManagerBase).
log4j:WARN Please initialize the log4j system properly.

and I can't see the log generated by my classes (I checked that they
work correctly)

somebody can help me?

Thanks, Matteo


Re: Problems with logging

2005-10-12 Thread Ron Reynolds
you need to place a log4j.properties file in your WEB-INF/classes directory so 
that log4j can load it and be happy (or
you need to remove the log4j jar from WEB-INF/lib which will leave you with jdk 
1.4 logging or jcl default logging (if
you're using jdk 1.3 or earlier).  i posted a suggested log4j.properties file a 
little while ago -
http://marc.theaimsgroup.com/?l=axis-userm=112855849027099w=2
hth.
..ron.
 Hi!

 I need to make an application that provides some web services. For
 this purpose I created a new application named MyTest and I copied
 the content of the axis-bin-1_2_1.tar.gz/axis-1_2_1/webapps/axis/ in
 that folder. After I get all the required libraries (such as
 activation.jar) so the validation test is satisfied. At this time, I
 put in WEB-INF/classes all the compiled classes of my application (in
 their folder) and I deployed the services using the administration
 service.
 In my classes I need to log something, so I wrote instructions like these:
   Log log = LogFactory.getLog(MyTest);
   log.debug(Test started);

 once I deploy the application to tomcat, on the console I see the following 
 rows

 log4j:WARN No appenders could be found for logger
 (org.apache.catalina.session.ManagerBase).
 log4j:WARN Please initialize the log4j system properly.

 and I can't see the log generated by my classes (I checked that they
 work correctly)

 somebody can help me?

 Thanks, Matteo





Re: Problems with logging

2005-10-12 Thread Matteo Miraz
Ok, I checked once again my configuration, and I found that
axis-ant.jar is not present in my new application's lib directory, and
inside that jar there is the log4.properties...

now I copied that file in WEB-INF/classes and the warning disappear...
but still no log from my code... any ideas?

thanks, teo

2005/10/12, Matteo Miraz [EMAIL PROTECTED]:
 Hi!

 I need to make an application that provides some web services. For
 this purpose I created a new application named MyTest and I copied
 the content of the axis-bin-1_2_1.tar.gz/axis-1_2_1/webapps/axis/ in
 that folder. After I get all the required libraries (such as
 activation.jar) so the validation test is satisfied. At this time, I
 put in WEB-INF/classes all the compiled classes of my application (in
 their folder) and I deployed the services using the administration
 service.
 In my classes I need to log something, so I wrote instructions like these:
   Log log = LogFactory.getLog(MyTest);
   log.debug(Test started);

 once I deploy the application to tomcat, on the console I see the following 
 rows

 log4j:WARN No appenders could be found for logger
 (org.apache.catalina.session.ManagerBase).
 log4j:WARN Please initialize the log4j system properly.

 and I can't see the log generated by my classes (I checked that they
 work correctly)

 somebody can help me?

 Thanks, Matteo



Re: Problems with logging

2005-10-12 Thread Ron Reynolds
you need to fix your log4j.properties file.  best reference i've found on how 
to write them is in the JavaDocs here -
http://logging.apache.org/log4j/docs/api/org/apache/log4j/PropertyConfigurator.html#doConfigure(java.lang.String,
org.apache.log4j.spi.LoggerRepository)

 Ok, I checked once again my configuration, and I found that
 axis-ant.jar is not present in my new application's lib directory, and
 inside that jar there is the log4.properties...

 now I copied that file in WEB-INF/classes and the warning disappear...
 but still no log from my code... any ideas?

 thanks, teo

 2005/10/12, Matteo Miraz [EMAIL PROTECTED]:
 Hi!

 I need to make an application that provides some web services. For
 this purpose I created a new application named MyTest and I copied
 the content of the axis-bin-1_2_1.tar.gz/axis-1_2_1/webapps/axis/ in
 that folder. After I get all the required libraries (such as
 activation.jar) so the validation test is satisfied. At this time, I
 put in WEB-INF/classes all the compiled classes of my application (in
 their folder) and I deployed the services using the administration
 service.
 In my classes I need to log something, so I wrote instructions like these:
   Log log = LogFactory.getLog(MyTest);
   log.debug(Test started);

 once I deploy the application to tomcat, on the console I see the following 
 rows

 log4j:WARN No appenders could be found for logger
 (org.apache.catalina.session.ManagerBase).
 log4j:WARN Please initialize the log4j system properly.

 and I can't see the log generated by my classes (I checked that they
 work correctly)

 somebody can help me?

 Thanks, Matteo






Axis 1.2 Message.getSOAPPartAsString( ) - redundant namespaces

2005-10-12 Thread Sonali J. Kanaujia



When using Axis's 
serializer code in Message.getSOAPPartAsString( ); to parse theSOAPEnvelope and serialize it as String, I see that default namespace gets appended to every 
element within the SOAP Body.


For example, if the inputSOAP Bodycontains:

parent 
xmlns=defaultNS
childhfkdsj/child
/parent

After Axis serializes it to a String it 
becomes:


parent 
xmlns=defaultNS
child 
xmlns=defaultNShfkdsj/child
/parent

Why is the 
additional default namespace getting added to the child element? Doesn't look 
like it's 
because of the parser feature http://xml.org/sax/features/namespaces=true. 
What is making Axis do this? Is there a way to turn it off?

Thanks,
Sonali


Re: client for document-style WebService

2005-10-12 Thread thilina madu
Hi,
here is some code that I am using to acces WS (that codeis properly work for my web service).I think it may helpful to soul your problem.
Even I am a junior to axis please send me any comment about this code segment.

//set endpoint refferenceEndpointReference targetEPR = new EndpointReference(AddressingConstants.WSA_TO, "http://127.0.0.1:8080/axis2/services/InteropTest/echoFloat");

 System.out.println("1. Echoing Floating point"); String text = ""; try { OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace
 ("http://example1.org/example1", "exam"); OMElement value = fac.createOMElement("Text", omNs);
 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
  try { text = br.readLine();} catch (IOException e) {  e.printStackTrace(); }
 value.setText(text); OMElement payload = value;
 Call call = new Call(); call.setTo(targetEPR); call.setTransportInfo(Constants.TRANSPORT_HTTP, 
 Constants.TRANSPORT_HTTP, false);
 //Blocking invocation  OMElement result = (OMElement) call.invokeBlocking("Getecho", payload);
 //another way to get result //OMElement result= call.invokeBlocking("echoFloat",payload); OMElement result= call.invokeBlocking("echoFloat",payload);

 StringWriter writer = new StringWriter(); result.serializeWithCache(XMLOutputFactory.newInstance().
 createXMLStreamWriter(writer)); writer.flush();
 System.out.println(result.getText());
madushan thilina
Brian Bonner [EMAIL PROTECTED] wrote:
If you have the WSDL for a document-style webservice, you can use WSDL2Java to generate yourself a client that you can work with. Then you can call the service using the generated client.BrianCarmine Gargiulo wrote: Hi i've a BIG problem for my work i MUST ask infodata to document-style WebService. In the net i've found a lot of example of clients for RPC-style  WS...but not for document-style WebService. In general the code was: String nameWS = "http://localhost:8080/axis/services/wsRemote"; URL endPointWS = new URL(nameWS); // init Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress(endPointWS);
 call.setOperationName("getFileToString"); String op1 = new String(myParam); call.addParameter("op1", XMLType.XSD_STRING, ParameterMode.IN); call.setReturnType(XMLType.XSD_STRING); ret = String.valueOf(call.invoke(new Object[] {op1})); I'm junior of axis and WebService.and I think that for  document-style WebService the cose above not is rith. The WS give me a XML but i don't know ...how take this xmland if  this XML is in HD or in memory or other. Please help me!! I'S VERY URGENT --Carmine Gargiulo Carmine Gargiulo usa il rivoluzionario client e-mail di Opera:  http://www.opera.com/m2/ --  Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Digitalpix stampa le tue migliori foto digitali* su vera carta 
 
 fotografica professionale. Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1532d=12-10
		 Yahoo! Music Unlimited - Access over 1 million songs. Try it free.