Settings for Java Webservice (used by C++-Client)

2005-06-02 Thread Falk Sippach
Hello,

I'm still trying to get running a Axis C++ client with a Axis Java
webservice. Disabling multirefs is working fine now. But I'm still have
problems.


For example is the type from string return values in some cases
soapenc:string (if I return a string array) instead of xsd:string (if I
return a single string). And in SoapDeSerializer.cpp the type is checked
only with URI_XSD and not URI_ENC. Therefore I get an empty string.

Which settings do I have to do at my Java webservice (message
style,...)? Are there more things to pay attention of? Is there a good
guide how to set up an Axis Java webservice with an Axis C++ client?

If I return integer values I do get an unhandled exception. Debugging
the AxisClient.dll has shown, that the delete of the member variable of
Int (Int intDeserializer) causes this. The delete happens in the stub
code (generated by WSDL2Ws), Int intDeserializer exists in
SoapDeSerializer.cpp.

Thanks for you help.

Falk.



Re: Settings for Java Webservice (used by C++-Client)

2005-06-02 Thread Adrian Dick
See remarks below.
___
Adrian Dick ([EMAIL PROTECTED])


Falk Sippach [EMAIL PROTECTED] wrote on 02/06/2005 10:45:01:

 Hello,

 I'm still trying to get running a Axis C++ client with a Axis Java
 webservice. Disabling multirefs is working fine now. But I'm still have
 problems.


 For example is the type from string return values in some cases
 soapenc:string (if I return a string array) instead of xsd:string (if I
 return a single string). And in SoapDeSerializer.cpp the type is checked
 only with URI_XSD and not URI_ENC. Therefore I get an empty string.

If you're building Axis C++ from source code, you could try applying this
patch (See attached file: SoapDeSerializer.cpp.patch), and seeing if this
resolves the problem.
Taking a skim through the SOAP 1.1 specification, I don't believe this is a
truly correct fix, as this URI_ENC appears to only be used for the String
type - as something to allow multi-ref support.


 If I return integer values I do get an unhandled exception. Debugging
 the AxisClient.dll has shown, that the delete of the member variable of
 Int (Int intDeserializer) causes this. The delete happens in the stub
 code (generated by WSDL2Ws), Int intDeserializer exists in
 SoapDeSerializer.cpp.

The serialization/deserialization of all the XSD simple types has just
(yesterday) been reworked, so you will hopefully find using the latest
nightly build resolves this problem.

SoapDeSerializer.cpp.patch
Description: Binary data


Re: impl vs. intf in array return types

2005-06-02 Thread Jan Delannoy
I don't think your problem is related to those namespace, it's
probably more to do with the way arrays are encoded (using
soapenc:Array).  You might want to try a document/literal approach
instead (style=DOCUMENT or WRAPPED in Java2Wsdl).

Regards,
Jan


On 6/2/05, Dave [EMAIL PROTECTED] wrote:
 Hi -
 
 We have some methods which return arrays of complex types. Some of
 them work fine, but others (although working fine for our test clients
 using axis stubs) seem to have problems for people using .net to
 integrate with our web services.
 
 I noticed that the methods causing problems are defined a bit
 differently in the wsdl. For example, if we have a java class MyWidget
 and a method in the service interface like:
 
 public MyWidget[] getMyWidgets()
 
 then the response type is defined as:
 
 wsdl:message name=getMyWidgetsResponse
 wsdl:part name=getMyWidgetsReturn type=impl:ArrayOfMyWidgets/
 /wsdl:message
 
 The array type gets defined like this:
 
complexType name=ArrayOfMyWidgets
 complexContent
  restriction base=soapenc:Array
   attribute ref=soapenc:arrayType wsdl:arrayType=impl:MyWidget[]/
  /restriction
 /complexContent
/complexType
 
 Other similar methods which don't have the problem are a bit different
 in the .wsdl, in that the return part has a type of
 intf:ArrayOfMyWidgets instead of impl:ArrayOfMyWidgets.
 
 wsdl:message name=getMyGoodWidgetsResponse
 wsdl:part name=getMyGoodWidgetsReturn type=int:ArrayOfMyGoodWidgets/
 /wsdl:message
 
 As far as I can tell the working and non-working methods are basically
 identical -- both have return types that are arrays of objects defined
 by us, and both are converted to web services using the same java2wsdl
 arguments.
 
 The error message for the people trying to use .net to integrate with
 us looks like this: Custom tool error: Unable to import
 WebService/Schema. Unable to import
 binding 'MyServiceSoapBinding' from namespace
 'urn:my_namespace'. Unable to import operation
 'getMyWidgets'. The datatype 'Array' is missing.
 
 I have no proof that the impl vs. intf difference is causing the
 problem, but it seems like the most likely candidate. Can anyone
 enlighten me about when java2wsdl uses intf: vs. impl: in defining a
 response type?
 
 Thanks!



org.xml.sax.SAXException: Bad envelope tag: html - What does it mean?

2005-06-02 Thread Christian Kunert








Hello,



i tested a Service which works fine yesterday but now
i get an AxisFault. 



AxisFault

faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

faultSubcode:

faultString: org.xml.sax.SAXException: Bad
envelope tag: html

faultActor:

faultNode:

faultDetail:



Any Ideas?

There are no changes at the wsdl file.





___
Produktion und Entwicklung
NEXNET GmbH
Am Borsigturm 12

13507 Berlin

Tel.:
+49 30 726297 411
Mail: [EMAIL PROTECTED]










AW: Java2WSDL options

2005-06-02 Thread Ferruh Zamangoer

Hi Jean,

thanks it woks :=).



