Re: Axis2: Returning an Object as AnyType - get error

2009-05-11 Thread Chinmoy Chakraborty
Hello,

I had the same problem when I tried to migrate Axis 1.4 to Axis2 1.4. Only
difference was in my case I was returning Object array (Object[] which was
2D array, array of arrays).

The developers said it works but it didn't work for me. the solution was to
use ComplexTypeArray. If you want to return a complextype, make a class and
use array of that class as return type. e.g. suppose i want to return names
and addresses of people, so i will make class People.

class People{
  String name;
  String address;
  int phone_number;
  etc..
}

and People[] will be return type and it works perfectly OK. In your case it
will work if you use specific type or complex type instead of Object.

Chinmoy



On Fri, May 8, 2009 at 7:27 PM, Boris Klug bo...@klg.de wrote:

 Hi!

 We want to migrate a Axis 1.4 webservice to Axis2. The webservice is
 generated from a POJO Java class which contains a method like this:

  public Object getData() {
return a string;
  }

 The WSDL generated by Axis2 looks like this:

 xs:element name=getDataResponse
   xs:complexType
 xs:sequence
   xs:element minOccurs=0
   name=return nillable=true type=xs:anyType/
 /xs:sequence
   /xs:complexType
 /xs:element

 The client is generated from the wsdl using wsdl2java. When I test the web
 service with GetDataResponse gdr = stub.getData(); it generates the
 following exception:

 org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Any
 type element type has not been given
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at package.MyServiceStub.fromOM(ZederbasicServiceStub.java:14738)

 The Object returned by getData() can be a String, Integer, Boolean or Date,
 no other types. All can be serialized by Axis2.

 In Axis 1.4 returning an Object was no problem. I search the mailing list
 but found no hint.

 Any ideas how I can get this to work?

 Thank you in advance.


 --
 Boris Klug, Koblenz, bo...@klg.de, Fax: 0261-1334249



Re: Re: Axis2: Returning an Object as AnyType - get error

2009-05-11 Thread Boris Klug
Hello!

Thank you for your suggestion. I have done it in another case where I had to 
return an array of data holder objects. 

Here I realy want to return a String, Integer, Date or Boolean. What I cant do 
- but that would be realy ugly - is to create a class like

class ReturnValue {
  public String aString;
  public Integer aInteger;
  public Boolean aBoolean;
}

and only set the value of the type I want to return. It would work - but its 
ugly.

So some other hints?

- original Nachricht 

Betreff: Re: Axis2: Returning an Object as AnyType - get error
Gesendet: Mo, 11. Mai 2009
Von: Chinmoy Chakraborty

Hello, I had the same problem when I tried to migrate Axis 1.4 to Axis2 1.4. 
Only difference was in my case I was returning Object array (Object[] which was 
2D array, array of arrays). The developers said it works but it didn't work for 
me. the solution was to use ComplexTypeArray. If you want to return a 
complextype, make a class and use array of that class as return type. e.g. 
suppose i want to return names and addresses of people, so i will make class 
People. class People{  String name;  String address;  int 
phone_number;  etc..} and People[] will be return type and it works 
perfectly OK. In your case it will work if you use specific type or complex 
type instead of Object. Chinmoy 
 On Fri, May 8, 2009 at 7:27 PM, Boris Klug bo...@klg.de wrote:
Hi!

We want to migrate a Axis 1.4 webservice to Axis2. The webservice is generated 
from a POJO Java class which contains a method like this:

 public Object getData() {
   return a string;
 }

The WSDL generated by Axis2 looks like this:

xs:element name=getDataResponse
  xs:complexType
xs:sequence
  xs:element minOccurs=0
  name=return nillable=true type=xs:anyType/
/xs:sequence
  /xs:complexType
/xs:element

The client is generated from the wsdl using wsdl2java. When I test the web 
service with GetDataResponse gdr = stub.getData(); it generates the following 
exception:

org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Any type 
element type has not been given
   at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
   at package.MyServiceStub.fromOM(ZederbasicServiceStub.java:14738)

The Object returned by getData() can be a String, Integer, Boolean or Date, no 
other types. All can be serialized by Axis2.

In Axis 1.4 returning an Object was no problem. I search the mailing list but 
found no hint.

Any ideas how I can get this to work?

Thank you in advance.


--
Boris Klug, Koblenz, bo...@klg.de, Fax: 0261-1334249



--- original Nachricht Ende 


Getting the corect endpoints in WSDL for POJOs behind a proxy

