Re:

2007-11-01 Thread Paul Fremantle
Feng

You should just need to call

stub._getServiceClient().getOptions().setUsername(foo);
stub._getServiceClient().getOptions().setPassword(bar);

Paul

On 10/31/07, Feng Lu [EMAIL PROTECTED] wrote:



 I have sent you an email yesterday asking whether AXIS2 support WS-policy
 or not, because I saw some of the thread in the user group with the similar
 topics. If you could send me any suggestion or information, that would
 really appreciated!

 Here is our situation: we have a WS service WSDL (attched bellow) with
 WS-policy, hosted by Weblogic server. I used Axis2 on client side (with
 Rapart extension) to generate the stub and I am able to see the setPolicy is
 called in the stub source code. However, I am not sure what I should do to
 write some client code with Axis2 to support the policy. Our WSDL policy is
 very simple, just with user name and password:

 wsp:Policy s0:Id=Auth.xml
 - wssp:Identity xmlns:wssp=http://www.bea.com/wls90/security/policy;
 - wssp:SupportedTokens
 - wssp:SecurityToken TokenType=
 http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken
 
   wssp:UsePassword Type=
 http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText;
 /
   /wssp:SecurityToken
   /wssp:SupportedTokens
   /wssp:Identity
   /wsp:Policy

 Any help would be greatly appreciated.

 Thanks

 Frank.

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




-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
[EMAIL PROTECTED]

Oxygenating the Web Service Platform, www.wso2.com


RE: Serialize/Deserialize

2007-11-01 Thread Gudla, Natraj (GE Money, consultant)
This is also possible. All that you require is to build an XMLStreamReader and 
pass it to the parse method from the factory of your top level class. Check my 
sample code below. I created a stream reader from a sample xml file, in your 
case you can figure out to pass a string having the xml. Loan request is a 
binding class.
 
DocumentBuilderFactory documentBuilderFactory = 
DocumentBuilderFactory.newInstance();

InputSource inputSource = new InputSource(xmldata/LnRq_Accept.xml); 

Document document = 
documentBuilderFactory.newDocumentBuilder().parse(inputSource);

StringWriter sw = new StringWriter();

Transformer serializer = TransformerFactory.newInstance().newTransformer();

serializer.transform(new DOMSource(document), new StreamResult(sw));

XMLStreamReader reader = 
XMLInputFactory.newInstance().createXMLStreamReader(new 
ByteArrayInputStream(sw.toString().getBytes()));

LoanRequest lnReq = LoanRequest.Factory.parse(reader);