-Ursprüngliche Nachricht-
Von: Jean [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 2. Juni 2005 09:53
An: axis-user@ws.apache.org
Betreff: Re: Java2WSDL options

Hi Ferruh,

Create the java class confuoco.ttp.webservice.CUserServiceSoapBindingImpl 
that implements confuoco.ttp.webservice.CUserService.  The -i option should 
point to CUserServiceSoapBindingImpl.

Then run
java -cp %AXISCLASSPATH% org.apache.axis.wsdl.Java2WSDL -o %1
-lhttp://localhost:8080/axis/services/%2; -n urn:webservice.ttp.confuoco
-i confuoco.ttp.webservice.%2SoapBindingImpl -pconfuoco.ttp.webservice 
urn:Confuoco
confuoco.ttp.webservice.%2

Java2WSDL usually creates the SoapBindingImpl class but I did it myself to 
get past this problem.

Regards,
Jean

- Original Message - 
From: Ferruh Zamangoer [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Thursday, June 02, 2005 9:42 AM
Subject: AW: Java2WSDL options


Hi Jean,

thanks for your reply I tried with the settings but it does not work ? In my
batch file I use:

I call the batch file with this two arguments:

run cus.wsdl CUserService class that implements the interface.

%1 == cus.wsdl
%2 == CUserService

java -cp %AXISCLASSPATH% org.apache.axis.wsdl.Java2WSDL -o %1
-lhttp://localhost:8080/axis/services/%2; -n urn:webservice.ttp.confuoco
-i confuoco.ttp.webservice.%2 -pconfuoco.ttp.webservice urn:Confuoco
confuoco.ttp.webservice.%2

Regards
Ferruh



-Ursprüngliche Nachricht-
Von: Jean [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 2. Juni 2005 08:50
An: axis-user@ws.apache.org
Betreff: Re: Java2WSDL options

Thanks for your reply I'am using eclipse do you know where I can set this
option in eclipse?

In Eclipse go to Project-properties then Java Compiler.

In the Classfile Generation box ensure that the debugger options are ticked
(add variable attributes to generated class files).

I also had to add the -i argument to Java2WSDL to point to a class that
implements the interface.


- Original Message - 
From: Ferruh Zamangoer [EMAIL PROTECTED]
To: axis-user@ws.apache.org; 'Anne Thomas Manes' [EMAIL PROTECTED]
Sent: Wednesday, June 01, 2005 2:14 PM
Subject: AW: Java2WSDL options


Hallo Anne,


Thanks for your reply I'am using eclipse do you know where I can set this
option in eclipse?


-Ursprüngliche Nachricht-
Von: Anne Thomas Manes [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 1. Juni 2005 13:59
An: axis-user@ws.apache.org
Betreff: Re: Java2WSDL options

Compile your class in debug mode.

On 6/1/05, Ferruh Zamangoer [EMAIL PROTECTED] wrote:



 Hi,



 is it possible when I use the Java2WSDL to generate my WSDL -Document to
 take over the attributes names. When I generate the WSDL file from the
 following interface:



public boolean unlockAccount(String pseudonym)

 throws RemoteException, ConfuocoException;



   wsdl:message name=unlockAccountRequest



   wsdl:part name=in0 type=soapenc:string/



/wsdl:message





 I see in the wsdl file name=in0 and have to edit it manually to the
right
 name. Are there any options to take over the right names?



 Thanks for any help.



 Regards

 Ferruh









Re: [wsdl2java] Exception Type ... is referenced but not defined

2005-06-02 Thread Mike Haller

Sorry I forgot:

i'm importing the schemas like this:
  wsdl:types
!-- Import the business datatypes schema file --
xsd:import schemaLocation=business.xsd 
namespace=http://www.innovations.de/2005/v1/XMLBusinessSchema/
xsd:import schemaLocation=xmldsig-core-schema.xsd 
namespace=http://www.w3.org/2000/09/xmldsig#/

  /wsdl:types



Mike Haller schrieb:

Hey people,

I've got:
- manually creates business.xsd with datatypes
- manually created business.wsdl
- using XML Security
- using Castor generated Java Classes

Because the Axis Ant tasks suck, i tried to use wsdl2java directly. 
However, i get the following error. It states that Reference (from XML 
Security) has not been defined, although a few lines earlier, it tells 
me that i tried to import it twice...


business.xsd imports xmlsecurity.xsd, business.wsdl imports 
xmlsecurity.xsd. both declare the namespaces and prefixes.


Another problem is that Axis generated deploy.wsdd has some  chars in 
places where they are not supposed to be...


Perhaps someone has any thoughts on my mistakes and can direct me into 
another direction.


kind regards
Mike

Parsing XML file:  file:src/business.wsdl
{http://www.w3.org/2000/09/xmldsig#}CryptoBinary already exists
{http://www.w3.org/2000/09/xmldsig#}Signature already exists
...
{http://www.w3.org/2000/09/xmldsig#}Reference already exists
{http://www.w3.org/2000/09/xmldsig#}ReferenceType already exists

Exception in thread main java.io.IOException: Type 
{http://www.w3.org/2000/09/xmldsig#}Reference is referenced but not 
defined.
at 
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:663) 

at 
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:543)
at 
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)
at 
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:493)

at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:360)
at java.lang.Thread.run(Thread.java:595)




convert from string to EndUserIdentifier type

2005-06-02 Thread Plorks mail

Hi all

I'm trying to access a remote web service.  I've done wsdl2java on the wsdl 
ile to generate the stubs


I'm now trying to call a method which takes 3 parameters (EndUserIdentifier 
a, EndUserIdentifier, b String c)


I'm trying to make the params a and b of type EndUserIdentifier, so i've 
done this


EndUserIdentifier a = tel:+44123456789;vnd.bt.cli-presentation=available;
EndUserIdentifier b = tel:+44123456789;vnd.bt.cli-presentation=available;

But i get the error cannot convert from string to EndUserIdentifier

Is anyone able to help me please to solve this problem

I've inc. EndUserIdentifier .java

Here's the wsdl i've used to dowsdl2java

http://uddi.bt.com/WSDL/parlayx/thirdpartycallservice/rpc-lit/parlayx_third_party_calling_service.wsdl

Here's my code

String c = 9f;

ThirdPartyCallServiceLocator locator = new ThirdPartyCallServiceLocator();
ThirdPartyCallBindingStub stub = 
(ThirdPartyCallBindingStub)locator.getPort(ThirdPartyCallPort.class);


stub.setUsername(username);
stub.setPassword(password);

String result = stub.makeACall(a, b, c);

_
It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! 
http://messenger.msn.co.uk

/**
rd
* EndUserIdentifier.java
*
* This file was auto-generated from WSDL
* by the Apache Axis WSDL2Java emitter.
*/

package org.csapi.www.schema.parlayx.common.v1_0;

public class EndUserIdentifier implements java.io.Serializable
{
   private org.apache.axis.types.URI value;

   public EndUserIdentifier()
{
   }

   public org.apache.axis.types.URI getValue()
{
   return value;
   }

   public void setValue(org.apache.axis.types.URI value)
{
   this.value = value;
   }

   private java.lang.Object __equalsCalc = null;

   public synchronized boolean equals(java.lang.Object obj)
{
   if (!(obj instanceof EndUserIdentifier)) return false;
   EndUserIdentifier other = (EndUserIdentifier) obj;
   if (obj == null) return false;
   if (this == obj) return true;
   if (__equalsCalc != null)
{
   return (__equalsCalc == obj);
   }
   __equalsCalc = obj;
   boolean _equals;
   _equals = true 
   ((this.value==null  other.getValue()==null) ||
(this.value!=null 
 this.value.equals(other.getValue(;
   __equalsCalc = null;
   return _equals;
   }

   private boolean __hashCodeCalc = false;
   public synchronized int hashCode()
{
   if (__hashCodeCalc) {
   return 0;
   }
   __hashCodeCalc = true;
   int _hashCode = 1;
   if (getValue() != null) {
   _hashCode += getValue().hashCode();
   }
   __hashCodeCalc = false;
   return _hashCode;
   }

   // Type metadata
   private static org.apache.axis.description.TypeDesc typeDesc =
   new org.apache.axis.description.TypeDesc(EndUserIdentifier.class);

   static {
   typeDesc.setXmlType(new 
javax.xml.namespace.QName(http://www.csapi.org/schema/parlayx/common/v1_0;, 
EndUserIdentifier));
   org.apache.axis.description.ElementDesc elemField = new 
org.apache.axis.description.ElementDesc();

   elemField.setFieldName(value);
   elemField.setXmlName(new javax.xml.namespace.QName(, value));
   elemField.setXmlType(new 
javax.xml.namespace.QName(http://www.w3.org/2001/XMLSchema;, anyURI));

   typeDesc.addFieldDesc(elemField);
   }

   /**
* Return type metadata object
*/
   public static org.apache.axis.description.TypeDesc getTypeDesc() {
   return typeDesc;
   }

   /**
* Get Custom Serializer
*/
   public static org.apache.axis.encoding.Serializer getSerializer(
  java.lang.String mechType,
  java.lang.Class _javaType,
  javax.xml.namespace.QName _xmlType) {
   return
 new  org.apache.axis.encoding.ser.BeanSerializer(
   _javaType, _xmlType, typeDesc);
   }

   /**
* Get Custom Deserializer
*/
   public static org.apache.axis.encoding.Deserializer getDeserializer(
  java.lang.String mechType,
  java.lang.Class _javaType,
  javax.xml.namespace.QName _xmlType) {
   return
 new  org.apache.axis.encoding.ser.BeanDeserializer(
   _javaType, _xmlType, typeDesc);
   }

}



Bug 1.2RC3-1.2: Using CommonsHttpClient fails

2005-06-02 Thread Andreas Bohnert

hi list,
I found a bug if the common http client is used. this bug can be 
reproduced with 1.2 final and 1.2.1 nightly build.

with 1.2RC3 it works fine!


with new releases I can't call my webservice from my client anymore. I 
get this:


2005-06-02 11:45:24,291 WARN  [main] httpclient.HttpMethodBase - Going 
to buf
fer response body of large or unknown size. Using getResponseAsStream 
instead

is recommended.
2005-06-02 11:45:24,298 ERROR [main] exchange.ExchangeServiceClient - 
(411)Le

ngth Required
AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (411)Length Required
faultActor:
faultNode:
faultDetail:
   {}:return code:  411
lt;!DOCTYPE HTML PUBLIC quot;-//IETF//DTD HTML 2.0//ENquot;gt;
lt;HTMLgt;lt;HEADgt;
lt;TITLEgt;411 Length Requiredlt;/TITLEgt;
lt;/HEADgt;lt;BODYgt;
lt;H1gt;Length Requiredlt;/H1gt;
A request of the requested method POST requires a valid 
Content-length.lt;P

gt;
chunked Transfer-Encoding forbidden: /exchangelt;Pgt;
lt;HRgt;
lt;ADDRESSgt;Apache/1.3.33 Server at www.myserver.net Port 80lt;/A
DDRESSgt;
lt;/BODYgt;lt;/HTMLgt;

   {http://xml.apache.org/axis/}HttpErrorCode:411

(411)Length Required
   at 
org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTT

PSender.java:208)
   at 
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStra

tegy.java:32)
   at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
   at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
   at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
   at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
   at org.apache.axis.client.Call.invoke(Call.java:2748)
   at org.apache.axis.client.Call.invoke(Call.java:2424)
   at org.apache.axis.client.Call.invoke(Call.java:2347)
   at org.apache.axis.client.Call.invoke(Call.java:1804)
   at 
at.weberhofer.eusoda.client.services.exchange.ExchangeSoapBindingS  
tub.lastChange(ExchangeSoapBindingStub.java:466)
   at 
at.weberhofer.eusoda.client.services.exchange.ExchangeServiceClien  
t.clientPollsTransaction(ExchangeServiceClient.java:90)
   at 
at.weberhofer.eusoda.client.services.exchange.ExchangeServiceClien  
t.replicate(ExchangeServiceClient.java:354)
   at 
at.weberhofer.eusoda.client.services.exchange.ExchangeServiceClien  
t.replicate(ExchangeServiceClient.java:233)
   at 
at.weberhofer.eusoda.client.services.exchange.ExchangeServiceMain.  
main(ExchangeServiceMain.java:38)



should I but this in the bug database?
regards, andreas




axis soap monitor

2005-06-02 Thread Omar Bennani
hi
I wanna use tcpmon, the soap monitor of axis but how
can i now which port does my client use to connect
with the webservice on localhost:8088 ? 
thanx for all






_ 
Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos mails, 
photos et vidéos ! 
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com


Re: impl vs. intf in array return types

2005-06-02 Thread Anne Thomas Manes
Please provide us the WSDL in question.

On 6/2/05, Dave [EMAIL PROTECTED] wrote:
 Thanks, Jan.
 
 Unfortunately we don't have the option of changing service styles at
 this point in the project.
 
 We have learned that there are lots of interop issues with array
 types, but I'm trying to pin down this particular difference between
 what should be identically defined return types to see if it might be
 causing a problem here.
 
 On 6/2/05, Jan Delannoy [EMAIL PROTECTED] wrote:
  I don't think your problem is related to those namespace, it's
  probably more to do with the way arrays are encoded (using
  soapenc:Array).  You might want to try a document/literal approach
  instead (style=DOCUMENT or WRAPPED in Java2Wsdl).
 
  Regards,
  Jan
 
 
  On 6/2/05, Dave [EMAIL PROTECTED] wrote:
   Hi -
  
   We have some methods which return arrays of complex types. Some of
   them work fine, but others (although working fine for our test clients
   using axis stubs) seem to have problems for people using .net to
   integrate with our web services.
  
   I noticed that the methods causing problems are defined a bit
   differently in the wsdl. For example, if we have a java class MyWidget
   and a method in the service interface like:
  
   public MyWidget[] getMyWidgets()
  
   then the response type is defined as:
  
   wsdl:message name=getMyWidgetsResponse
   wsdl:part name=getMyWidgetsReturn type=impl:ArrayOfMyWidgets/
   /wsdl:message
  
   The array type gets defined like this:
  
  complexType name=ArrayOfMyWidgets
   complexContent
restriction base=soapenc:Array
 attribute ref=soapenc:arrayType 
   wsdl:arrayType=impl:MyWidget[]/
/restriction
   /complexContent
  /complexType
  
   Other similar methods which don't have the problem are a bit different
   in the .wsdl, in that the return part has a type of
   intf:ArrayOfMyWidgets instead of impl:ArrayOfMyWidgets.
  
   wsdl:message name=getMyGoodWidgetsResponse
   wsdl:part name=getMyGoodWidgetsReturn type=int:ArrayOfMyGoodWidgets/
   /wsdl:message
  
   As far as I can tell the working and non-working methods are basically
   identical -- both have return types that are arrays of objects defined
   by us, and both are converted to web services using the same java2wsdl
   arguments.
  
   The error message for the people trying to use .net to integrate with
   us looks like this: Custom tool error: Unable to import
   WebService/Schema. Unable to import
   binding 'MyServiceSoapBinding' from namespace
   'urn:my_namespace'. Unable to import operation
   'getMyWidgets'. The datatype 'Array' is missing.
  
   I have no proof that the impl vs. intf difference is causing the
   problem, but it seems like the most likely candidate. Can anyone
   enlighten me about when java2wsdl uses intf: vs. impl: in defining a
   response type?
  
   Thanks!
  
 



Re: Bug 1.2RC3-1.2: Using CommonsHttpClient fails

2005-06-02 Thread Mike Moran


On 2 Jun 2005, at 12:27, Andreas Bohnert wrote:


hi list,
I found a bug if the common http client is used. this bug can be 
reproduced with 1.2 final and 1.2.1 nightly build.

with 1.2RC3 it works fine!


with new releases I can't call my webservice from my client anymore. I 
get this:

[ ... content length related trace ... ]

This sounds like what I found:

The problem is that, because
CommonsHTTPSender.MessageRequestEntity#getContentLength() is defined to
only return a content-length when the HTTP version is 1.0 *and* no
exception is thrown from message.getContentLength(), then it will not
even try if the HTTP version is 1.1. The upshot of this is that a
Transfer-Encoding: chunked header is set on the request.

 (see http://marc.theaimsgroup.com/?l=axis-devm=111523156110949w=2)


should I but this in the bug database?


I think you should. I didn't put it in because it only affected me and 
I patched the src to work round it. It's also technically ok, I think, 
but from what you've found it seems like it might not or it might make 
sense to always default to sending content-length; I can't see any 
reason why Transfer-Encoding: chunked is the default.


--
Mike http://www.houseofmoran.com/blog/



Re: [wsdl2java] Exception Type ... is referenced but not defined

2005-06-02 Thread Anne Thomas Manes
You must import schemas into a schema. Therefore you should define it this way:

 wsdl:types
  xsd:schema targetNamespace=your-wsdl-targetNamespace
!-- Import the business datatypes schema file --
xsd:import schemaLocation=business.xsd
namespace=http://www.innovations.de/2005/v1/XMLBusinessSchema/
xsd:import schemaLocation=xmldsig-core-schema.xsd
namespace=http://www.w3.org/2000/09/xmldsig#/
  /xsd:schema
 /wsdl:types

Anne

On 6/2/05, Mike Haller [EMAIL PROTECTED] wrote:
 Sorry I forgot:
 
 i'm importing the schemas like this:
wsdl:types
  !-- Import the business datatypes schema file --
  xsd:import schemaLocation=business.xsd
 namespace=http://www.innovations.de/2005/v1/XMLBusinessSchema/
  xsd:import schemaLocation=xmldsig-core-schema.xsd
 namespace=http://www.w3.org/2000/09/xmldsig#/
/wsdl:types
 
 
 
 Mike Haller schrieb:
  Hey people,
 
  I've got:
  - manually creates business.xsd with datatypes
  - manually created business.wsdl
  - using XML Security
  - using Castor generated Java Classes
 
  Because the Axis Ant tasks suck, i tried to use wsdl2java directly.
  However, i get the following error. It states that Reference (from XML
  Security) has not been defined, although a few lines earlier, it tells
  me that i tried to import it twice...
 
  business.xsd imports xmlsecurity.xsd, business.wsdl imports
  xmlsecurity.xsd. both declare the namespaces and prefixes.
 
  Another problem is that Axis generated deploy.wsdd has some  chars in
  places where they are not supposed to be...
 
  Perhaps someone has any thoughts on my mistakes and can direct me into
  another direction.
 
  kind regards
  Mike
 
  Parsing XML file:  file:src/business.wsdl
  {http://www.w3.org/2000/09/xmldsig#}CryptoBinary already exists
  {http://www.w3.org/2000/09/xmldsig#}Signature already exists
  ...
  {http://www.w3.org/2000/09/xmldsig#}Reference already exists
  {http://www.w3.org/2000/09/xmldsig#}ReferenceType already exists
 
  Exception in thread main java.io.IOException: Type
  {http://www.w3.org/2000/09/xmldsig#}Reference is referenced but not
  defined.
  at
  org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:663)
 
  at
  org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:543)
  at
  org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)
  at
  org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:493)
  at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:360)
  at java.lang.Thread.run(Thread.java:595)
 



Re: Bug 1.2RC3-1.2: Using CommonsHttpClient fails

2005-06-02 Thread Andreas Bohnert

Yepp, I just did it.
But maybe it would be helpful to post your fix to the database as well?!
what do you think?

regards,
andreas

Mike Moran wrote:


On 2 Jun 2005, at 12:27, Andreas Bohnert wrote:


hi list,
I found a bug if the common http client is used. this bug can be 
reproduced with 1.2 final and 1.2.1 nightly build.

with 1.2RC3 it works fine!


with new releases I can't call my webservice from my client anymore. 
I get this:

[ ... content length related trace ... ]

This sounds like what I found:

The problem is that, because
CommonsHTTPSender.MessageRequestEntity#getContentLength() is defined to
only return a content-length when the HTTP version is 1.0 *and* no
exception is thrown from message.getContentLength(), then it will not
even try if the HTTP version is 1.1. The upshot of this is that a
Transfer-Encoding: chunked header is set on the request.

 (see http://marc.theaimsgroup.com/?l=axis-devm=111523156110949w=2)


should I but this in the bug database?


I think you should. I didn't put it in because it only affected me and 
I patched the src to work round it. It's also technically ok, I think, 
but from what you've found it seems like it might not or it might make 
sense to always default to sending content-length; I can't see any 
reason why Transfer-Encoding: chunked is the default.






RE: No deserializer for {http://www.w3.org/2001/XMLSchema}anyType

2005-06-02 Thread Manuel Nicolas Ortuño
Thank you for your help.

-Mensaje original-
De: Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
Enviado el: jueves, 02 de junio de 2005 13:48
Para: axis-user@ws.apache.org; [EMAIL PROTECTED]
Asunto: Re: No deserializer for {http://www.w3.org/2001/XMLSchema}anyType

Your schema defines no type for this element:

xsd:element name=DESC_CAB
xsd:annotation
xsd:documentation
Descripción global del expediente
/xsd:documentation
/xsd:annotation
/xsd:element

It's a local element in this complexType definition:

   xsd:complexType name=EXPEDIENTE_CONTABLEType

By default, the element is assigned a type of xsd:anyType. 
Provide a type for this element, and it should work better.

Anne


On 6/2/05, Manuel Nicolas Ortuño [EMAIL PROTECTED] wrote:
  
  
 
 Hello, 
 
   
 
 I have created a client with wsdl2java, when I call the web service throw
 the exception 
 
   
 
   
 
 02-jun-2005 12:24:47 org.apache.axis.client.Call invoke 
 
 GRAVE: Exception: 
 
 org.xml.sax.SAXException: No deserializer for
 {http://www.w3.org/2001/XMLSchema}anyType 
 
   at

org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.
java:310)
 
   at

org.apache.axis.encoding.DeserializationContext.startElement(Deserialization
Context.java:1035)
 
   at

org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
 
   at

org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:
1140)
 
   at
 org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
 
   at
 org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
 
   at org.apache.axis.client.Call.invoke(Call.java:2448)
 
   at org.apache.axis.client.Call.invoke(Call.java:2347)
 
   at org.apache.axis.client.Call.invoke(Call.java:1804)
 
   at

es.carm.ctyc.wc.sigepal.obtenerec.IM_OBTENERECBindingStub.IM_OBTENEREC(IM_OB
TENERECBindingStub.java:346)
 
   at
 es.carm.ctyc.wc.sigepal.obtenerec.prueba.main(prueba.java:78)
 
 AxisFault 
 
  faultCode:
 {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 
  faultSubcode: 
 
  faultString: org.xml.sax.SAXException: No deserializer for
 {http://www.w3.org/2001/XMLSchema}anyType 
 
  faultActor: 
 
  faultNode: 
 
  faultDetail: 
 
  
 {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException:
 No deserializer for
 {http://www.w3.org/2001/XMLSchema}anyType 
 
   at

org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.
java:310)
 
   at

org.apache.axis.encoding.DeserializationContext.startElement(Deserialization
Context.java:1035)
 
   at

org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
 
   at

org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:
1140)
 
   at
 org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
 
   at
 org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
 
   at org.apache.axis.client.Call.invoke(Call.java:2448)
 
   at org.apache.axis.client.Call.invoke(Call.java:2347)
 
   at org.apache.axis.client.Call.invoke(Call.java:1804)
 
   at

es.carm.ctyc.wc.sigepal.obtenerec.IM_OBTENERECBindingStub.IM_OBTENEREC(IM_OB
TENERECBindingStub.java:346)
 
   at
 es.carm.ctyc.wc.sigepal.obtenerec.prueba.main(prueba.java:78)
 
   
 
   {http://xml.apache.org/axis/}hostname:r114pc269 
 
   
 
 org.xml.sax.SAXException: No deserializer for
 {http://www.w3.org/2001/XMLSchema}anyType 
 
   at
 org.apache.axis.AxisFault.makeFault(AxisFault.java:101) 
 
   at org.apache.axis.client.Call.invoke(Call.java:2451)
 
   at org.apache.axis.client.Call.invoke(Call.java:2347)
 
   at org.apache.axis.client.Call.invoke(Call.java:1804)
 
   at

es.carm.ctyc.wc.sigepal.obtenerec.IM_OBTENERECBindingStub.IM_OBTENEREC(IM_OB
TENERECBindingStub.java:346)
 
   at
 es.carm.ctyc.wc.sigepal.obtenerec.prueba.main(prueba.java:78)
 
 Caused by: org.xml.sax.SAXException: No deserializer for
 {http://www.w3.org/2001/XMLSchema}anyType 
 
   at

org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.
java:310)
 
   at

org.apache.axis.encoding.DeserializationContext.startElement(Deserialization
Context.java:1035)
 
   at

org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
 
   at

org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:
1140)
 
   at
 org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
 
   at
 org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
 
   at org.apache.axis.client.Call.invoke(Call.java:2448)
 
   ... 4 more 
 
   
 
 The soap response is: 
 
 

Duplicate operation with name=xxx

2005-06-02 Thread Jens Ahlin
Hi,

I have a problem generating java stubs from a wsdl. I get error message
Duplicate operation with name=method, found in portType PortName

The following part of the wsdl seams to cause the error:


wsdl:portType name=PortName
wsdl:operation name=method
  wsdl:input name=methodB message=tns:methodBSoapIn /
  wsdl:output name=methodB message=tns:methhodBSoapOut /
/wsdl:operation
wsdl:operation name=method
  wsdl:input message=tns:methodASoapIn /
  wsdl:output message=tns:methodASoapOut /
/wsdl:operation
..

I think the wsdl is generated using MS .NET

Does anyone know what the problem is ?

Regards,

Jens


web service error handling design issue

2005-06-02 Thread James Taylor
Hey,
another design issue on a different note. In our college course we a told to
propogate error up to the top layer/controller and deal with them appropriately.
What's the best way to deal with errors in the case of web services? Should I
catch the exception and return an appropriate fault node/code and deal with
this in the client code or catch the error at the service provider top level
and return an appropriate explanation?
Just looking for ideas and what way is it done in industry.
Thanks to anyone that gives my the time to answer,
  James.


--
Between the question and the answer lies free will


application design issue

2005-06-02 Thread James Taylor
Hey folks,
  just got a question on a design issue regarding web services.
  I have a rpc web service that returns information as an xml string.
How would I add this xml to the soap message?? Would I be better off using JAXM
if I'm doing this as I'm not passing objects just String which bassically are
documents?
  Regards,
  James.

--
Between the question and the answer lies free will


RE: application design issue

2005-06-02 Thread Kiran Kumar
Hi, I am also having the same requirement and exploring different options.One 
option which I am currently exploring :
 
Switch from 'RPC' style to 'Document'/'Wrapped'. Then define a XSD for your 
response XML and import that XSD in wsdl:types. Refer the import XSD type in 
port and message response elements. 
 
Run the WSDL2Java , which will generate the VOs for the corresponding elements 
that you defined in your XSD. Populate these VOs with data in your service 
impelmentation class.
 
This should solve the problem. 
 
PS: Apache Axis uses BeanSerializerFactory, BeanDeserializerFactory (refer 
generated deploy.wsdd file) to bind java objects with XML.
 
Regards, Kiran



From: James Taylor [mailto:[EMAIL PROTECTED]
Sent: Thu 6/2/2005 9:22 AM
To: axis-user@ws.apache.org
Subject: application design issue



Hey folks,
  just got a question on a design issue regarding web services.
  I have a rpc web service that returns information as an xml string.
How would I add this xml to the soap message?? Would I be better off using JAXM
if I'm doing this as I'm not passing objects just String which bassically are
documents?
  Regards,
  James.

--
Between the question and the answer lies free will





This e-mail, and any attachments thereto, is confidential and is intended only 
for the individual(s) named.  If you are not the intended recipient, please let 
us know by e-mail reply and delete it from your system; do not copy/save this 
e-mail or disclose its contents to anyone.  E-mail transmissions cannot be 
guaranteed to be secure or error-free as the transmission could be interrupted, 
corrupted, lost, destroyed, altered, arrive late or contain viruses.  
ObjectWave does not accept liability for any errors or omissions in the 
contents of this e-mail which arise as a result of e-mail transmission.  The 
views expressed in this e-mail do not necessarily reflect those of ObjectWave 
or its affiliates.




winmail.dat

Apache Axis - XMLBeans

2005-06-02 Thread Kiran Kumar

Friends, I have some 
peculiar requirement.. I have an application which has the business logic 
implemented in plain POJOs. These POJOs use XMLBeans to generate the XML 
response in 'String' format. I have EJBs which are calling these POJOs to 
generate the response in XML String format. 

Now I have a requirement to expose these 
POJOs into web-services. But POJOs are returning XML in String Format and I 
donot want to use 'RPC' style web-services. If I switch to document/wrapped 
style web services, Axis has its own way of mapping XMLs with Java Beans. Axis 
generates its own VOs and we need to populate those VOs in our service 
implementation to get the response in XML, which I am already achieving through 
XMLBeans, so it is redundant.

Is there any way I can instruct Axis to use 
XMLBeans ?

Or is there any other mechanism where in I 
can return XMLs in the SOAP response ?

Thanks
Kiran

This e-mail, and any attachments thereto, is confidential and is intended only for the individual(s) named. If you are not the intended recipient, please let us know by e-mail reply and delete it from your system; do not copy/save this e-mail or disclose its contents to anyone. E-mail transmissions cannot be guaranteed to be secure or error-free as the transmission could be interrupted, corrupted, lost, destroyed, altered, arrive late or contain viruses. ObjectWave does not accept liability for any errors or omissions in the contents of this e-mail which arise as a result of e-mail transmission. The views expressed in this e-mail do not necessarily reflect those of ObjectWave or its affiliates.


BeanSerializer and WSDL

2005-06-02 Thread Christoph Meier
Hi!

We are developing a document style web service using AXIS. I know it is
possible to serialize java beans and send them with SOAP.

Is this Axis / Apache SOAP specific? How can I describe such a service
in a WSDL file (especially types part)?

What I have to mention: I don't have AXIS generated stubs at the client
side because I use a tool for web service orchestration
(http://www.jopera.org), that has it's own SOAP engine and uses only the
WSDL file.

Is it only possible if I define the bean's XML schema in the WSDL file?

Thanks a lot for your help. I don't find much information on this topic
in the web.


Chris



How to replace default type mapping?

2005-06-02 Thread Robert Kasunic
Hi all,

I need to replace the existing default type mapping for xsd:anyURI, i. e. get 
Axis to put data of that type into an instance of a special Java class.

Is that possible by putting a typeMapping like the following into the WSDD file?

typeMapping
  xmlns:ns=http://www.w3.org/2001/XMLSchema;
  qname=anyURI
  type=java:xxx.MyURIClass
  serializer=org.apache.axis.encoding.ser.SimpleSerializerFactory
  deserializer=org.apache.axis.encoding.ser.SimpleDeserializerFactory
  encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
/

I tried that to no avail - Axis still uses its standard datatype 
org.apache.axis.types.URI.

So, how can I override a default type mapping?

Thanks,
Robert
__
Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
weltweit telefonieren! http://freephone.web.de/?mc=021201



RE: BeanSerializer and WSDL

2005-06-02 Thread Kiran Kumar
Hi, Apache Axis has its own BeanSerializer and BeanDeserializer. However Axis 
supports Castor also.
 
It is a 2 step process..
 
(1) One Define XSD 
(2) Import XSD in your WSDL : Ex- (stockQuote XSD is imported and refer that 
element in port and message tags)
 =
 definitions
  
targetNamespace=http://w3.ibm.com/schemas/services/2002/11/15/stockquote/wsdl;
  xmlns=http://schemas.xmlsoap.org/wsdl/;
  xmlns:tns=http://w3.ibm.com/schemas/services/2002/11/15/stockquote/wsdl;
  xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
  xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
  xmlns:types=http://w3.ibm.com/schemas/services/2002/11/15/stockquote;
   types
 xsd:schema elementFormDefault=qualified
targetNamespace=

http://w3.ibm.com/schemas/services/2002/11/15/stockquote/wsdl/importtypes;
  import namespace=
http://w3.ibm.com/schemas/services/2002/11/15/stockquote;
 location=StockQuote.xsd /
 /xsd:schema
   /types
   message name=getStockQuoteReq
 part name=parameters element=types:getStockQuote /
   /message
   message name=getStockQuoteResp
 part name=parameters element=types:getStockQuoteResponse /
   /message
   portType name=StockQuotePortType
operation name=getStockQuote
 input message=tns:getStockQuoteReq /
 output message=tns:getStockQuoteResp /
/operation
   /portType
..
 
(3) Run WSDL2Java, which generates the VOs corresponding to the XSD types.. You 
will have
to populate these VOs in your service implementation.
 
PS:
Refer generated deploy.wsdd which defines the Bean Serializers.
 
Thanks
Kiran



From: Christoph Meier [mailto:[EMAIL PROTECTED]
Sent: Thu 6/2/2005 10:22 AM
To: axis-user@ws.apache.org
Subject: BeanSerializer and WSDL



Hi!

We are developing a document style web service using AXIS. I know it is
possible to serialize java beans and send them with SOAP.

Is this Axis / Apache SOAP specific? How can I describe such a service
in a WSDL file (especially types part)?

What I have to mention: I don't have AXIS generated stubs at the client
side because I use a tool for web service orchestration
(http://www.jopera.org), that has it's own SOAP engine and uses only the
WSDL file.

Is it only possible if I define the bean's XML schema in the WSDL file?

Thanks a lot for your help. I don't find much information on this topic
in the web.


Chris






This e-mail, and any attachments thereto, is confidential and is intended only 
for the individual(s) named.  If you are not the intended recipient, please let 
us know by e-mail reply and delete it from your system; do not copy/save this 
e-mail or disclose its contents to anyone.  E-mail transmissions cannot be 
guaranteed to be secure or error-free as the transmission could be interrupted, 
corrupted, lost, destroyed, altered, arrive late or contain viruses.  
ObjectWave does not accept liability for any errors or omissions in the 
contents of this e-mail which arise as a result of e-mail transmission.  The 
views expressed in this e-mail do not necessarily reflect those of ObjectWave 
or its affiliates.




winmail.dat

RE: dynamic web service location?

2005-06-02 Thread Carolyn Vo

Hi Jan,

Thanks for the email.  I figured out how to do it finally, from both Java
and C# clients consuming the Java-based web service.  I wrote command-line
applications in both languages, and then for the Java client I used a
constructor I created in the Locator class generated that takes a server
name as a string as its only parameter.  If the user used the default
constructor with no parameters, then the default server of localhost is
used.  

/** In my class ModelCalculationServiceLocator **/
public ModelCalculationServiceLocator(String server) {
super();
ModelCalculation_address = http://; + server
+ /acorneps/acornpa/services/ModelCalculation;
}

In the C# client, I had to implement a constructor in the Reference.cs class
that is generated by Visual Studio.NET so that it takes a server name as a
string as its only parameter.

public ModelCalculationService(string server) 
{
this.Url = http://; + server +
/acorneps/acornpa/services/ModelCalculation;
}

All in all, it was extremely clean and simple to do (the hard part was
figuring out WHERE for the C# client) and I didn't have to call the
setTargetEndpointAddress method myself, since all I basically had to do was
override the variables that were used to reference as the endpoint.  No need
to go through UDDI or anything complicated like that.  Whew!

Thanks for everyone's help on this!  :)
Carolyn


-Original Message-
From: Jan Delannoy [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 02, 2005 12:43 AM
To: axis-user@ws.apache.org
Cc: [EMAIL PROTECTED]
Subject: Re: dynamic web service location?

Hi Carolyn,

I can't really help you with the 'discovering' part (I think you just
have to implement it yourself for now), but once you know the address
there is a method setTargetEndpointAddress(java.net.URL address) on
the org.apache.axis.client.Call class.  If you use stubs generated by
WSDL2Java there will be a method on the ServiceLocator class that
takes a URL and will call this method for you.

Regards,
Jan



On 6/1/05, Carolyn Vo [EMAIL PROTECTED] wrote:
 Looks like there is something in the Axis docs but is not completed yet on
 how to accomplish this:
 
 Dynamically Discovering and Binding to a Web Service
 
 When Axis generates client proxy classes code from WSDL, it binds the code
 to the endpoint URL specified in the WSDL -this is usually a URL generated
 from the URL of the inbound request. Using a http://localhost URL to fetch
a
 WSDL page will result in client code also bound to a service served up on
 the localhost, which is not what you want in a redistributable. Similarly,
 even if you use the hostname when fetching the WSDL, you need the fully
 qualified domain name, not any short name -http://s1.example.org/ and not
 http://s1/ -otherwise only callers in your own domain or subnet will be
able
 to find the server. Hand-written WSDL does not exhibit this problem; the
 endpoint in the WSDL is the one the author typed in.
 
 It is almost essential that you provide some way to update the URL on the
 clients. The simplest is some command line override option, as used in the
 Axis command line tools. More advanced is a dialog box for entering URLs,
 and more advanced yet is some automated discovery mechanism.
 
 Axis does not provide any discovery mechanism in the JAR. There is a
sibling
 project, jUDDI, that provides access to UDDI registries. There is also a
 multicast discovery jar that works with Axis in the Axis CVS tree; this is
a
 proof-of-concept mechanism that uses XML messages but is not compatible
with
 any existing standard. It works OK over LAN networks, but is not designed
to
 be used over wider area.
 
 TODO: how to set the URL in a service
 
 Anyone have any ideas on how to accomplish this?  Thanks!
 
 -Original Message-
 From: James Taylor [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, May 31, 2005 6:03 PM
 To: axis-user@ws.apache.org
 Subject: Re: dynamic web service location?
 
 Think you may have to configure tomcat or your webapp to listen on a port
 and
 access your service through there. Not sure how to do this!!
 Quoting Carolyn Vo [EMAIL PROTECTED]:
 
  Hello,
 
 
 
  Is it possible to specify the server and port number for a web service
  during runtime?  The default in my wsdl file is hardcoded to
 localhost:8080
  but I want the user to be able to specify it during runtime.  How is
this
  possible?
 
 
 
  Thanks,
 
  Carolyn
 
 
 
 
 --
 Between the question and the answer lies free will
 




Re: web service error handling design issue

2005-06-02 Thread Jeff
Life is never that simple, James! Academics are prone to produce bland
generalizations and are notorious for being out of touch with reality,
though I suspect that this is due to a few loonies giving the rest a bad
name! Clearly, most academics do a great deal of invaluable work for which
they have my deepest gratitude.

I once heard that a university professor who claimed that it wasn't possible
to write more than 10 lines of fully debugged code per day. I've been
developing software for 25 years and if my output was anything like that I'd
have gone broke years ago! Only a few months ago at a Java Users Group
meeting I overheard an academic stating with conviction that If you have to
use a case statement then you didn't do your OOD properly. -- yeah,
right...cretin.

To answer your question: in any software system, at any point between where
an error occurs and where the outer-most calling code needs to know about
the error, it is potentially appropriate to cook the error. In many
circumstances it is inappropriate for calling code to know the simple, raw
reason why an error occurs. For example, suppose that during some web
service method call a required file was discovered to be absent from its
expected location on a disk. Should you tell the web service client about
this? Most likely not, because that piece of information is unlikely to be
meaningful to the client. Instead, code much closer to error needs to figure
out the consequences and throw an interpretation up the chain where other
code might be able to do something to fix the problem (e.g. create a new
file from default values and retry) or to rethrow a more intelligible error.

Unfortunately, cooking errors is something that often doesn't happen because
too many programmers have higher priorities and finite deadlines. How many
times have you seen a ClassCastException and wondered which class the code
was attempting to cast to? One poorly handled error can result in a great
deal of wasted time, collectively over thousands of people.

Also, please note that there are many types of error and you need to be
aware that during software development we see errors (that tend to be
uncooked) that arise through flaws in the logic of the software and will go
away once the code has been debugged but, as an aid to development, we might
want to cook them if they are not immediately resolvable. As I said, reality
is rarely simple, at least not when human beings are involved.

BTW, this is not a design issue, it's about writing good software.


Jeff


Between the question and the answer, all too often, lies pure hell



- Original Message - 
From: James Taylor [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Thursday, June 02, 2005 10:22 AM
Subject: web service error handling design issue


Hey,
another design issue on a different note. In our college course we a
told to
propogate error up to the top layer/controller and deal with them
appropriately.
What's the best way to deal with errors in the case of web services? Should
I
catch the exception and return an appropriate fault node/code and deal with
this in the client code or catch the error at the service provider top level
and return an appropriate explanation?
Just looking for ideas and what way is it done in industry.
Thanks to anyone that gives my the time to answer,
  James.


--
Between the question and the answer lies free will



Building a Java Axis webservice used by an Axis C++ client

2005-06-02 Thread Falk Sippach
Hello,

I'm trying to develop a Java webservice and a C++ client.

But it doesn't really work. Meanwhile I know to disable multiref support
in server-config.wsdd. And I've read to use doc/lit as message style. Is
there something more to pay attention of? Has anybody successful used
this combination and can give me some hints? Or does it make sense to
use Axis C++? It's still in an early development phase. Are there other
Soap engines on C++ base, which work quite well with Axis Java
webservices?


My problem is to read the int return values or complex types with ints
inside. Strings do work, after a little patch (using rpc/encoded).

Please help me.

Thanks,
Falk.


Axis troubleshooting - Test a JWS Endpoint

2005-06-02 Thread Kant, D \(Dave\)
Hi Everyone,

  I'm using Axis 1.2RC2 together with tomcat5 and have been going through the 
installation instructions.
 
  I have validated my Axis install with happyaxis and the Test a SOAP 
Endpoint service runs with the following output
  Apache Axis version: 1.2RC2 Built on Nov 16, 2004 (12:19:44 EST)

  However, the Test a JWS Endpoint produces some errors 
(http://localhost/axis/EchoHeaders.jws?wsdl)

  Can anyone provide some tips to solving this problem?
  
  Kind Regards, Dave

  
AXIS error

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

Fault - ; nested exception is: .
java.io.FileNotFoundException: 
/var/lib/tomcat5/webapps/axis/WEB-INF/jwsClasses/EchoHeaders.java (No such 
file or directory)

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: java.io.FileNotFoundException: 
 /var/lib/tomcat5/webapps/axis/WEB-INF/jwsClasses/EchoHeaders.java (No such 
 file or directory)
 faultActor: 
 faultNode: 
 faultDetail: 
{http://xml.apache.org/axis/}hostname:localhost

  


=
Dr Dave Kant
CCLRC eScience Department   Phone: (+44)|(0) 1235 778178
Rutherford Appleton Laboratory  Fax:(+44)|(0) 1235 446626
Chilton, Didcot, Oxon, OX11 0QX, UK Email:  [EMAIL PROTECTED]
==



Re: application design issue

2005-06-02 Thread Jeff
James, you are thinking like a programmer and not like a
scientist/engineer/all other non-computer professionals !!!

RPC is legitimate and can be very useful but it's worth bearing in mind that
RPC applications have nothing whatsoever to do with XML. The XML is simply a
platform-independent transport protocol for structured, typed data. In pure
RPC web services, no one uses the XML directly. in pure RPC web clients, no
one uses the XML directly.

When you talk about returning an XML string, I suspect it's because both the
web service and the client really are interested in the XML. In such cases,
it is better to use document/literal style. Almost all the work I do is
focussed on XML and involves moving XML documents around. Naturally, at some
stage data must be used to populate XML documents and data must be extracted
from XML documents but that does not detract from the fact that the
documents themselves have status and longevity. As a simple example, suppose
a web service processes purchase orders and returned receipts. Good
implementations would require both types of document to be signed so that,
for accounting purposes or disputes, each document is archived in a form
that is verifiably authentic. You can see that in cases like this, it makes
no sense to sign the SOAP envelopes because such signatures will be
discarded upon receipt. In fact, I often consider dispensing with SOAP
altogether: okay, it supports routing but how many people use SOAP routing?
Some do but for many people, REST is preferable. Take a look at the work
done by the OpenGIS Consortium...not much RPC/SOAP there!


Jeff



- Original Message - 
From: James Taylor [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Thursday, June 02, 2005 10:22 AM
Subject: application design issue


Hey folks,
  just got a question on a design issue regarding web services.
  I have a rpc web service that returns information as an xml
string.
How would I add this xml to the soap message?? Would I be better off using
JAXM
if I'm doing this as I'm not passing objects just String which bassically
are
documents?
  Regards,
  James.

--
Between the question and the answer lies free will



RE: web service error handling design issue

2005-06-02 Thread Ebert, Chris

A (hopefully short) two cents:

1) Usually, I prefer to propagate exceptions rather than error codes.
Exceptions really can make application flow simpler. I agree that
'cooking' the exception is good: the topmost layer that has an
additional useful detail should add it; also, it's often nice to wrap an
exception to provide a consitant interface (wrap an SQLException in a
FooSubsystemException so different implementations can use a database, a
file system, etc.) Error codes are good when the alternate behaviour
isn't really 'exceptional' -- happens, say, 30+% of the time anyway.
2) That said, when passing exceptions -- particularly chained ones --
over a remote interface you want to create an exception class
specifically for the interface and only give it basic types as fields --
no chained exceptions here. This is because you don't want to have all
the server exceptions in the client jar. Axis handles this somewhat
gracefully (you get a null): RMI throws it's own exception if a class
isn't available upon deserialization. This lets the client recognise a
server fault, get some information back about it and decide what to do.

Hope that was helpful :)

Chris



-Original Message-
From: Jeff [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 02, 2005 8:41 AM
To: axis-user@ws.apache.org
Subject: Re: web service error handling design issue

Life is never that simple, James! Academics are prone to produce bland
generalizations and are notorious for being out of touch with reality,
though I suspect that this is due to a few loonies giving the rest a bad
name! Clearly, most academics do a great deal of invaluable work for
which they have my deepest gratitude.

I once heard that a university professor who claimed that it wasn't
possible to write more than 10 lines of fully debugged code per day.
I've been developing software for 25 years and if my output was anything
like that I'd have gone broke years ago! Only a few months ago at a Java
Users Group meeting I overheard an academic stating with conviction that
If you have to use a case statement then you didn't do your OOD
properly. -- yeah, right...cretin.

To answer your question: in any software system, at any point between
where an error occurs and where the outer-most calling code needs to
know about the error, it is potentially appropriate to cook the error.
In many circumstances it is inappropriate for calling code to know the
simple, raw reason why an error occurs. For example, suppose that during
some web service method call a required file was discovered to be absent
from its expected location on a disk. Should you tell the web service
client about this? Most likely not, because that piece of information is
unlikely to be meaningful to the client. Instead, code much closer to
error needs to figure out the consequences and throw an interpretation
up the chain where other code might be able to do something to fix the
problem (e.g. create a new file from default values and retry) or to
rethrow a more intelligible error.

Unfortunately, cooking errors is something that often doesn't happen
because too many programmers have higher priorities and finite
deadlines. How many times have you seen a ClassCastException and
wondered which class the code was attempting to cast to? One poorly
handled error can result in a great deal of wasted time, collectively
over thousands of people.

Also, please note that there are many types of error and you need to be
aware that during software development we see errors (that tend to be
uncooked) that arise through flaws in the logic of the software and will
go away once the code has been debugged but, as an aid to development,
we might want to cook them if they are not immediately resolvable. As I
said, reality is rarely simple, at least not when human beings are
involved.

BTW, this is not a design issue, it's about writing good software.


Jeff


Between the question and the answer, all too often, lies pure hell



- Original Message -
From: James Taylor [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Thursday, June 02, 2005 10:22 AM
Subject: web service error handling design issue


Hey,
another design issue on a different note. In our college course we a
told to
propogate error up to the top layer/controller and deal with them
appropriately.
What's the best way to deal with errors in the case of web services?
Should
I
catch the exception and return an appropriate fault node/code and deal
with
this in the client code or catch the error at the service provider top
level
and return an appropriate explanation?
Just looking for ideas and what way is it done in industry.
Thanks to anyone that gives my the time to answer,
  James.


--
Between the question and the answer lies free will



Re: really anoying problem

2005-06-02 Thread James Taylor
I think its happening somewhere around
DOMGetFlightsXMLImpl.transformDOMtoString(Document) call, but cant figure out
why??!!
Quoting James Taylor [EMAIL PROTECTED]:

 Hey folks,
apologies for sending such a long mail, I've this web service
 that keeps throwing this really annoying
 java.lang.reflect.InvocationTargetException and would really appreciate it if
 someone could help me put my finger on whats going wrong cause I'm at my wits
 end. This is the error I keep getting back:

 HTTP/1.1 500 Internal Server Error
 Set-Cookie: JSESSIONID=AD9B5C8B6BB70316879AE7CF8219794E; Path=/axis
 Content-Type: text/xml;charset=utf-8
 Date: Thu, 02 Jun 2005 19:39:10 GMT
 Server: Apache-Coyote/1.1
 Connection: close

 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:Bodysoapenv:Faultfaultcodesoapenv:Server.userException/faultcodefaultstringjava.lang.reflect.InvocationTargetException/faultstringdetailns1:hostname

xmlns:ns1=http://xml.apache.org/axis/;taylorjw/ns1:hostname/detail/soapenv:Fault/soapenv:Body/soapenv:Envelope

 ...the web service takes a list of flights in the form and makes an xml
 string
 out of them using DOM. I know the xml stuff works on its own but I think
 thats
 where the error is somehow happening but I cant for the life of me figure out
 where. The code for the web service is

 package flightCompany.rpcservice;

 import java.util.Iterator;
 import java.util.LinkedList;

 import flightCompany.xmlHelper.DOMGetFlightsXMLImpl;
 import flightCompany.xmlHelper.GetFlightsXMLIF;
 import flightCompany.model.Flight;

 /**
  * A JAX-RPC Web service that takes a date and returns a xml String of
 flights
  * available on that date.
  * Created on 11-May-2005
  * @author James Taylor
  * @version 1.1
 */

 public class FlightInfoService implements FlightInfoServiceIF{

 /**
  * returns as string representation of a list of available flights.
  * @param date date of flights to search for.
  * @return xml String of available flights
  * @throws ava.rmi.RemoteException
  */
 public String getFlights(String date) throws java.rmi.RemoteException{
   Flight f = new Flight();
   Flight fl = new Flight();
   LinkedList flights = new LinkedList();
   flights.add( f );
   flights.add( fl );
   //  Instantiate the XMLHelper
   GetFlightsXMLIF xmlHelper = new DOMGetFlightsXMLImpl();
   System.out.println(about to convert to string);
   //turn list to xml
   String result = xmlHelper.getFlightListAsXMLString( 
 flights.iterator()
 );
   System.out.println(Got me xml shit);
   return result;
}


 }

 the code for a flight object is your ordinary bean kinda stuff

 /*
  * Created on 11-May-2005
  */
 package flightCompany.model;



 /**
  * Data model of a FlightInfo table entry, mapping the database model and the
 xml we receive.
  * @author James Taylor
  * @version 1.1
  */
 public class Flight{
   private int flightNum;
   private String sourceAirport;
   private String destAirport;
   private String flightDate;
   private int seatsAvailible;
   private int seatPrice;
   private String numberOfSeatsToBook;
   private int bookingNumber;

   /**
* Default constructor used in xml mapping, it just initialises and 
 creates
 instance variables
*/
   public Flight() {
   this.sourceAirport = ;
   this.destAirport = ;
   this.flightDate = ;
   this.seatPrice = 0;
   this.seatsAvailible = 0;
   this.flightNum = 0;
   this.numberOfSeatsToBook = ;
   bookingNumber = 0;
   }

   /**
* constructor used to map the database model
* @param ID flight id
* @param src source airport
* @param dest destination airport
* @param date date of flight
* @param seatsAv number of seats available
* @param price price of a seat
*/
   public Flight(int ID, String src, String dest, String date, int 
 seatsAv, int
 price) {
   flightNum = ID;
   sourceAirport = src;
   destAirport = dest;
   flightDate = date;
   seatsAvailible = seatsAv;
   seatPrice = price;
   this.numberOfSeatsToBook = ;
   bookingNumber = 0;
   }

   public void setNumberOfSeatsToBook(String n){ numberOfSeatsToBook = n; }
   public String getNumberOfSeatsToBook(){ return numberOfSeatsToBook; }

   public void setFlightNum(int n){ flightNum = n; }
   public int getFlightNum(){ return flightNum; }

   public void setSourceAirport(String src){ sourceAirport = src; }
   public String getSourceAirport(){ return 

Re: web service error handling design issue

2005-06-02 Thread James Taylor
   Sure there's different fixes for different situations but at the end of the
day is it not better to deal with the exception as quickly as possible so it
doesn't get obfuscated in too many extra wrapped exceptions. Also is it not
expensive, to a degree, to create exceptions? By this I'm wondering that is
it not better to try and lessen the overhead on resources on the server.


Quoting Jeff [EMAIL PROTECTED]:

 I agree entirely. I took it as read that error conditions in Java are known
 as exceptions  :-)


 Jeff



 - Original Message -
 From: Ebert, Chris [EMAIL PROTECTED]
 To: axis-user@ws.apache.org
 Sent: Thursday, June 02, 2005 1:36 PM
 Subject: RE: web service error handling design issue



 A (hopefully short) two cents:

 1) Usually, I prefer to propagate exceptions rather than error codes.
 Exceptions really can make application flow simpler. I agree that
 'cooking' the exception is good: the topmost layer that has an
 additional useful detail should add it; also, it's often nice to wrap an
 exception to provide a consitant interface (wrap an SQLException in a
 FooSubsystemException so different implementations can use a database, a
 file system, etc.) Error codes are good when the alternate behaviour
 isn't really 'exceptional' -- happens, say, 30+% of the time anyway.
 2) That said, when passing exceptions -- particularly chained ones --
 over a remote interface you want to create an exception class
 specifically for the interface and only give it basic types as fields --
 no chained exceptions here. This is because you don't want to have all
 the server exceptions in the client jar. Axis handles this somewhat
 gracefully (you get a null): RMI throws it's own exception if a class
 isn't available upon deserialization. This lets the client recognise a
 server fault, get some information back about it and decide what to do.

 Hope that was helpful :)

 Chris



 -Original Message-
 From: Jeff [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 02, 2005 8:41 AM
 To: axis-user@ws.apache.org
 Subject: Re: web service error handling design issue

 Life is never that simple, James! Academics are prone to produce bland
 generalizations and are notorious for being out of touch with reality,
 though I suspect that this is due to a few loonies giving the rest a bad
 name! Clearly, most academics do a great deal of invaluable work for
 which they have my deepest gratitude.

 I once heard that a university professor who claimed that it wasn't
 possible to write more than 10 lines of fully debugged code per day.
 I've been developing software for 25 years and if my output was anything
 like that I'd have gone broke years ago! Only a few months ago at a Java
 Users Group meeting I overheard an academic stating with conviction that
 If you have to use a case statement then you didn't do your OOD
 properly. -- yeah, right...cretin.

 To answer your question: in any software system, at any point between
 where an error occurs and where the outer-most calling code needs to
 know about the error, it is potentially appropriate to cook the error.
 In many circumstances it is inappropriate for calling code to know the
 simple, raw reason why an error occurs. For example, suppose that during
 some web service method call a required file was discovered to be absent
 from its expected location on a disk. Should you tell the web service
 client about this? Most likely not, because that piece of information is
 unlikely to be meaningful to the client. Instead, code much closer to
 error needs to figure out the consequences and throw an interpretation
 up the chain where other code might be able to do something to fix the
 problem (e.g. create a new file from default values and retry) or to
 rethrow a more intelligible error.

 Unfortunately, cooking errors is something that often doesn't happen
 because too many programmers have higher priorities and finite
 deadlines. How many times have you seen a ClassCastException and
 wondered which class the code was attempting to cast to? One poorly
 handled error can result in a great deal of wasted time, collectively
 over thousands of people.

 Also, please note that there are many types of error and you need to be
 aware that during software development we see errors (that tend to be
 uncooked) that arise through flaws in the logic of the software and will
 go away once the code has been debugged but, as an aid to development,
 we might want to cook them if they are not immediately resolvable. As I
 said, reality is rarely simple, at least not when human beings are
 involved.

 BTW, this is not a design issue, it's about writing good software.


 Jeff


 Between the question and the answer, all too often, lies pure hell



 - Original Message -
 From: James Taylor [EMAIL PROTECTED]
 To: axis-user@ws.apache.org
 Sent: Thursday, June 02, 2005 10:22 AM
 Subject: web service error handling design issue


 Hey,
 another design issue on a different note. In 

Re: web service error handling design issue

2005-06-02 Thread Jeff
Rather than obfuscate, extra wrapped exceptions should add clarity.

It is not expensive to add exceptions nor is there any benefit to handling
exceptions as quickly as possible. Don't get exceptions confused with system
interrupts. Once an error has occurred, we are no longer concerned with
performance but with proper handling of the condition. Furthermore, unless
we are being ridiculously wasteful or using poorly designed algorithms,
performance improvements are down to hardware these days. With 16-core
Opteron systems at affordable prices and RAM measured in tens of GB,
programmers no longer need to worry about performance. In fact, we stopped
worrying about performance once we abandoned C++ for Java!


Jeff


- Original Message - 
From: James Taylor [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Thursday, June 02, 2005 4:39 PM
Subject: Re: web service error handling design issue


   Sure there's different fixes for different situations but at the end of
the
day is it not better to deal with the exception as quickly as possible so it
doesn't get obfuscated in too many extra wrapped exceptions. Also is it not
expensive, to a degree, to create exceptions? By this I'm wondering that
is
it not better to try and lessen the overhead on resources on the server.


Quoting Jeff [EMAIL PROTECTED]:

 I agree entirely. I took it as read that error conditions in Java are
known
 as exceptions  :-)


 Jeff



 - Original Message -
 From: Ebert, Chris [EMAIL PROTECTED]
 To: axis-user@ws.apache.org
 Sent: Thursday, June 02, 2005 1:36 PM
 Subject: RE: web service error handling design issue



 A (hopefully short) two cents:

 1) Usually, I prefer to propagate exceptions rather than error codes.
 Exceptions really can make application flow simpler. I agree that
 'cooking' the exception is good: the topmost layer that has an
 additional useful detail should add it; also, it's often nice to wrap an
 exception to provide a consitant interface (wrap an SQLException in a
 FooSubsystemException so different implementations can use a database, a
 file system, etc.) Error codes are good when the alternate behaviour
 isn't really 'exceptional' -- happens, say, 30+% of the time anyway.
 2) That said, when passing exceptions -- particularly chained ones --
 over a remote interface you want to create an exception class
 specifically for the interface and only give it basic types as fields --
 no chained exceptions here. This is because you don't want to have all
 the server exceptions in the client jar. Axis handles this somewhat
 gracefully (you get a null): RMI throws it's own exception if a class
 isn't available upon deserialization. This lets the client recognise a
 server fault, get some information back about it and decide what to do.

 Hope that was helpful :)

 Chris



 -Original Message-
 From: Jeff [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 02, 2005 8:41 AM
 To: axis-user@ws.apache.org
 Subject: Re: web service error handling design issue

 Life is never that simple, James! Academics are prone to produce bland
 generalizations and are notorious for being out of touch with reality,
 though I suspect that this is due to a few loonies giving the rest a bad
 name! Clearly, most academics do a great deal of invaluable work for
 which they have my deepest gratitude.

 I once heard that a university professor who claimed that it wasn't
 possible to write more than 10 lines of fully debugged code per day.
 I've been developing software for 25 years and if my output was anything
 like that I'd have gone broke years ago! Only a few months ago at a Java
 Users Group meeting I overheard an academic stating with conviction that
 If you have to use a case statement then you didn't do your OOD
 properly. -- yeah, right...cretin.

 To answer your question: in any software system, at any point between
 where an error occurs and where the outer-most calling code needs to
 know about the error, it is potentially appropriate to cook the error.
 In many circumstances it is inappropriate for calling code to know the
 simple, raw reason why an error occurs. For example, suppose that during
 some web service method call a required file was discovered to be absent
 from its expected location on a disk. Should you tell the web service
 client about this? Most likely not, because that piece of information is
 unlikely to be meaningful to the client. Instead, code much closer to
 error needs to figure out the consequences and throw an interpretation
 up the chain where other code might be able to do something to fix the
 problem (e.g. create a new file from default values and retry) or to
 rethrow a more intelligible error.

 Unfortunately, cooking errors is something that often doesn't happen
 because too many programmers have higher priorities and finite
 deadlines. How many times have you seen a ClassCastException and
 wondered which class the code was attempting to cast to? One poorly
 handled error can 

RE: BeanSerializer and WSDL

2005-06-02 Thread Christoph Meier
Thanks a lot for the information, Kiran.

While reading the WSDL spec I found out that it is possible to use
xsd:anyType in the types definition. I assume this automatically uses
the BeanSerializer and BeanDeserializer?

Are there any drawbacks involved with anyType (e.g. java specific)?

Thanks again for the help.

Chris



Am Donnerstag, den 02.06.2005, 10:37 -0500 schrieb Kiran Kumar:
 Hi, Apache Axis has its own BeanSerializer and BeanDeserializer. However Axis 
 supports Castor also.
  
 It is a 2 step process..
  
 (1) One Define XSD 
 (2) Import XSD in your WSDL : Ex- (stockQuote XSD is imported and refer that 
 element in port and message tags)
  =
  definitions
   
 targetNamespace=http://w3.ibm.com/schemas/services/2002/11/15/stockquote/wsdl;
   xmlns=http://schemas.xmlsoap.org/wsdl/;
   xmlns:tns=http://w3.ibm.com/schemas/services/2002/11/15/stockquote/wsdl;
   xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
   xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
   xmlns:types=http://w3.ibm.com/schemas/services/2002/11/15/stockquote;
types
  xsd:schema elementFormDefault=qualified
 targetNamespace=
 
 http://w3.ibm.com/schemas/services/2002/11/15/stockquote/wsdl/importtypes;
   import namespace=
 http://w3.ibm.com/schemas/services/2002/11/15/stockquote;
  location=StockQuote.xsd /
  /xsd:schema
/types
message name=getStockQuoteReq
  part name=parameters element=types:getStockQuote /
/message
message name=getStockQuoteResp
  part name=parameters element=types:getStockQuoteResponse /
/message
portType name=StockQuotePortType
 operation name=getStockQuote
  input message=tns:getStockQuoteReq /
  output message=tns:getStockQuoteResp /
 /operation
/portType
 ..
  
 (3) Run WSDL2Java, which generates the VOs corresponding to the XSD types.. 
 You will have
 to populate these VOs in your service implementation.
  
 PS:
 Refer generated deploy.wsdd which defines the Bean Serializers.
  
 Thanks
 Kiran
 
 
 
 From: Christoph Meier [mailto:[EMAIL PROTECTED]
 Sent: Thu 6/2/2005 10:22 AM
 To: axis-user@ws.apache.org
 Subject: BeanSerializer and WSDL
 
 
 
 Hi!
 
 We are developing a document style web service using AXIS. I know it is
 possible to serialize java beans and send them with SOAP.
 
 Is this Axis / Apache SOAP specific? How can I describe such a service
 in a WSDL file (especially types part)?
 
 What I have to mention: I don't have AXIS generated stubs at the client
 side because I use a tool for web service orchestration
 (http://www.jopera.org), that has it's own SOAP engine and uses only the
 WSDL file.
 
 Is it only possible if I define the bean's XML schema in the WSDL file?
 
 Thanks a lot for your help. I don't find much information on this topic
 in the web.
 
 
 Chris
 
 
 
 
 
 
 This e-mail, and any attachments thereto, is confidential and is intended 
 only for the individual(s) named.  If you are not the intended recipient, 
 please let us know by e-mail reply and delete it from your system; do not 
 copy/save this e-mail or disclose its contents to anyone.  E-mail 
 transmissions cannot be guaranteed to be secure or error-free as the 
 transmission could be interrupted, corrupted, lost, destroyed, altered, 
 arrive late or contain viruses.  ObjectWave does not accept liability for any 
 errors or omissions in the contents of this e-mail which arise as a result of 
 e-mail transmission.  The views expressed in this e-mail do not necessarily 
 reflect those of ObjectWave or its affiliates.
 
 
 
 



Re: web service error handling design issue

2005-06-02 Thread Jeff
I excluded being ridiculously wasteful or using poorly designed
algorithms. Of course, we need to be careful but not in the way we used to
fret over optimal coding. When specifying an for-loop counter, how many
people load the size of an ArrayList into a local variable rather than call
size() each iteration (I do but most people don't).



- Original Message - 
From: Dan Armbrust [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Thursday, June 02, 2005 5:47 PM
Subject: Re: web service error handling design issue


 
 
 programmers no longer need to worry about performance. In fact, we
stopped
 worrying about performance once we abandoned C++ for Java!
 

 Speak for yourself...   Maybe you work in a world where the datasets are
 small, and hardware budgets grow quickly

 I remember digging into a third party package that we were using - they
 had recently ported from c to java, and the performance of the new
 version sucked on certain operations.  Examination of the code revealed
 that there was one method that got its result by opening a random file
 reader on a 200K file, and finding the appropriate bits.  The algorithm
 called this method several hundred times per operation.  A simple change
 to a hashtable based approach with a one-time read of the file resulted
 in an operation that ran about 1000 times faster.  Multiple that by the
 500,000,000 times I needed to call that method, and we start talking
 years instead of hours to process the same data

 Dan

 
 



Webservice client

2005-06-02 Thread Ravi Krishnamurthy

Hello:
I 'm a newbie to Axis. Was looking into the following wsdl:
http://www.atomic-x.com/xmlservices/dnslookupservice.asmx?wsdl

Was able to use WSDL2JAVA from Axis to generate the stubs and hence invoke the 
webservice.


Wondering is there any other way to invoke the webservice successfully 
instead of using WSDL2JAVA. The webservices has datatypes that could be complex types and would like to invoke RPC as well as Document style.


I'm looking only as a client to invoke the webservices. Also any suggestions 
design approach for this is welcome.

Thanks for your time.
Regards,
Ravi




.NET fails when an objects from a package other than the service package are used

2005-06-02 Thread Sagar Pidaparthi








Hi,



I observe that my services fail when they use objects from
packages other than the one in which the service is located. 



e.g. if I have package called a.b.c and I have a service
called Xyz. And it uses an object called abc also located in package a.b.c,
then the service works fine. However, if my object abc is located in a
package other than a.b.c, then the service fails.



Is there a way to ensure that my wsdls are produced in a way
which is more compatible with .NET?



I use axis 1.2, Visual studio 2.05 Beta version, which I
downloaded recently



I would appreciate an answer if you have a solution please.



Regards



Sagar








NoSuchMethodException: org.apache.axis.encoding.ser.ArrayDeserializerF

2005-06-02 Thread Yakulis, Ross \(Ross\)
Title: NoSuchMethodException: org.apache.axis.encoding.ser.ArrayDeserializerF






Any ideas why I see this exception? Note I have debug level output on.



02/06/2005 16:32:42 DEBUG - Exception:

java.lang.NoSuchMethodException: org.apache.axis.encoding.ser.ArrayDeserializerF

actory.create(java.lang.Class, javax.xml.namespace.QName)

 at java.lang.Class.getMethod(Class.java:986)

 at org.apache.axis.encoding.ser.BaseDeserializerFactory.createFactory(Ba

seDeserializerFactory.java:225)

 at org.apache.axis.deployment.wsdd.WSDDService.deployTypeMapping(WSDDSer

vice.java:541)

 at org.apache.axis.deployment.wsdd.WSDDService.initTMR(WSDDService.java:

245)

 at org.apache.axis.deployment.wsdd.WSDDService.init(WSDDService.java:2

25)

 at org.apache.axis.deployment.wsdd.WSDDDeployment.init(WSDDDeployment.

java:191)

 at org.apache.axis.deployment.wsdd.WSDDDocument.setDocument(WSDDDocument

.java:139)

 at org.apache.axis.deployment.wsdd.WSDDDocument.init(WSDDDocument.java

:65)

 at org.apache.axis.configuration.FileProvider.configureEngine(FileProvid





Web Service property files

2005-06-02 Thread Wayne Richards
I have a questions regarding access to property files in web service applications.

1. Currently, I have setup property file for all my web services. The property files live in the "C:\Tomcat\webapps\axis\WEB-INF\classes" directory. There are picked up with out an issue. On my system. When taken to another system the property files are not being picked up. Why, is this and how can I prevent the problem?
2. The property file reference a log4j properties file that is hard coded to "C:/Tomcat/webapps/axis/WEB-INF/classes/conf/NDNGateway.log4j.properties" if I change "C:/Tomcat/webapps/axis/WEB-INF/classes/conf/" to "./" the property files will be accessed. The same goes for the log4j property files, it seems that they are not picked up as well since no log files are created.

It appears that the default directory on some systems is "C:\Tomcat\webapps\axis\WEB-INF\classes" and on others it is "C:\WINNT\system32" or "C:\WINDOWS\system32" for my applications. What is causing this?

Any help would be appreciated.

Regards
WayneSend instant messages to your online friends http://au.messenger.yahoo.com 

Re: really anoying problem

2005-06-02 Thread James Taylor
Phew,
 I just put xalan.jar into C:\Program
Files\Apache\jakarta-tomcat-4.1.31\webapps\axis\WEB-INF\lib and lo and behold
the bloody *!@ poggram worked, think it was devine inspiration or something but
I dont know why it worked!! Man think I'm gonna change my college course to
ancient Umpa-Lumpa Geneology or something!!!

--
Between the question and the answer lies pure chance...

Quoting James Taylor [EMAIL PROTECTED]:

 Hey people,
for the moment as I'm inept to logging I'm using simple
 System.out.println to debug to Tomcat's console - as I have the liberty of
 testing locally - and have changed the class that is wrecking my head to the
 below listing. I've been trying to work this out for about 2 full days and am
 stuck, which is when we really have to learn and the open window looks really
 appealling.. bet you wish i'd just jump!!
You see when I run the class from the main method I get the
 following
 output -
 run:
  [echo] run task. Running flightCompany.xmlHelper.DOMGetFlightsXMLImpl...
  [java] Getting XML String=
  [java] Creating xml dom doc
  [java] about to head into loop to parse list
  [java] left the loop so we have added nodes to dom
  [java] About to turn dom to string
  [java] Hello from transformDOMtoString().
  [java] got TransformerFactory...
  [java] got Transformer...
  [java] Got DOMSource...
  [java] Got StringWriter...
  [java] transformed dom...
  [java] ===sending back this?xml version=1.0
 encoding=UTF-8?FlightList
 xmlns=FlightList.xsdFlightFlightNum0/FlightNumSourceAirport/So

urceAirportDestAirport/DestAirportFlightDate/FlightDateSeatsAvailible

0/SeatsAvailibleSeatPrice0/SeatPrice/FlightFlightFlightNum0/FlightN

umSourceAirport/SourceAirportDestAirport/DestAirportFlightDate/Fligh

tDateSeatsAvailible0/SeatsAvailibleSeatPrice0/SeatPrice/Flight/Fligh
 tList
  [java] ?xml version=1.0 encoding=UTF-8?FlightList
 xmlns=FlightList.

xsdFlightFlightNum0/FlightNumSourceAirport/SourceAirportDestAirport

/DestAirportFlightDate/FlightDateSeatsAvailible0/SeatsAvailibleSeatP

rice0/SeatPrice/FlightFlightFlightNum0/FlightNumSourceAirport/Sour

ceAirportDestAirport/DestAirportFlightDate/FlightDateSeatsAvailible0
 /SeatsAvailibleSeatPrice0/SeatPrice/Flight/FlightList
  [echo] Done...

 BUILD SUCCESSFUL
 Total time: 3 seconds

  This is what I want to send back to the service requester. But, and a
 horrible but that I cant figure out why, when I implement the code as a web
 service and run the client code the debug statements to tomcat's console
 seems
 to indicate that it hangs around the
 DOMGetFlightsXMLImpl.transformDOMtoString(Document) method at this line (171)
 TransformerFactory tFactory = TransformerFactory.newInstance();
  This is what the console looks like -


 03-Jun-2005 03:13:42 org.apache.coyote.http11.Http11Protocol init
 INFO: Initializing Coyote HTTP/1.1 on http-8080
 Starting service Tomcat-Standalone
 Apache Tomcat/4.1.31
 03-Jun-2005 03:13:43 org.apache.struts.util.PropertyMessageResources init
 INFO: Initializing, config='org.apache.struts.util.LocalStrings',
 returnNull=tru
 e
 03-Jun-2005 03:13:43 org.apache.struts.util.PropertyMessageResources init
 INFO: Initializing, config='org.apache.struts.action.ActionResources',
 returnNul
 l=true
 03-Jun-2005 03:13:43 org.apache.struts.util.PropertyMessageResources init
 INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources',
 retur
 nNull=true
 03-Jun-2005 03:13:46 org.apache.coyote.http11.Http11Protocol start
 INFO: Starting Coyote HTTP/1.1 on http-8080
 03-Jun-2005 03:13:46 org.apache.jk.common.ChannelSocket init
 INFO: JK2: ajp13 listening on /0.0.0.0:8009
 03-Jun-2005 03:13:46 org.apache.jk.server.JkMain start
 INFO: Jk running ID=0 time=0/30  config=C:\Program
 Files\Apache\jakarta-tomcat-4
 .1.31\conf\jk2.properties
 
 about to convert to string
 Getting XML String=
 Creating xml dom doc
 about to head into loop to parse list
 left the loop so we have added nodes to dom
 About to turn dom to string
 Hello from transformDOMtoString().


 /*
  * Created on 10-5-2005
  */

 package flightCompany.xmlHelper;

 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;

 //Import log4j classes.
 import org.apache.log4j.HTMLLayout;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.apache.log4j.BasicConfigurator;
 import org.apache.log4j.WriterAppender;

 import javax.xml.transform.dom.DOMSource;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.TransformerException;
 import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.Transformer;