2009-05-11 Thread Neil Youngman
I have an application implemented as a POJO and exposed as a web service using 
axis2, behind an Apache proxy. 

The problem with this configuration is that the WSDL returns endpoint addresses 
pointed to our internal addresses in the 192.168.0.0/16 subnet. We want the 
WSDL to pass usable EPRs, i.e. EPRs served by the Apache proxy, to external 
clients, but I have been unable to find any method to change the EPRs in hte 
WSDL.

The most promising approach I found was setting httpFrontendHostUrl, but this 
only changes the address in the listServices page, it has no effect on the 
WSDL. Post 6 in this devshed thread 
http://archives.devshed.com/forums/apache-92/have-wsdl-soap-address-show-different-public-url-2333639.html
 offers an alternative involving putting an editing WSDL file in the META-INF 
directory, but when I tried it it removed the EPR bindings altogether from the 
WSDL. I suspect that the first parameter in hte solution is incorrectly 
specified as it has attribute name=, which seems unlikely to be right.

I'm sure Axis2 must be able to support this. Can anyone provide a solution for 
me.

Thanks

Neil Youngman


Neil Youngman 
Developer
Wirefast Limited
 
Wirefast provides secure corporate messaging services.
See our messaging solutions at http://www.wirefast.com/
Please consider the environment.
Does this email or attachment need to be printed? 
This message contains confidential information and is intended only 
for the individual named. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please 
notify the sender immediately by email if you have received this 
email by mistake and delete this email from your system.

Email transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses. The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of email transmission.
Wirefast Limited is registered in England  Wales
Company number: 03865860
Registered Office: 7/10 Chandos Street, Cavendish Square, London, W1G 9DQ

inline: logo.jpg

Re: Getting the corect endpoints in WSDL for POJOs behind a proxy

2009-05-11 Thread Sagara Gunathunga
Hi Neil,
You could  try for following two parameters in the services.xml file
along with edited WSDL file in the
 META-INF directory.

parameter name=useOrignalWSDL true/parameter
parameter name=modifyUserWSDLPortAddressfalse/parameter

Thanks ,

On Mon, May 11, 2009 at 1:24 PM, Neil Youngman
neil.young...@wirefast.com wrote:
 I have an application implemented as a POJO and exposed as a web service
 using axis2, behind an Apache proxy.

 The problem with this configuration is that the WSDL returns endpoint
 addresses pointed to our internal addresses in the 192.168.0.0/16 subnet. We
 want the WSDL to pass usable EPRs, i.e. EPRs served by the Apache proxy, to
 external clients, but I have been unable to find any method to change the
 EPRs in hte WSDL.

 The most promising approach I found was setting httpFrontendHostUrl, but
 this only changes the address in the listServices page, it has no effect on
 the WSDL. Post 6 in this devshed thread
 http://archives.devshed.com/forums/apache-92/have-wsdl-soap-address-show-different-public-url-2333639.html
 offers an alternative involving putting an editing WSDL file in the META-INF
 directory, but when I tried it it removed the EPR bindings altogether from
 the WSDL. I suspect that the first parameter in hte solution is incorrectly
 specified as it has attribute name=, which seems unlikely to be right.

 I'm sure Axis2 must be able to support this. Can anyone provide a solution
 for me.

 Thanks

 Neil Youngman

 Neil Youngman
 Developer
 Wirefast Limited

 Wirefast provides secure corporate messaging services.
 See our messaging solutions at http://www.wirefast.com/

 Please consider the environment.
 Does this email or attachment need to be printed?

 This message contains confidential information and is intended only
 for the individual named. If you are not the named addressee you
 should not disseminate, distribute or copy this email. Please
 notify the sender immediately by email if you have received this
 email by mistake and delete this email from your system.

 Email transmission cannot be guaranteed to be secure or error-free
 as information could be intercepted, corrupted, lost, destroyed,
 arrive late or incomplete, or contain viruses. The sender therefore
 does not accept liability for any errors or omissions in the contents
 of this message which arise as a result of email transmission.
 Wirefast Limited is registered in England  Wales
 Company number: 03865860
 Registered Office: 7/10 Chandos Street, Cavendish Square, London, W1G 9DQ



-- 
Sagara Gunathunga

Blog - http://ssagara.blogspot.com
Web - http://sagaras.awardspace.com/


RE: Getting the corect endpoints in WSDL for POJOs behind a proxy