-Original Message-
From: Sudhir Sharma [mailto:[EMAIL PROTECTED]
Sent: 01 November 2007 04:34
To: axis-user@ws.apache.org
Subject: RE: Serialize/Deserialize



Hi,

 

I am also facing the same problem. Can anyone help us out.

Any help will be appreciated. 

 

Thanks  Best Regards,

Sudhir Sharma


  _  


From: ABBUHL Richard NL [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 31, 2007 4:43 PM
To: axis-user@ws.apache.org
Subject: Serialize/Deserialize

 

Axis allows you to serialize an object into XML using a SerializationContext.  
For example,

 

   // serialize the object

  StringWriter strWriter = new StringWriter();

  SerializationContext ctx = new SerializationContext(strWriter, 
MessageContext.getCurrentContext());

  ctx.serialize(new QName(MyObjectNamespace,  MyObject), null, myObject, 
null, Boolean.FALSE, Boolean.FALSE);

  String value = strWriter.toString();

 

Is it possible to use Axis to deserialize this string back into an object of 
type MyObject?  If so, can you please provide an example?

 

Regards,
Richard

 

---
This message is intended for the addressee or its representative only. Any form 
of unauthorized use, publication, reproduction, copying or disclosure of the 
content of this e-mail is not permitted. If you are not the intended recipient 
of this e-mail message and its contents, please notify the sender immediately 
and delete this message and all its attachments subsequently.



RE: Serialize/Deserialize

2007-11-01 Thread ABBUHL Richard NL
Thanks for the reply.  On the last line you indicated that LoanRequest
is a binding class.  The class which I need to parse was generated by
Axis and it only implements Serializable so there is no Factory.parse
method available.  Any suggestions?

 



From: Gudla, Natraj (GE Money, consultant) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 01, 2007 9:40 AM
To: axis-user@ws.apache.org
Subject: RE: Serialize/Deserialize

 

This is also possible. All that you require is to build an
XMLStreamReader and pass it to the parse method from the factory of your
top level class. Check my sample code below. I created a stream reader
from a sample xml file, in your case you can figure out to pass a string
having the xml. Loan request is a binding class.

 

DocumentBuilderFactory documentBuilderFactory =
DocumentBuilderFactory.newInstance();

InputSource inputSource = new InputSource(xmldata/LnRq_Accept.xml); 

Document document =
documentBuilderFactory.newDocumentBuilder().parse(inputSource);

StringWriter sw = new StringWriter();

Transformer serializer =
TransformerFactory.newInstance().newTransformer();

serializer.transform(new DOMSource(document), new StreamResult(sw));

XMLStreamReader reader =
XMLInputFactory.newInstance().createXMLStreamReader(new
ByteArrayInputStream(sw.toString().getBytes()));

LoanRequest lnReq = LoanRequest.Factory.parse(reader);

-Original Message-
From: Sudhir Sharma [mailto:[EMAIL PROTECTED]
Sent: 01 November 2007 04:34
To: axis-user@ws.apache.org
Subject: RE: Serialize/Deserialize

Hi,

 

I am also facing the same problem. Can anyone help us out.

Any help will be appreciated. 

 

Thanks  Best Regards,

Sudhir Sharma





From: ABBUHL Richard NL [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 31, 2007 4:43 PM
To: axis-user@ws.apache.org
Subject: Serialize/Deserialize

 

Axis allows you to serialize an object into XML using a
SerializationContext.  For example,

 

   // serialize the object

  StringWriter strWriter = new StringWriter();

  SerializationContext ctx = new SerializationContext(strWriter,
MessageContext.getCurrentContext());

  ctx.serialize(new QName(MyObjectNamespace,  MyObject),
null, myObject, null, Boolean.FALSE, Boolean.FALSE);

  String value = strWriter.toString();

 

Is it possible to use Axis to deserialize this string back into
an object of type MyObject?  If so, can you please provide an example?

 

Regards,
Richard

 



---
This message is intended for the addressee or its representative
only. Any form of unauthorized use, publication, reproduction, copying
or disclosure of the content of this e-mail is not permitted. If you are
not the intended recipient of this e-mail message and its contents,
please notify the sender immediately and delete this message and all its
attachments subsequently.



RE: Serialize/Deserialize

2007-11-01 Thread Gudla, Natraj (GE Money, consultant)
I didnt quite get when you said. In my scenario i have generated the binding 
classes using a wsdl, referring some xsds. So i have my top most tag of the xml 
data as a class generated for me. This has parse methods. Ideally that is how 
even axis resolves any incoming xml requests when you hit the service. 
 
I am not sure when you said your class does not have factory. What is your 
scenario? 

-Original Message-
From: ABBUHL Richard NL [mailto:[EMAIL PROTECTED]
Sent: 01 November 2007 09:47
To: axis-user@ws.apache.org
Subject: RE: Serialize/Deserialize



Thanks for the reply.  On the last line you indicated that LoanRequest is a 
binding class.  The class which I need to parse was generated by Axis and it 
only implements Serializable so there is no Factory.parse method available.  
Any suggestions?

 


  _  


From: Gudla, Natraj (GE Money, consultant) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 01, 2007 9:40 AM
To: axis-user@ws.apache.org
Subject: RE: Serialize/Deserialize

 

This is also possible. All that you require is to build an XMLStreamReader and 
pass it to the parse method from the factory of your top level class. Check my 
sample code below. I created a stream reader from a sample xml file, in your 
case you can figure out to pass a string having the xml. Loan request is a 
binding class.

 

DocumentBuilderFactory documentBuilderFactory = 
DocumentBuilderFactory.newInstance();

InputSource inputSource = new InputSource(xmldata/LnRq_Accept.xml); 

Document document = 
documentBuilderFactory.newDocumentBuilder().parse(inputSource);

StringWriter sw = new StringWriter();

Transformer serializer = TransformerFactory.newInstance().newTransformer();

serializer.transform(new DOMSource(document), new StreamResult(sw));

XMLStreamReader reader = 
XMLInputFactory.newInstance().createXMLStreamReader(new 
ByteArrayInputStream(sw.toString().getBytes()));

LoanRequest lnReq = LoanRequest.Factory.parse(reader);

-Original Message-
From: Sudhir Sharma [mailto:[EMAIL PROTECTED]
Sent: 01 November 2007 04:34
To: axis-user@ws.apache.org
Subject: RE: Serialize/Deserialize

Hi,

 

I am also facing the same problem. Can anyone help us out.

Any help will be appreciated. 

 

Thanks  Best Regards,

Sudhir Sharma


  _  


From: ABBUHL Richard NL [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 31, 2007 4:43 PM
To: axis-user@ws.apache.org
Subject: Serialize/Deserialize

 

Axis allows you to serialize an object into XML using a SerializationContext.  
For example,

 

   // serialize the object

  StringWriter strWriter = new StringWriter();

  SerializationContext ctx = new SerializationContext(strWriter, 
MessageContext.getCurrentContext());

  ctx.serialize(new QName(MyObjectNamespace,  MyObject), null, myObject, 
null, Boolean.FALSE, Boolean.FALSE);

  String value = strWriter.toString();

 

Is it possible to use Axis to deserialize this string back into an object of 
type MyObject?  If so, can you please provide an example?

 

Regards,
Richard

 

---
This message is intended for the addressee or its representative only. Any form 
of unauthorized use, publication, reproduction, copying or disclosure of the 
content of this e-mail is not permitted. If you are not the intended recipient 
of this e-mail message and its contents, please notify the sender immediately 
and delete this message and all its attachments subsequently.



RE: Spring inside an AAR (Without a ServletContext)

2007-11-01 Thread Sunesh Kumra
Hi Robert,

Thanks for your response. I have made sure there is no other
axis2-spring*jar anywhere in the container. BTW, there is no WEB-INF
directory for me as I'm not running this within a Servlet Container (I'm
directly deploying the aar into axis2 itself). I'm directly dropping
these jars in the lib directory at the root level of the aar as shown
below.

Cheers,
Sunesh

-Original Message-
From: robert lazarski [mailto:[EMAIL PROTECTED] 
Sent: 31 October 2007 18:54
To: axis-user@ws.apache.org
Subject: Re: Spring inside an AAR (Without a ServletContext)

Spring in the aar is an advanced use case, but many people have had
success by following the tutorial. Have you made sure that there are no
other spring or axis2-spring jars anywhere else in the container, ie,
you have removed the axis2-spring* jars in WEB-INF/lib?

HTH,
Robert

On 10/31/07, Sunesh Kumra [EMAIL PROTECTED] wrote:


 Hello,

 I have been struggling to get my Axis2 service (not deployed in any 
 Servlet
 Container) to work with Spring. I followed the example in 
 http://ws.apache.org/axis2/1_1/spring.html, but not much luck. Did 
 anyone get that example to work ? I had to place the spring.jar and 
 axis2-jar in the root level for the Spring initialization to even 
 proceed anywhere. After that it got stuck with the following 
 exceptions. The thing that puzzles me is that the classes that it 
 complains about are in the same jar as the classes that invoke them !!

 ./springExample.aar
 ./META-INF
 ./META-INF/MANIFEST.MF
 ./META-INF/services.xml
 ./applicationContext.xml
 ./lib
 ./lib/axis2-spring-SNAPSHOT.jar
 ./lib/spring.jar
 ./spring
 ./spring/MyBean.class
 ./spring/MyBeanImpl.class
 ./spring/SpringAwareService.class
 ./spring/SpringInit.class


 Cheers,
 Sunesh

 The stack trace of the error is:

 Starting spring init
 [INFO] Refreshing
 org.springframework.context.support.ClassPathXmlApplicationCon
 [EMAIL PROTECTED]: display name
 [org.springframework.context.support.ClassPathXmlAppl
 [EMAIL PROTECTED]; startup date [Wed Oct 31 18:11:09 GMT 2007]; 
 root of co ntext hierarchy [INFO] Loading XML bean definitions from 
 class path resource [applicationContext .xml] [INFO] Bean factory for 
 application context [org.springframework.context.support
 [EMAIL PROTECTED]:
 org.springframework.beans.factory.supp
 [EMAIL PROTECTED]
 [INFO] Pre-instantiating singletons in 
 org.springframework.beans.factory.support
 [EMAIL PROTECTED]: defining beans 
 [applicationContext,reserveAm ountChargingService,myBean]; root of 
 factory hierarchy [INFO] Destroying singletons in 
 org.springframework.beans.factory.support.Defaul
 [EMAIL PROTECTED]: defining beans 
 [applicationContext,reserveAmountCha
 rgingService,myBean]; root of factory hierarchy
 org.springframework.beans.factory.CannotLoadBeanClassException:
 Error loading cl
 ass
 [org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder
 ]
 for
 bean with name 'applicationContext' defined in class path resource 
 [applicationC
 ontext.xml]: problem with class file or dependent class; nested 
 exception is jav
 a.lang.NoClassDefFoundError:
 org/springframework/context/ApplicationContextAware

 Caused by: java.lang.NoClassDefFoundError:
 org/springframework/context/Applicati
 onContextAware
 at java.lang.ClassLoader.defineClass1(Native
 Method)
 at
 java.lang.ClassLoader.defineClass(ClassLoader.java:620)
 at
 java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
 4)
 at
 java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
 at
 java.net.URLClassLoader.access$000(URLClassLoader.java:56)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
 at
 java.security.AccessController.doPrivileged(Native Method)
 at
 java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
 at
 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
 at
 org.springframework.util.ClassUtils.forName(ClassUtils.java:201)
 at
 org.springframework.beans.factory.support.AbstractBeanDefinition.reso
 lveBeanClass(AbstractBeanDefinition.java:327)
 at
 org.springframework.beans.factory.support.AbstractBeanFactory.resolve
 BeanClass(AbstractBeanFactory.java:1075)
 at
 org.springframework.beans.factory.support.DefaultListableBeanFactory.

 Ericsson Services Limited

 Registered Office: Unit 4, Midleton Gate, Guildford Business Park, 
 Guildford, Surrey, GU2 8SG

 Registered Number in England and Wales: 3709800

 This communication is confidential and intended solely for the
addressee(s).
 Any unauthorised review, use, disclosure or 

RE: Serialize/Deserialize

2007-11-01 Thread ABBUHL Richard NL
Wsdl2java creates an object for each complex type in the XSD and we are
serializing one of these complex types.  The Java class generated for a
complex type implements Serializable and there are no parse methods
available.  We are using Axis 1.3.  What version of Axis are you using?

 



From: Gudla, Natraj (GE Money, consultant) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 01, 2007 10:58 AM
To: axis-user@ws.apache.org
Subject: RE: Serialize/Deserialize

 

I didnt quite get when you said. In my scenario i have generated the
binding classes using a wsdl, referring some xsds. So i have my top most
tag of the xml data as a class generated for me. This has parse methods.
Ideally that is how even axis resolves any incoming xml requests when
you hit the service. 

 

I am not sure when you said your class does not have factory. What is
your scenario? 

-Original Message-
From: ABBUHL Richard NL [mailto:[EMAIL PROTECTED]
Sent: 01 November 2007 09:47
To: axis-user@ws.apache.org
Subject: RE: Serialize/Deserialize

Thanks for the reply.  On the last line you indicated that
LoanRequest is a binding class.  The class which I need to parse was
generated by Axis and it only implements Serializable so there is no
Factory.parse method available.  Any suggestions?

 





From: Gudla, Natraj (GE Money, consultant)
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 01, 2007 9:40 AM
To: axis-user@ws.apache.org
Subject: RE: Serialize/Deserialize

 

This is also possible. All that you require is to build an
XMLStreamReader and pass it to the parse method from the factory of your
top level class. Check my sample code below. I created a stream reader
from a sample xml file, in your case you can figure out to pass a string
having the xml. Loan request is a binding class.

 

DocumentBuilderFactory documentBuilderFactory =
DocumentBuilderFactory.newInstance();

InputSource inputSource = new
InputSource(xmldata/LnRq_Accept.xml); 

Document document =
documentBuilderFactory.newDocumentBuilder().parse(inputSource);

StringWriter sw = new StringWriter();

Transformer serializer =
TransformerFactory.newInstance().newTransformer();

serializer.transform(new DOMSource(document), new
StreamResult(sw));

XMLStreamReader reader =
XMLInputFactory.newInstance().createXMLStreamReader(new
ByteArrayInputStream(sw.toString().getBytes()));

LoanRequest lnReq = LoanRequest.Factory.parse(reader);

-Original Message-
From: Sudhir Sharma
[mailto:[EMAIL PROTECTED]
Sent: 01 November 2007 04:34
To: axis-user@ws.apache.org
Subject: RE: Serialize/Deserialize

Hi,

 

I am also facing the same problem. Can anyone help us
out.

Any help will be appreciated. 

 

Thanks  Best Regards,

Sudhir Sharma





From: ABBUHL Richard NL
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 31, 2007 4:43 PM
To: axis-user@ws.apache.org
Subject: Serialize/Deserialize

 

Axis allows you to serialize an object into XML using a
SerializationContext.  For example,

 

   // serialize the object

  StringWriter strWriter = new StringWriter();

  SerializationContext ctx = new
SerializationContext(strWriter, MessageContext.getCurrentContext());

  ctx.serialize(new QName(MyObjectNamespace,
MyObject), null, myObject, null, Boolean.FALSE, Boolean.FALSE);

  String value = strWriter.toString();

 

Is it possible to use Axis to deserialize this string
back into an object of type MyObject?  If so, can you please provide an
example?

 

Regards,
Richard

 



---
This message is intended for the addressee or its
representative only. Any form of unauthorized use, publication,
reproduction, copying or disclosure of the content of this e-mail is not
permitted. If you are not the intended recipient of this e-mail message
and its contents, please notify the sender immediately and delete this
message and all its attachments subsequently.



RE: Serialize/Deserialize

2007-11-01 Thread Gudla, Natraj (GE Money, consultant)
We are using axis2 1.2. Not sure why your complex type does not have factory 
method. I have verified my complex types and it has factory methods. I 
understand it is required, as this is how the higer level tags delegate the 
parsing of child tags using the parse of the lower elements.
 
 

-Original Message-
From: ABBUHL Richard NL [mailto:[EMAIL PROTECTED]
Sent: 01 November 2007 10:35
To: axis-user@ws.apache.org
Subject: RE: Serialize/Deserialize



Wsdl2java creates an object for each complex type in the XSD and we are 
serializing one of these complex types.  The Java class generated for a complex 
type implements Serializable and there are no parse methods available.  We are 
using Axis 1.3.  What version of Axis are you using?

 


  _  


From: Gudla, Natraj (GE Money, consultant) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 01, 2007 10:58 AM
To: axis-user@ws.apache.org
Subject: RE: Serialize/Deserialize

 

I didnt quite get when you said. In my scenario i have generated the binding 
classes using a wsdl, referring some xsds. So i have my top most tag of the xml 
data as a class generated for me. This has parse methods. Ideally that is how 
even axis resolves any incoming xml requests when you hit the service. 

 

I am not sure when you said your class does not have factory. What is your 
scenario? 

-Original Message-
From: ABBUHL Richard NL [mailto:[EMAIL PROTECTED]
Sent: 01 November 2007 09:47
To: axis-user@ws.apache.org
Subject: RE: Serialize/Deserialize

Thanks for the reply.  On the last line you indicated that LoanRequest is a 
binding class.  The class which I need to parse was generated by Axis and it 
only implements Serializable so there is no Factory.parse method available.  
Any suggestions?

 


  _  


From: Gudla, Natraj (GE Money, consultant) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 01, 2007 9:40 AM
To: axis-user@ws.apache.org
Subject: RE: Serialize/Deserialize

 

This is also possible. All that you require is to build an XMLStreamReader and 
pass it to the parse method from the factory of your top level class. Check my 
sample code below. I created a stream reader from a sample xml file, in your 
case you can figure out to pass a string having the xml. Loan request is a 
binding class.

 

DocumentBuilderFactory documentBuilderFactory = 
DocumentBuilderFactory.newInstance();

InputSource inputSource = new InputSource(xmldata/LnRq_Accept.xml); 

Document document = 
documentBuilderFactory.newDocumentBuilder().parse(inputSource);

StringWriter sw = new StringWriter();

Transformer serializer = TransformerFactory.newInstance().newTransformer();

serializer.transform(new DOMSource(document), new StreamResult(sw));

XMLStreamReader reader = 
XMLInputFactory.newInstance().createXMLStreamReader(new 
ByteArrayInputStream(sw.toString().getBytes()));

LoanRequest lnReq = LoanRequest.Factory.parse(reader);

-Original Message-
From: Sudhir Sharma [mailto:[EMAIL PROTECTED]
Sent: 01 November 2007 04:34
To: axis-user@ws.apache.org
Subject: RE: Serialize/Deserialize

Hi,

 

I am also facing the same problem. Can anyone help us out.

Any help will be appreciated. 

 

Thanks  Best Regards,

Sudhir Sharma


  _  


From: ABBUHL Richard NL [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 31, 2007 4:43 PM
To: axis-user@ws.apache.org
Subject: Serialize/Deserialize

 

Axis allows you to serialize an object into XML using a SerializationContext.  
For example,

 

   // serialize the object

  StringWriter strWriter = new StringWriter();

  SerializationContext ctx = new SerializationContext(strWriter, 
MessageContext.getCurrentContext());

  ctx.serialize(new QName(MyObjectNamespace,  MyObject), null, myObject, 
null, Boolean.FALSE, Boolean.FALSE);

  String value = strWriter.toString();

 

Is it possible to use Axis to deserialize this string back into an object of 
type MyObject?  If so, can you please provide an example?

 

Regards,
Richard

 

---
This message is intended for the addressee or its representative only. Any form 
of unauthorized use, publication, reproduction, copying or disclosure of the 
content of this e-mail is not permitted. If you are not the intended recipient 
of this e-mail message and its contents, please notify the sender immediately 
and delete this message and all its attachments subsequently.



[AXIS2] custom https handler : Transport out has not been set

2007-11-01 Thread Alistair Young
I'd like to remap https to another name, e.g. secure as I want to  
use custom ssl handling with it. I've done this:


Protocol authhttps = new Protocol(secure, new  
FedoraProtocolSocketFactory(keystoreLocation, keystorePassword,  
truststoreLocation, truststorePassword, 443);

Protocol.registerProtocol(secure, authhttps);

it works fine using https but when I change it to secure I get  
the error:


Transport out has not been set

when connecting to secure://service.url

is there a way to tell Axis2 how to handle secure - it's really  
https in disguise


thanks,

Alistair



--
mov eax,1
mov ebx,0
int 80h






Re: [AXIS2] custom https handler : Transport out has not been set

2007-11-01 Thread Alistair Young

is this a bug in Axis2? I followed the instructions at:

http://wso2.org/library/1646:

You can provide a virtual protocol name to be used with your new  
socket factory as well. In order to do this, you just have to  
register your new protocol with HTTPClient. Nothing else is required  
to be passed in to Axis engine


I did that but nothing works. I always get the error:

Transport out has not been set

Alistair


--
mov eax,1
mov ebx,0
int 80h




On 1 Nov 2007, at 11:50, Alistair Young wrote:


typo, it should be:

Protocol authhttps = new Protocol(https, new  
FedoraProtocolSocketFactory(keystoreLocation, keystorePassword,  
truststoreLocation, truststorePassword, 443);

Protocol.registerProtocol(secure, authhttps);

Axis2 uses HttpClient but doesn't seem to understand secure  
instead of https. Registering secure as a protocol is enough  
for HttpClient but not Axis2. Is there another step I need to do to  
get Axis2 to work with secure protocol designator?


thanks,

Alistair



--
mov eax,1
mov ebx,0
int 80h




On 1 Nov 2007, at 11:29, Alistair Young wrote:

I'd like to remap https to another name, e.g. secure as I want  
to use custom ssl handling with it. I've done this:


Protocol authhttps = new Protocol(secure, new  
FedoraProtocolSocketFactory(keystoreLocation, keystorePassword,  
truststoreLocation, truststorePassword, 443);

Protocol.registerProtocol(secure, authhttps);

it works fine using https but when I change it to secure I get  
the error:


Transport out has not been set

when connecting to secure://service.url

is there a way to tell Axis2 how to handle secure - it's really  
https in disguise


thanks,

Alistair



--
mov eax,1
mov ebx,0
int 80h










Re: [AXIS2] custom https handler : Transport out has not been set

2007-11-01 Thread Alistair Young

typo, it should be:

Protocol authhttps = new Protocol(https, new  
FedoraProtocolSocketFactory(keystoreLocation, keystorePassword,  
truststoreLocation, truststorePassword, 443);

Protocol.registerProtocol(secure, authhttps);

Axis2 uses HttpClient but doesn't seem to understand secure instead  
of https. Registering secure as a protocol is enough for  
HttpClient but not Axis2. Is there another step I need to do to get  
Axis2 to work with secure protocol designator?


thanks,

Alistair



--
mov eax,1
mov ebx,0
int 80h




On 1 Nov 2007, at 11:29, Alistair Young wrote:

I'd like to remap https to another name, e.g. secure as I want  
to use custom ssl handling with it. I've done this:


Protocol authhttps = new Protocol(secure, new  
FedoraProtocolSocketFactory(keystoreLocation, keystorePassword,  
truststoreLocation, truststorePassword, 443);

Protocol.registerProtocol(secure, authhttps);

it works fine using https but when I change it to secure I get  
the error:


Transport out has not been set

when connecting to secure://service.url

is there a way to tell Axis2 how to handle secure - it's really  
https in disguise


thanks,

Alistair



--
mov eax,1
mov ebx,0
int 80h








wsdl2java not including new function

2007-11-01 Thread James Neff

Greetings,

I added a function to an existing working axis2 web service.

The new function works when I call it directly from my browser:

http://appserver2:8080/axis2/services/DataLoaderService/GetProcessorStatus

I get the correct response:

ns:GetProcessorStatusResponse
ns:return1/ns:return
/ns:GetProcessorStatusResponse


I tried using the following command to generate the service stub:

/usr/share/axis2-1.3/bin/./wsdl2java.sh -uri 
http://localhost:8080/axis2/services/DataLoaderService?wsdl -o .


But the new function is not in the class file DataLoaderServiceStub.

What am I doing wrong?

Here is the wsdl:

wsdl:definitions targetNamespace=http://ws.apache.org/axis2;
wsdl:documentationDataLoaderService/wsdl:documentation
−
wsdl:types
−
xs:schema attributeFormDefault=qualified 
elementFormDefault=qualified targetNamespace=http://ws.apache.org/axis2;

−
xs:element name=GetProcessorStatusResponse
−
xs:complexType
−
xs:sequence
xs:element minOccurs=0 name=return type=xs:int/
/xs:sequence
/xs:complexType
/xs:element
−
xs:element name=GetRetrieverParameters
−
xs:complexType
−
xs:sequence
xs:element minOccurs=0 name=retrieverId type=xs:int/
/xs:sequence
/xs:complexType
/xs:element
−
xs:element name=GetRetrieverParametersResponse
−
xs:complexType
−
xs:sequence
xs:element minOccurs=0 name=return nillable=true type=xs:string/
/xs:sequence
/xs:complexType
/xs:element
/xs:schema
/wsdl:types
−
wsdl:message name=GetRetrieverParametersRequest
wsdl:part name=parameters element=ns0:GetRetrieverParameters/
/wsdl:message
−
wsdl:message name=GetRetrieverParametersResponse
wsdl:part name=parameters element=ns0:GetRetrieverParametersResponse/
/wsdl:message
wsdl:message name=GetProcessorStatusRequest/
−
wsdl:message name=GetProcessorStatusResponse
wsdl:part name=parameters element=ns0:GetProcessorStatusResponse/
/wsdl:message
−
wsdl:portType name=DataLoaderServicePortType
−
wsdl:operation name=GetRetrieverParameters
wsdl:input message=ns0:GetRetrieverParametersRequest 
wsaw:Action=urn:GetRetrieverParameters/
wsdl:output message=ns0:GetRetrieverParametersResponse 
wsaw:Action=urn:GetRetrieverParametersResponse/

/wsdl:operation
−
wsdl:operation name=GetProcessorStatus
wsdl:input message=ns0:GetProcessorStatusRequest 
wsaw:Action=urn:GetProcessorStatus/
wsdl:output message=ns0:GetProcessorStatusResponse 
wsaw:Action=urn:GetProcessorStatusResponse/

/wsdl:operation
/wsdl:portType
−
wsdl:binding name=DataLoaderServiceSOAP11Binding 
type=ns0:DataLoaderServicePortType
soap:binding transport=http://schemas.xmlsoap.org/soap/http; 
style=document/

−
wsdl:operation name=GetRetrieverParameters
soap:operation soapAction=urn:GetRetrieverParameters style=document/
−
wsdl:input
soap:body use=literal/
/wsdl:input
−
wsdl:output
soap:body use=literal/
/wsdl:output
/wsdl:operation
−
wsdl:operation name=GetProcessorStatus
soap:operation soapAction=urn:GetProcessorStatus style=document/
−
wsdl:input
soap:body use=literal/
/wsdl:input
−
wsdl:output
soap:body use=literal/
/wsdl:output
/wsdl:operation
/wsdl:binding
−
wsdl:binding name=DataLoaderServiceSOAP12Binding 
type=ns0:DataLoaderServicePortType
soap12:binding transport=http://schemas.xmlsoap.org/soap/http; 
style=document/

−
wsdl:operation name=GetRetrieverParameters
soap12:operation soapAction=urn:GetRetrieverParameters style=document/
−
wsdl:input
soap12:body use=literal/
/wsdl:input
−
wsdl:output
soap12:body use=literal/
/wsdl:output
/wsdl:operation
−
wsdl:operation name=GetProcessorStatus
soap12:operation soapAction=urn:GetProcessorStatus style=document/
−
wsdl:input
soap12:body use=literal/
/wsdl:input
−
wsdl:output
soap12:body use=literal/
/wsdl:output
/wsdl:operation
/wsdl:binding
−
wsdl:binding name=DataLoaderServiceHttpBinding 
type=ns0:DataLoaderServicePortType

http:binding verb=POST/
−
wsdl:operation name=GetRetrieverParameters
http:operation location=DataLoaderService/GetRetrieverParameters/
−
wsdl:input
mime:content type=text/xml part=GetRetrieverParameters/
/wsdl:input
−
wsdl:output
mime:content type=text/xml part=GetRetrieverParameters/
/wsdl:output
/wsdl:operation
−
wsdl:operation name=GetProcessorStatus
http:operation location=DataLoaderService/GetProcessorStatus/
−
wsdl:input
mime:content type=text/xml part=GetProcessorStatus/
/wsdl:input
−
wsdl:output
mime:content type=text/xml part=GetProcessorStatus/
/wsdl:output
/wsdl:operation
/wsdl:binding
−
wsdl:service name=DataLoaderService
−
wsdl:port name=DataLoaderServiceSOAP11port_http 
binding=ns0:DataLoaderServiceSOAP11Binding
soap:address 
location=http://appserver2:8080/axis2/services/DataLoaderService/

/wsdl:port
−
wsdl:port name=DataLoaderServiceSOAP12port_http 
binding=ns0:DataLoaderServiceSOAP12Binding
soap12:address 
location=http://appserver2:8080/axis2/services/DataLoaderService/

/wsdl:port
−
wsdl:port name=DataLoaderServiceHttpport 
binding=ns0:DataLoaderServiceHttpBinding
http:address 
location=http://appserver2:8080/axis2/services/DataLoaderService/

/wsdl:port
/wsdl:service
/wsdl:definitions


Re: Axis2 generated wsdl soap address is 0.0.0.0

2007-11-01 Thread Daniel Herbison

There seems to be an extra interface card on the machine that is not
connected.  Is there a way in tomcat/axis to force it to use a specific card
or ip?



Sanka Samaranayke wrote:
 
 Hi Daniel, 
 
 Can you please check whether the IP of the machine on which you
 experiencing the problem is being set properly? 
 I think the problem must be that the IP of the network interface of that
 particular machine has been set to 0.0.0.0 where it is being picked by
 Axis2 WSDL generating mechanism when calculating service endpoint
 addresses.
 
 --Sanka
 
 
 Daniel Herbison wrote:
 Hi All! 
 I have a web service deployed on one machine under axis2 and i'm calling
 it
 using flex and everything is working great.  However when I place the
 service on another machine under axis2 i can no longer run the services
 from
 flex but they do run fine from the browser.  Flex is complaining about
 the
 soap:address being set to 0.0.0.0, see below.  Why is the WSDL being set
 to
 0.0.0.0 on one machine and on the other machine it is being set to the
 correct ip 

 - wsdl:service name=IEventService 
 - wsdl:port name=IEventServiceSOAP11port_http
 binding=axis2:IEventServiceSOAP11Binding 
   soap:address
 location=http://0.0.0.0:8086/axis2/services/IEventService;
 / 
   /wsdl:port 
 - wsdl:port name=IEventServiceSOAP12port_http
 binding=axis2:IEventServiceSOAP12Binding 
   soap12:address
 location=http://0.0.0.0:8086/axis2/services/IEventService; / 
   /wsdl:port 
 - wsdl:port name=IEventServiceHttpport
 binding=axis2:IEventServiceHttpBinding 
   http:address
 location=http://0.0.0.0:8086/axis2/services/IEventService;
 / 
   /wsdl:port 
   /wsdl:service
   
 
 
 -- 
 Sanka Samaranayake
 WSO2 Inc.
 
 http://www.bloglines.com/blog/sanka
 http://www.wso2.org/
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Axis2-generated-wsdl-soap-address-is-0.0.0.0-tf4713352.html#a13529395
Sent from the Axis - User mailing list archive at Nabble.com.


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



RE: Axis2 WSDL2Java error during service skeliton/stub generation

2007-11-01 Thread Kiran Sriram
Hi Anne,
 
If I define void types as complex types then it is generating server 
skeleton/client stubs properly with out any errors.
but then if you see the method signatures of the methods with void return types 
there is an object by name Set_PortalVariableResponse as return type instead 
of void. That object is not having any properties inside though. This is 
happening even though i use -uw (for unwrapping) as an option for Axis2 
WSDL2Java tool.
 
Thanks,
Kiran


 Date: Wed, 31 Oct 2007 21:29:04 -0400 From: [EMAIL PROTECTED] To: 
 axis-user@ws.apache.org Subject: Re: Axis2 WSDL2Java error during service 
 skeliton/stub generation  You should define a void like this:  
 xsd:element name=set_PortalVariableResponse xsd:complexType/ 
 /xsd:element  If you don't define the type, then the element can contain 
 anything. This definition specifies that the element contains nothing.  
 Anne  On 10/31/07, Kiran Sriram [EMAIL PROTECTED] wrote:   Hi Anne, 
   this basically for void return type of a method. .Net is not having any 
  problem with that.   but Axis2 WSDL2Java is not generating client or 
 server side code.   Kiran  
 Date: Tue, 30 Oct 2007 08:28:03 -0400   From: [EMAIL PROTECTED]   To: 
 axis-user@ws.apache.org   Subject: Re: FW: Axis2 WSDL2Java error during 
 service skeliton/stub  generation  What I meant to say is:  
You have an _element_ defined in the schema: xsd:element 
 name=set_PortalVariableResponse/ As the message says, it has no 
 type defined. You need to specify its   schema type. Anne   
   On 10/29/07, Anne Thomas Manes [EMAIL PROTECTED] wrote:You have 
 a type defined in the schema:   xsd:element 
 name=set_PortalVariableResponse/   As the message says, it has 
 no type defined. You need to specify itsschema type.   
 Anne   On 10/26/07, Kiran Kumar Sriram [EMAIL PROTECTED] 
 wrote: Here is the WSDL file attached with this 
 mail.   
From: [EMAIL PROTECTED] To: axis-user@ws.apache.org 
 Subject: Axis2 WSDL2Java error during service skeliton/stub generation
  Date: Fri, 26 Oct 2007 10:34:30 -0400 Hello All 
 I am getting this error when i try to generate Service 
 Skeleton code  from a WSDL file. This is a new service and we are 
 trying to go in WSDL first approach. We need wsdl to be in 
 Document/literal Wrapped style in  order to be interoperable with 
 .Net framework. .Net generated client stubs with  out any problem 
 but Axis2 WSDL2Java is giving this exception during  service 
 skeleton and client generation times. This is pretty simple WSDL file  
 with just two methods in it. We are trying to generate skeleton and 
 clients  in UNWrapped mode. 
 C:\Code\Axis14ClientTest\Axis14ClientTest1java.exe 
 -Djava.ext.dirs=C:\Softwares \axis2-1.3-bin\axis2-1.3\lib; 
 org.apache.axis2.wsdl.WSDL2Java -s -ss  -uw -sd -d adb 
 -uri PCMConnection.wsdl log4j:WARN No appenders could be found for 
 logger (org.apache.axis2.description. 
 WSDL11ToAllAxisServicesBuilder). log4j:WARN Please initialize the 
 log4j system properly. Exception in thread main 
 org.apache.axis2.wsdl.codegen.CodeGenerationException :  
 org.apache.axis2.wsdl.codegen.CodeGenerationException: Can not 
 determine the s chema type for the set_PortalVariableResponse
  at  
 org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
  ationEngine.java:265) at  
 org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35) at 
  org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24) Caused 
 by:  org.apache.axis2.wsdl.codegen.CodeGenerationException: Can  
not determ ine the schema type for the 
 set_PortalVariableResponse at  
 org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walk
  I have attached WSDL file with this mail. Just to let you 
 know .Net is  fine with this WSDL but not Axis2 WSDL2Java tool.  
Any help is greatly appreciated. Thank you, 
 Kiran 
  Peek-a-boo FREE Tricks  Treats for 
 You! Get 'em!  Climb to the 
 top of the charts! Play Star Shuffle: the word scramble challenge 
 with star power. Play Now!  
 -
  To unsubscribe, e-mail:  [EMAIL PROTECTED] For additional 
 commands, e-mail: [EMAIL PROTECTED] 
 -   To 
 unsubscribe, e-mail:  [EMAIL PROTECTED]   For additional commands, 
 e-mail: [EMAIL PROTECTED]    
 Help yourself to FREE treats served up daily at the Messenger Café. Stop by 
  today!  
 

[Axis2] (Long) Ws-Policy: problem with SAMLtoken and WSAS example

2007-11-01 Thread Massimiliano Masi

Hi All,

I'm very frustrated: I'm developing policies for getting a SAML 2 token
from a WS-Trust STS implemented using Rahas.

I've to put it in the wsse:Security. So I created the following policy  
for the service that needs the token as is [1] (taken from the WSAS  
example).


I got NPE:



19:20:49,721 ERROR [AxisServlet]
java.lang.NullPointerException
at  
java.util.PropertyResourceBundle.handleGetObject(PropertyResourceBundle.java:103)

at java.util.ResourceBundle.getObject(ResourceBundle.java:319)
at java.util.ResourceBundle.getString(ResourceBundle.java:285)
at org.apache.rahas.TrustException.getMessage(TrustException.java:105)
at org.apache.rahas.TrustException.init(TrustException.java:54)
at org.apache.rahas.TrustException.init(TrustException.java:83)
at  
com.spirit.XUA.utils.SpiritTokenIssuer.issue(SpiritTokenIssuer.java:234)


org.apache.axis2.AxisFault: java.lang.NullPointerException
at  
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486)
at  
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
at  
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
at  
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
at  
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at  
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
at  
org.apache.rahas.client.STSClient.requestSecurityToken(STSClient.java:127)
at  
com.spirit.XUA.utils.XUAAssertions.getAuthenticatedViaWSTrust(XUAAssertions.java:430)



So, I cannot access the STS, that gives me a TrustException.

If I use the following policy [2] I got this MTOM (?) exception
client side (after getting in the right way the SAML assertion):




 [java] org.apache.axis2.AxisFault:  
org/apache/axis2/policy/model/MTOMAssertion
 [java] 	at  
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:194)

 [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:747)
 [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:201)
 [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:104)
 [java] 	at  
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)

 [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 [java] 	at  
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 [java] 	at  
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

 [java] at java.lang.reflect.Method.invoke(Method.java:585)
 [java] 	at  
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)

 [java] at org.apache.tools.ant.Task.perform(Task.java:348)
 [java] at org.apache.tools.ant.Target.execute(Target.java:357)
 [java] at org.apache.tools.ant.Target.performTasks(Target.java:385)
 [java] 	at  
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)

 [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
 [java] 	at  
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
 [java] 	at  
org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)

 [java] at 
org.apache.tools.ant.Project.executeTargets(Project.java:1181)
 [java] 	at  
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
 [java] 	at  
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
 [java] Caused by: org.apache.axis2.AxisFault:  
org/apache/axis2/policy/model/MTOMAssertion
 [java] 	at  
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486)
 [java] 	at  
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
 [java] 	at  
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
 [java] 	at  
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
 [java] 	at  
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
 [java] 	at  
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
 [java] 	at  
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)

 [java] at com.test.TestClient.main(TestClient.java:58)
 [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)







[1] http://www.mascanc.net/~max/sts1.xml
[2] http://www.mascanc.net/~max/sts2.xml



Thank you,


 Massimiliano



This message was sent using IMP, the Internet Messaging 

Re: [AXIS2] custom https handler : Transport out has not been set

2007-11-01 Thread Sanka Samaranayke


Hi,

What is the Axis2 version you are using ? Did you try that with Axis2 1.3 ?


Best,
--Sanka


Alistair Young wrote:

is this a bug in Axis2? I followed the instructions at:

http://wso2.org/library/1646:

You can provide a virtual protocol name to be used with your new 
socket factory as well. In order to do this, you just have to register 
your new protocol with HTTPClient. Nothing else is required to be 
passed in to Axis engine


I did that but nothing works. I always get the error:

Transport out has not been set

Alistair


--
mov eax,1
mov ebx,0
int 80h




On 1 Nov 2007, at 11:50, Alistair Young wrote:


typo, it should be:

Protocol authhttps = new Protocol(https, new 
FedoraProtocolSocketFactory(keystoreLocation, keystorePassword, 
truststoreLocation, truststorePassword, 443);

Protocol.registerProtocol(secure, authhttps);

Axis2 uses HttpClient but doesn't seem to understand secure instead 
of https. Registering secure as a protocol is enough for 
HttpClient but not Axis2. Is there another step I need to do to get 
Axis2 to work with secure protocol designator?


thanks,

Alistair



--
mov eax,1
mov ebx,0
int 80h




On 1 Nov 2007, at 11:29, Alistair Young wrote:

I'd like to remap https to another name, e.g. secure as I want 
to use custom ssl handling with it. I've done this:


Protocol authhttps = new Protocol(secure, new 
FedoraProtocolSocketFactory(keystoreLocation, keystorePassword, 
truststoreLocation, truststorePassword, 443);

Protocol.registerProtocol(secure, authhttps);

it works fine using https but when I change it to secure I get 
the error:


Transport out has not been set

when connecting to secure://service.url

is there a way to tell Axis2 how to handle secure - it's really 
https in disguise


thanks,

Alistair



--
mov eax,1
mov ebx,0
int 80h











--
Sanka Samaranayake
WSO2 Inc.

http://www.bloglines.com/blog/sanka
http://www.wso2.org/


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