2009-05-11 Thread Neil Youngman
Sagara Gunathunga wrote:
 Hi Neil,
 You could  try for following two parameters in the services.xml file
 along with edited WSDL file in the
  META-INF directory.

 parameter name=useOrignalWSDL true/parameter
 parameter name=modifyUserWSDLPortAddressfalse/parameter

Thanks for that. Unfortunately, it doesn't work.

The edited WSDL in my META-INF directory is 

wsdl:service name=ExampleService
wsdl:port name=ExampleServiceHttpSoap11Endpoint 
binding=ns:ExampleServiceSoap11Binding
soap:address 
location=https://proxy.example.net/axis2/services/ExampleService.ExampleServiceHttpSoap11Endpoint//
/wsdl:port
wsdl:port name=ExampleServiceHttpSoap12Endpoint 
binding=ns:ExampleServiceSoap12Binding
soap12:address 
location=https://proxy.example.net/axis2/services/ExampleService.ExampleServiceHttpSoap12Endpoint//
/wsdl:port
wsdl:port name=ExampleServiceHttpEndpoint 
binding=ns:ExampleServiceHttpBinding
http:address 
location=https://proxy.example.net/axis2/services/ExampleService.ExampleServiceHttpEndpoint//
/wsdl:port
/wsdl:service

but it comes back from Axis2 as 

wsdl:service name=ExampleService/

and the preceding wsdl:binding tags are also lost :-(

Neil Youngman


Neil Youngman 
Developer
Wirefast Limited
 
Wirefast provides secure corporate messaging services.
See our messaging solutions at http://www.wirefast.com/
Please consider the environment.
Does this email or attachment need to be printed? 
This message contains confidential information and is intended only 
for the individual named. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please 
notify the sender immediately by email if you have received this 
email by mistake and delete this email from your system.

Email transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses. The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of email transmission.
Wirefast Limited is registered in England  Wales
Company number: 03865860
Registered Office: 7/10 Chandos Street, Cavendish Square, London, W1G 9DQ

inline: logo.jpg

Re: Getting the corect endpoints in WSDL for POJOs behind a proxy

2009-05-11 Thread Sagara Gunathunga
Hi Neil,
here you are trying to modify three HTTP binding based  end points,
but the values of location attribute contain HTTPS address and this
will not work ,  you should use HTTP address for location attribute.

e.g. -
http://proxy.example.net/axis2/services/ExampleService.ExampleServiceHttpSoap12Endpoint

If you want to use HTTPS , first you have to enable HTTPS transport
for Axis2 using axis2.xml file and then try for above . You may refer
Axis2 documentation for this.


Thanks ,


On Mon, May 11, 2009 at 5:58 PM, Neil Youngman
neil.young...@wirefast.com wrote:
 Sagara Gunathunga wrote:
 Hi Neil,
 You could  try for following two parameters in the services.xml file
 along with edited WSDL file in the
  META-INF directory.

 parameter name=useOrignalWSDL true/parameter
 parameter name=modifyUserWSDLPortAddressfalse/parameter

 Thanks for that. Unfortunately, it doesn't work.

 The edited WSDL in my META-INF directory is

 wsdl:service name=ExampleService
 wsdl:port name=ExampleServiceHttpSoap11Endpoint
 binding=ns:ExampleServiceSoap11Binding
 soap:address
 location=https://proxy.example.net/axis2/services/ExampleService.ExampleServiceHttpSoap11Endpoint//
 /wsdl:port
 wsdl:port name=ExampleServiceHttpSoap12Endpoint
 binding=ns:ExampleServiceSoap12Binding
 soap12:address
 location=https://proxy.example.net/axis2/services/ExampleService.ExampleServiceHttpSoap12Endpoint//
 /wsdl:port
 wsdl:port name=ExampleServiceHttpEndpoint
 binding=ns:ExampleServiceHttpBinding
 http:address
 location=https://proxy.example.net/axis2/services/ExampleService.ExampleServiceHttpEndpoint//
 /wsdl:port
 /wsdl:service

 but it comes back from Axis2 as

 wsdl:service name=ExampleService/

 and the preceding wsdl:binding tags are also lost :-(

 Neil Youngman


 Neil Youngman
 Developer
 Wirefast Limited

 Wirefast provides secure corporate messaging services.
 See our messaging solutions at http://www.wirefast.com/

 Please consider the environment.
 Does this email or attachment need to be printed?

 This message contains confidential information and is intended only
 for the individual named. If you are not the named addressee you
 should not disseminate, distribute or copy this email. Please
 notify the sender immediately by email if you have received this
 email by mistake and delete this email from your system.

 Email transmission cannot be guaranteed to be secure or error-free
 as information could be intercepted, corrupted, lost, destroyed,
 arrive late or incomplete, or contain viruses. The sender therefore
 does not accept liability for any errors or omissions in the contents
 of this message which arise as a result of email transmission.
 Wirefast Limited is registered in England  Wales
 Company number: 03865860
 Registered Office: 7/10 Chandos Street, Cavendish Square, London, W1G 9DQ



-- 
Sagara Gunathunga

Blog - http://ssagara.blogspot.com
Web - http://sagaras.awardspace.com/


RE: Getting the corect endpoints in WSDL for POJOs behind a proxy

2009-05-11 Thread Neil Youngman

Sagara Gunathunga wrote:
 Hi Neil,
 here you are trying to modify three HTTP binding based  end points,
 but the values of location attribute contain HTTPS address and this
 will not work ,  you should use HTTP address for location attribute.

I don't want to use https directly. The proxy uses https, but then uses http to 
communicate with my Axis2 servlet.

 e.g. -
 http://proxy.example.net/axis2/services/ExampleService.ExampleServiceHttpSoap12Endpoint

 If you want to use HTTPS , first you have to enable HTTPS transport
 for Axis2 using axis2.xml file and then try for above . You may refer
 Axis2 documentation for this.

HTTPS is already enabled as specified in 
http://ws.apache.org/axis2/1_4/http-transport.html#httpsupport. 

Are you saying I can only have an https URL in the location if the proxy uses 
https to connect to the Axis2 servlet?

Neil Youngman
winmail.dat

using Axis2 wsdl2java to generate Axis1 client stubs

2009-05-11 Thread edward . thompson
I am using the Axis2 wsdl2java utility to generate client side java code 
for Axis1.

The reason is that the Axis1 wsdl2java utility can't seme to handle tree 
wsdl generated by out .NET applications.

The wdl2java utility for Axis2 indicates a backward compatability option, 
(-b). 

However, the code generated a) still references axis2 packages, and b) 
still has a dependency on the Stubs generated for Axis2 use (i.e. it 
doesn't seem to generate standalone code that is free from Axis2 
dependencies.)

So I am wondering what the purpose of the backward compatability option 
is.  I am assuming that I have misunderstood its purpose.


Re: Handle org.w3c.dom.Document in parameters

2009-05-11 Thread Laurent Even

Hi again,

Does someone have a clue on how to solve this problem?
I managed to get it work with OMElement but I'm still stuck with this 
w3c.document


Thanks in advance

Laurent Even a écrit :

Hi all,

Here is a simple java program
package c;
import org.w3c.dom.Document;

public class b{

public b(){
}

public Document testB(Document xml){
return xml;
}


}
AAR deployment was OK
I'm trying to interrogate the web service
http://localhost:8080/axis2/b/testB?xml=...
Here the exception I'm getting in my tomcat logs
...
[ERROR] org.w3c.dom.Document
org.apache.axis2.AxisFault: org.w3c.dom.Document
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at 
org.apache.axis2.engine.DefaultObjectSupplier.getObject(DefaultObjectSupplier.java:30)
at 
org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:410)
at 
org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:722)
at 
org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:670)...

Caused by: java.lang.InstantiationException: org.w3c.dom.Document
at java.lang.Class.newInstance0(Class.java:340)
at java.lang.Class.newInstance(Class.java:308)
...



WSDL generated by AXIS2
?xml version=1.0 encoding=UTF-8 ?
- wsdl:definitions xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; 
xmlns:ns1=http://org.apache.axis2/xsd; xmlns:ns=http://c; 
xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl; 
xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; 
xmlns:ax21=http://dom.w3c.org/xsd; 
xmlnss=http://www.w3.org/2001/XMLSchema; 
xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; 
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; 
xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; 
targetNamespace=http://c;

wsdl:documentationb/wsdl:documentation
- wsdl:types
- xs:schema attributeFormDefault=qualified 
elementFormDefault=qualified targetNamespace=http://dom.w3c.org/xsd;

- xs:complexType name=Document
- xs:sequence
xs:element minOccurs=0 name=doctype nillable=true 
type=ax21ocumentType /
xs:element minOccurs=0 name=documentElement nillable=true 
type=ax21:Element /
xs:element minOccurs=0 name=documentURI nillable=true 
type=xs:string /
xs:element minOccurs=0 name=domConfig nillable=true 
type=ax21OMConfiguration /
xs:element minOccurs=0 name=implementation nillable=true 
type=ax21OMImplementation /
xs:element minOccurs=0 name=inputEncoding nillable=true 
type=xs:string /

xs:element minOccurs=0 name=strictErrorChecking type=xs:boolean /
xs:element minOccurs=0 name=xmlEncoding nillable=true 
type=xs:string /

xs:element minOccurs=0 name=xmlStandalone type=xs:boolean /
xs:element minOccurs=0 name=xmlVersion nillable=true 
type=xs:string /

/xs:sequence
/xs:complexType
- xs:complexType name=DocumentType
- xs:sequence
xs:element minOccurs=0 name=entities nillable=true 
type=ax21:NamedNodeMap /
xs:element minOccurs=0 name=internalSubset nillable=true 
type=xs:string /

xs:element minOccurs=0 name=name nillable=true type=xs:string /
xs:element minOccurs=0 name=notations nillable=true 
type=ax21:NamedNodeMap /
xs:element minOccurs=0 name=publicId nillable=true 
type=xs:string /
xs:element minOccurs=0 name=systemId nillable=true 
type=xs:string /

/xs:sequence
/xs:complexType
- xs:complexType name=NamedNodeMap
- xs:sequence
xs:element minOccurs=0 name=length type=xs:int /
xs:element minOccurs=0 name=namedItem nillable=true 
type=ax21:Node /
xs:element minOccurs=0 name=namedItemNS nillable=true 
type=ax21:Node /

/xs:sequence
/xs:complexType
- xs:complexType name=Node
- xs:sequence
xs:element minOccurs=0 name=attributes nillable=true 
type=ax21:NamedNodeMap /
xs:element minOccurs=0 name=baseURI nillable=true 
type=xs:string /
xs:element minOccurs=0 name=childNodes nillable=true 
type=ax21:NodeList /
xs:element minOccurs=0 name=firstChild nillable=true 
type=ax21:Node /
xs:element minOccurs=0 name=lastChild nillable=true 
type=ax21:Node /
xs:element minOccurs=0 name=localName nillable=true 
type=xs:string /
xs:element minOccurs=0 name=namespaceURI nillable=true 
type=xs:string /
xs:element minOccurs=0 name=nextSibling nillable=true 
type=ax21:Node /
xs:element minOccurs=0 name=nodeName nillable=true 
type=xs:string /

xs:element minOccurs=0 name=nodeType type=xs:short /
xs:element minOccurs=0 name=nodeValue nillable=true 
type=xs:string /
xs:element minOccurs=0 name=ownerDocument nillable=true 
type=ax21ocument /
xs:element minOccurs=0 name=parentNode nillable=true 
type=ax21:Node /
xs:element minOccurs=0 name=prefix nillable=true 
type=xs:string /
xs:element minOccurs=0 name=previousSibling nillable=true 
type=ax21:Node /
xs:element minOccurs=0 name=textContent nillable=true 
type=xs:string /

/xs:sequence
/xs:complexType
- xs:complexType name=NodeList
- xs:sequence
xs:element minOccurs=0 name=length type=xs:int /
/xs:sequence
/xs:complexType
- xs:complexType name=Element
- xs:sequence
xs:element minOccurs=0 name=attributeNode nillable=true 
type=ax21:Attr /
xs:element minOccurs=0 name=attributeNodeNS nillable=true 
type=ax21:Attr 

RE: ArrayList or Hashmap returning Webservice

2009-05-11 Thread Minh Nguyen
The best way is to convert into Json format string.In the other
receiver, you can use json api to convert back to array list or hashMap.

 

Hope this will help

 

 

From: Appasamy Thirugnana [mailto:athirugn...@sapient.com] 
Sent: Saturday, May 09, 2009 1:49 AM
To: axis-user@ws.apache.org
Subject: ArrayList or Hashmap returning Webservice

 

 

Hi,

 

 Can anyone provide me some tutorial on how we can return ArrayList or
HashMap in a webservice? Is it possible?

 

 

Thanks

Appasamy T 



RE: using Axis2 wsdl2java to generate Axis1 client stubs

2009-05-11 Thread Martin Gainty

Good Morning Edward

could you explain the schema/namespace which defines DotNet tree element?
could you explain what is the purpose of DotNet tree element?
attaching your DotNet generated wsdl would be helpful

Thank You,
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




To: axis-user@ws.apache.org
Subject: using Axis2 wsdl2java to generate Axis1 client stubs
From: edward.thomp...@wachovia.com
Date: Mon, 11 May 2009 09:18:08 -0400



I am using the Axis2 wsdl2java utility
to generate client side java code for Axis1.



The reason is that the Axis1 wsdl2java
utility can't seme to handle tree wsdl generated by out .NET
applications.



The wdl2java utility for Axis2 indicates
a backward compatability option, (-b).  



However, the code generated a) still
references axis2 packages, and b) still has a dependency on the Stubs generated
for Axis2 use (i.e. it doesn't seem to generate standalone code that is
free from Axis2 dependencies.)



So I am wondering what the purpose of
the backward compatability option is.  I am assuming that I have misunderstood
its purpose.


_
Hotmail® goes with you. 
http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009

RE: Re: Axis2: Returning an Object as AnyType - get error

2009-05-11 Thread Raghu Upadhyayula
Hi Boris,

 

You can have the return type as OMElement.  With that you can return
anything you want (it could be a string, date, Boolean or something
else).

 

You'll define it in WSDL like this.

 

any namespace=##targetNamespace minOccurs=0
processContents=lax/

 

 

Thanks

Raghu

From: Boris Klug [mailto:bo...@klg.de] 
Sent: Monday, May 11, 2009 2:44 AM
To: Chinmoy Chakraborty; axis-user@ws.apache.org
Subject: Re: Re: Axis2: Returning an Object as AnyType - get error

 

Hello!

Thank you for your suggestion. I have done it in another case where I
had to return an array of data holder objects. 

Here I realy want to return a String, Integer, Date or Boolean. What I
cant do - but that would be realy ugly - is to create a class like

class ReturnValue {
  public String aString;
  public Integer aInteger;
  public Boolean aBoolean;
}

and only set the value of the type I want to return. It would work - but
its ugly.

So some other hints?

- original Nachricht 

Betreff: Re: Axis2: Returning an Object as AnyType - get error
Gesendet: Mo, 11. Mai 2009
Von: Chinmoy Chakraborty




Hello,

 

I had the same problem when I tried to migrate Axis 1.4 to Axis2 1.4.
Only difference was in my case I was returning Object array (Object[]
which was 2D array, array of arrays).

 

The developers said it works but it didn't work for me. the solution was
to use ComplexTypeArray. If you want to return a complextype, make a
class and use array of that class as return type. e.g. suppose i want to
return names and addresses of people, so i will make class People.

 

class People{

  String name;

  String address;

  int phone_number;

  etc..

}

 

and People[] will be return type and it works perfectly OK. In your case
it will work if you use specific type or complex type instead of Object.

 

Chinmoy

 


 

On Fri, May 8, 2009 at 7:27 PM, Boris Klug bo...@klg.de wrote:

Hi!

We want to migrate a Axis 1.4 webservice to Axis2. The webservice is
generated from a POJO Java class which contains a method like this:

 public Object getData() {
   return a string;
 }

The WSDL generated by Axis2 looks like this:

xs:element name=getDataResponse
  xs:complexType
xs:sequence
  xs:element minOccurs=0
  name=return nillable=true type=xs:anyType/
/xs:sequence
  /xs:complexType
/xs:element

The client is generated from the wsdl using wsdl2java. When I test the
web service with GetDataResponse gdr = stub.getData(); it generates the
following exception:

org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
Any type element type has not been given
   at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
   at package.MyServiceStub.fromOM(ZederbasicServiceStub.java:14738)

The Object returned by getData() can be a String, Integer, Boolean or
Date, no other types. All can be serialized by Axis2.

In Axis 1.4 returning an Object was no problem. I search the mailing
list but found no hint.

Any ideas how I can get this to work?

Thank you in advance.


--
Boris Klug, Koblenz, bo...@klg.de, Fax: 0261-1334249




--- original Nachricht Ende 



[embeding axis2 web service]

2009-05-11 Thread Vaibhav Arya
Hi All,

 

I have successfully created a web service and tested that it is successfully
deployed. 

 

Now, how to embed this web service in my existing project (made in JSP,
Servlets) so that I could call some existing project's APIs and methods in
my web service.

 

All I want to say is, how to configure my web service in existing project.
Do I need to have repeating code for this web service, as it is working
separately within module 'axis2'

 

Appreciation for quick reply

 

Thanks in advance,

 

Vaibhav Kr. Arya

 



===
Private, Confidential and Privileged. This e-mail and any files and attachments 
transmitted with it are confidential and/or privileged. They are intended 
solely for the use of the intended recipient. The content of this e-mail and 
any file or attachment transmitted with it may have been changed or altered 
without the consent of the author. If you are not the intended recipient, 
please note that any review, dissemination, disclosure, alteration, printing, 
circulation or Transmission of this e-mail and/or any file or attachment 
transmitted with it, is prohibited and may be unlawful. If you have received 
this e-mail or any file or attachment transmitted with it in error please 
notify OTS Solutions at i...@otssolutions.com
===


Re: Getting the corect endpoints in WSDL for POJOs behind a proxy

2009-05-11 Thread Deepal jayasinghe
Hi,
In axis2.xml there is a parameter called hostname, change that to be
the url of Apache, that will solve your problem.

Deepal

 I have an application implemented as a POJO and exposed as a web
 service using axis2, behind an Apache proxy.

 The problem with this configuration is that the WSDL returns endpoint
 addresses pointed to our internal addresses in the 192.168.0.0/16
 subnet. We want the WSDL to pass usable EPRs, i.e. EPRs served by the
 Apache proxy, to external clients, but I have been unable to find any
 method to change the EPRs in hte WSDL.

 The most promising approach I found was setting httpFrontendHostUrl,
 but this only changes the address in the listServices page, it has no
 effect on the WSDL. Post 6 in this devshed thread
 http://archives.devshed.com/forums/apache-92/have-wsdl-soap-address-show-different-public-url-2333639.html
 offers an alternative involving putting an editing WSDL file in the
 META-INF directory, but when I tried it it removed the EPR bindings
 altogether from the WSDL. I suspect that the first parameter in hte
 solution is incorrectly specified as it has attribute name=, which
 seems unlikely to be right.

 I'm sure Axis2 must be able to support this. Can anyone provide a
 solution for me.

 Thanks

 Neil Youngman



 Neil Youngman 
 Developer
 Wirefast Limited


 Wirefast provides secure corporate messaging services.
 See our messaging solutions at _http://www.wirefast.com/_

 Please consider the environment.
 Does this email or attachment need to be printed?

 This message contains confidential information and is intended only
 for the individual named. If you are not the named addressee you
 should not disseminate, distribute or copy this email. Please
 notify the sender immediately by email if you have received this
 email by mistake and delete this email from your system.

 Email transmission cannot be guaranteed to be secure or error-free
 as information could be intercepted, corrupted, lost, destroyed,
 arrive late or incomplete, or contain viruses. The sender therefore
 does not accept liability for any errors or omissions in the contents
 of this message which arise as a result of email transmission.
 Wirefast Limited is registered in England  Wales
 Company number: 03865860
 Registered Office: 7/10 Chandos Street, Cavendish Square, London, W1G 9DQ



-- 
Thank you!


http://blogs.deepal.org
http://deepal.org



RE: [embeding axis2 web service]

2009-05-11 Thread Caristi, Joe
Look at this thread:

http://www.nabble.com/Newbie-question%3A-how-to-plug-axis2-engine-into-existing-web-application-running-in-weblogic-td23411717.html#a23412081



From: Vaibhav Arya [mailto:vaibhav.a...@otssolutions.com]
Sent: Monday, May 11, 2009 10:43 AM
To: axis-user@ws.apache.org
Subject: [embeding axis2 web service]

Hi All,

I have successfully created a web service and tested that it is successfully 
deployed.

Now, how to embed this web service in my existing project (made in JSP, 
Servlets) so that I could call some existing project's APIs and methods in my 
web service.

All I want to say is, how to configure my web service in existing project. Do I 
need to have repeating code for this web service, as it is working separately 
within module 'axis2'

Appreciation for quick reply

Thanks in advance,

Vaibhav Kr. Arya


===
Private, Confidential and Privileged. This e-mail and any files and attachments 
transmitted with it are confidential and/or privileged. They are intended 
solely for the use of the intended recipient. The content of this e-mail and 
any file or attachment transmitted with it may have been changed or altered 
without the consent of the author. If you are not the intended recipient, 
please note that any review, dissemination, disclosure, alteration, printing, 
circulation or Transmission of this e-mail and/or any file or attachment 
transmitted with it, is prohibited and may be unlawful. If you have received 
this e-mail or any file or attachment transmitted with it in error please 
notify OTS Solutions at i...@otssolutions.com
===


STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at g...@whisolutions.com,
and destroy all copies of this message and any attachments.


Re: [embeding axis2 web service]

2009-05-11 Thread Deepal jayasinghe
http://www.developer.com/open/article.php/3777111

 Hi All,

  

 I have successfully created a web service and tested that it is
 successfully deployed.

  

 Now, how to embed this web service in my existing project (made in
 JSP, Servlets) so that I could call some existing project’s APIs and
 methods in my web service.

  

 All I want to say is, *how to configure my web service in existing
 project*. Do I need to have repeating code for this web service, as it
 is working separately within module ‘axis2’

  

 Appreciation for quick reply

  

 Thanks in advance,

  

 Vaibhav Kr. Arya

  


 ===
 Private, Confidential and Privileged. This e-mail and any files and
 attachments transmitted with it are confidential and/or privileged.
 They are intended solely for the use of the intended recipient. The
 content of this e-mail and any file or attachment transmitted with it
 may have been changed or altered without the consent of the author. If
 you are not the intended recipient, please note that any review,
 dissemination, disclosure, alteration, printing, circulation or
 Transmission of this e-mail and/or any file or attachment transmitted
 with it, is prohibited and may be unlawful. If you have received this
 e-mail or any file or attachment transmitted with it in error please
 notify OTS Solutions at i...@otssolutions.com
 ===


-- 
Thank you!


http://blogs.deepal.org
http://deepal.org



upgrading handler from axis1 to axis2-1.4.1

2009-05-11 Thread maalej

Hello every body


Does anyone have any experience with upgrading Apache Axis 1 web service 
to Axis2?  i am currently running Axis1 and would like to upgrade to 
Axis2. Notably, does anyone have any ideas on how to migrate axis1 code 
handler to axis2. 


Any tips or thoughts would be very much appreciated.



can a message part be xsi:nil=true

2009-05-11 Thread krishna.arani

I am in a process of migrating to Axis2 with ADB binding from axis1. 
Basically I have a rpc/literal Web Service operation Response with multiple
parts in it. Of this one of the message part itself can be null. The message
definition looks likes this

 wsdl:message name=TryGetByKeyTenantResponse 
wsdl:part name=orderKey type=na:OrderKey / 
wsdl:part name=entity type=ys:TenantValue / 
 /wsdl:message 

In the above example part entity will be null if no object is found for the
request. so the expected soap response will be 

s5:entity xsi:nil=1 xmlns:s5=http://www.syndesis.com/ys/intf;   
   
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance/ 

But the ADB Wraper class generated from wsdl2java throws exception when
entity is nil. 

Is there any way where I can define a wraper for the messages myself and
generate the code unwrapped way. Thanks in advance for the help.

-Krishna Arani



-- 
View this message in context: 
http://www.nabble.com/can-a-message-part-be-xsi%3Anil%3D%22true%22-tp23486906p23486906.html
Sent from the Axis - User mailing list archive at Nabble.com.



Web Service Calling Another Web Service

2009-05-11 Thread Mark Darnell
We have a web service that needs to call another web service written by
a third-party. For testing purposes we have both web services running
under the same Axis2 installation on one server. When we attempt to call
the third-party web service from our web service, we get the following
exception (thrown by the third-party web service):

org.apache.axis2.AxisFault: The server did not recognize the action
which it received

We have no idea how to resolve this exception or what is causing it. Our
configuration is:

JDK version 1.6.0_11
Axis2 version 1.3
Tomcat version 5.5.20 (Servlet version 2.4)

Does anyone have any ideas on how to resolve this issue? Thanks.


Mark Darnell
BIT Systems, Inc.
(703) 742-7660 x110



Re: Web Service Calling Another Web Service

2009-05-11 Thread Deepal Jayasinghe
As I can understand it should be due to the incorrect soap action,
please check the WSDL of the third party service and set the correct
SOAP action.

Deepal

Mark Darnell wrote:

 We have a web service that needs to call another web service written
 by a third-party. For testing purposes we have both web services
 running under the same Axis2 installation on one server. When we
 attempt to call the third-party web service from our web service, we
 get the following exception (thrown by the third-party web service):

 org.apache.axis2.AxisFault: The server did not recognize the action
 which it received

 We have no idea how to resolve this exception or what is causing it.
 Our configuration is:

 JDK version 1.6.0_11

 Axis2 version 1.3

 Tomcat version 5.5.20 (Servlet version 2.4)

 Does anyone have any ideas on how to resolve this issue? Thanks.

 Mark Darnell

 BIT Systems, Inc.

 (703) 742-7660 x110


-- 
Thank you!


http://blogs.deepal.org
http://deepal.org