Re: clarification on axis2_svc_client_send_receive_with_op_qname API call

2008-09-19 Thread Manjula Peiris

On Thu, 2008-09-18 at 12:27 -0400, Raghu Udupa wrote:
 If I use the synchronous call
 axis2_svc_client_send_receive_with_op_qname to send and receive a
 message, how do I track errors at server? It appears that I need to
 check the response received and verify locally whether the service
 execution is successful or not. My question, is can the error at
 service be tracked by checking the value returned by
 axis2_svc_client_send_receive_with_op_qname call? Or do I process the
 response and handle error based on what I receive in the response?

I think you can use axis2_svc_client_get_last_response_has_fault()
function defined in axis2_svc_client api.

 
  
 
 Thanks,
 
 Raghu
 
 


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



Transport out has not been set when using local WSDL file

2008-09-19 Thread Sagi Mann

Hi all, 
I'm using axis2 1.4.1 (Java), and I have encountered yet another case of
Transport out has not been set error, which I was unable to resolve from
looking at the other posts on the subject. 

The exception occurs when trying to invoke any web service method via the
stub (generated using ADB). I only knew that this was the exception because
I added f.printStackTrace() line in my generated HelloServiceStub.test
method. Without it, the main app simply gets a vague NPE on a line in the
stub code: 
   } finally { 
   
_messageContext.getTransportOut().getSender().cleanup(_messageContext); 
   } 

I narrowed the issue down to the client's stub creation line. 
Basically, if I create a stub using a WDL url that looks like this, all is
ok: 
http://localhost:8080/web-ws-simple/HelloService?wsdl

But, if I try to use a local copy, I get the Transport out has not been
set exception: 
file://V:/src/test/ws/web-ws-simple-client-axis2-standalone/resources/META-INF/Hello.wsdl

The content of both WSDL files is identical, and they both contain an
appropriate HTTP port address: 
soap:address location=http://localhost:8080/web-ws-simple/HelloService/

I configured log4j to show all the org.apache.axis2 messages (prio ALL). I'm
attaching the log4j output for both test runs, which are identical almost up
to the exception, but the few differences don't mean much to me (starting
line 703). Note: I don't have an axis2.xml file on the client side. Neither
does the sample axis2 WS client. Is some custom axis2.xml configuration
needed?

Any ideas on how to solve the issue will be appreciated.
http://www.nabble.com/file/p19567501/axis2-good.txt axis2-good.txt 
http://www.nabble.com/file/p19567501/axis2-bad.txt axis2-bad.txt 
-- 
View this message in context: 
http://www.nabble.com/%22Transport-out-has-not-been-set%22-when-using-local-WSDL-file-tp19567501p19567501.html
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: Problems with wss4j and timestamp

2008-09-19 Thread José Ferreiro
Hola Tomas!
Try using this parameter:
parameter name=*disablePrettyXML* value=true/

Although this is much for the signature, but you never know!

Un saludo


On Thu, Sep 18, 2008 at 4:47 PM, Nandana Mihindukulasooriya 
[EMAIL PROTECTED] wrote:

 Hi Thomas,
   Are you using Axis2 or Axis ? I assume you are using Axis.
 There is a property in WSSConfig in WSS4J called precisionInMilliSeconds.
 You must be able to set it to false using configuration. Sometimes having
 mili second precision in the time stamp cause a problem in the .NET side.

 thanks,
 nandana


 On Thu, Sep 18, 2008 at 8:05 PM, Tomás Tormo [EMAIL PROTECTED] wrote:

  Greetings

 I'm implementing a secure webservice client using wss4j wich is
 supposed to use only signature Soap messages (I'm using it to communicate
 with a public webservice server). In the beginning I had the following
 problem:

 faultString: WSDoAllReceiver: security processing failed (actions
 number mismatch)

 After searching for a while I discovered that if the server is implemented
 in .NET, it always needs the message to be timestamped. So, just in case it
 was the reason of the problem (and while they send me the correct
 specification), I tried to add timestaping to the actions of the
 WSDoAllSender with the following order:

 parameter name=action value=Signature Timestamp/

 and then the error is different, now it says:

 WSDoAllReceiver: security processing failed; nested exception is:
 org.apache.ws.security.WSSecurityException: An error was
 discovered processing the wsse:Security header. (WSSecurityEngine: Invalid
 timestamp {0}); nested exception is:
 java.text.ParseException: Unparseable date:
 2008-09-18T14:29:10.722Z

 that looks like the timestamp format is not correct. I was thinking that
 maybe the problem was the time location difference, but i've seen on the
 internet that in that case the error is different (and can be solved by the
 timetolive parameter). I tried to put the Signature and Timestamp in
 opposite way but I get the same error.

 Could anybody help me?

 Thank you very much

 --
 Un saludo,

 Tomás Tormo Franco

 Indenova, S.L.
 Tels.: +34 963 81 99 47  ext.519http://www.indenova.commailto:[EMAIL 
 PROTECTED] [EMAIL PROTECTED]




 --
 Nandana Mihindukulasooriya
 WSO2 inc.

 http://nandana83.blogspot.com/
 http://www.wso2.org




-- 
Jose Ferreiro
EPFL Communication Systems engineer
ing.sys.com.dipl.EPFL


Re: Problem with CDATA tags in SOAP message.

2008-09-19 Thread Vinay Cardoza

Hi,
 I managed to isolate the problem. The problem vanishes when Rampart module
is not engaged in axis2.xml. I can get the ![CDATA[ ]] intact. 

However, when I engage the rampart module, the CDATA tag  is removed.

I have used Rampart 1.4 , example 04.

The steps to reproduce is shown below.

1. Download Rampart 1.4 from
http://mirrors.enquira.co.uk/apache/ws/rampart/1_4/rampart-dist-1.4-bin.zip. 
2. Extract it to d:\
3. Ensure AXIS2_HOME is set to Axis2 1.4. Mine is d:\axis2-1.4. Ensure
ANT_HOME and JAVA_HOME is set.
4. Open a command prompt. 

prompt cd D:\rampart-1.4\samples\ 
promptant 
-The above step will copy the rampart jars to AXIS2_HOME
installation.

prompt cd D:\rampart-1.4\samples\basic
prompt ant service.04

5. Edit
D:\rampart-1.4\samples\basic\sample04\src\org\apache\rampart\samples\sample04\Client.java
Add the imports.

import org.apache.axiom.om.impl.llom.OMTextImpl;
import javax.xml.stream.XMLStreamConstants;

In getPayload(), replace  

childElem.setText(value);

with 

OMTextImpl omText = (OMTextImpl)
childElem.getOMFactory().createOMText(childElem,value,XMLStreamConstants.CDATA);

Save the file.

5. Open another DOS prompt.
prompt  cd D:\rampart-1.4\samples\basic
prompt ant client.04

Observe the SOAP request using TCP Monitor. 

soapenv:Body
xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd;
wsu:Id=id-22584918
  ns1:echo xmlns:ns1=http://sample04.samples.rampart.apache.org;
param0Hello world/param0
  /ns1:echo
/soapenv:Body

The CDATA tag is not present.

6. Edit D:\rampart-1.4\samples\basic\sample04\client.axis2.xml. Remove the
line  module ref=rampart / and save the file. 

7. Repeat the step 5 and observe the SOAPBody in TCP Monitor.

soapenv:Bodyns1:echo
xmlns:ns1=http://sample04.samples.rampart.apache.org;
   param0![CDATA[Hello world]]/param0
/ns1:echo/soapenv:Body

The CDATA tag is intact.

Please advice.

Regards,
Vinay Cardoza

Vinay Cardoza wrote:
 
 Hi Saliya,
  I have also tried Axis 1.4.1 and 1.4. The CDATA is always escaped. If you
 can point where is the Axis2 snapshot is located, then I will try that.
 
 Regards,
 Vinay Cardoza
 
 
 Saliya Ekanayake wrote:
 
 Hi,
 
 I tested this using Axis2 nightly build but couldn't recreate your issue.
 I
 mean, it works fine. If you can please try with Axis2 Snapshot.
 
 Thanks,
 Saliya
 
 On Wed, Sep 17, 2008 at 9:03 PM, Vinay Cardoza
 [EMAIL PROTECTED]wrote:
 

 Hi,
I am trying to send a SOAP request using Apache Axis 1.3. An element
 in
 the SOAP body requires the text to be wrapped in CDATA element.

 The code snippet is as follows:

 String stringToBeWrapped = A'B'C'D;

 OMElement elementWhichNeedsCData = ;

 TextImpl omText = (TextImpl)
 bodyElement.getOMFactory().createOMText(stringToBeWrapped);
 omText.setType(XMLStreamConstants.CDATA);
 elementWhichNeedsCData.addChild(omText);

 The code compiles without any problems. However the SOAP request is as
 follows:

 soapenv:Body
 xmlns:wsu=
 http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
 
 wsu:Id=Id-1129
s1:EdiCustomsDeclaration
 xmlns:s1=http://www.examples.com/schemas/custom/edi/v1;
lt;![CDATA[A'B'C'D]]gt;
/s1:EdiCustomsDeclaration
 /soapenv:Body/soapenv:Envelope

 The CDATA text element has gt; and lt; escape characters.

 When I print the omText value, I can see the CDATA construct intact. But
 the
 SOAP message shows something else.

 How do I prevent escape characters from appearing in the CDATA
 construct?
 Please help.

 Regards,
 Vinay Cardoza


 --
 View this message in context:
 http://www.nabble.com/Problem-with-CDATA-tags-in-SOAP-message.-tp19534836p19534836.html
 Sent from the Axis - User mailing list archive at Nabble.com.


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


 
 
 -- 
 Saliya Ekanayake
 http://www.esaliya.blogspot.com
 http://www.esaliya.wordpress.com
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-CDATA-tags-in-SOAP-message.-tp19534836p19569416.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



SSL: ValidatorException: PKIX path building failed

2008-09-19 Thread Sagi Mann

Hi all,
I am unable to get Axis2 clients to work with via HTTPS. I've read the
numerous threads here about it, and I think I have set up everything
correcly, but still - no luck. The client code works great over HTTP. I'm
using Axis2 1.4.1, NetBeans 5.5.1, SJSAS 9.1 for hosting the web service.

The setup:
My web service is inside a .war and has its web.xml set to constraint all
clients requests to CONFIDENTIAL (it is not an Axis2-based web service). It
does NOT enforce client authentication, i.e. no CLIENT-AUTH. In fact, the
login section is omitted entirely. I don't want to test login at this point.

I then access the remote wsdl using IE:
https://hostname:8181/myapp/HelloService?wsdl to verify it is accessible (IE
prompts me for a security confirmation).
I then generate the client-side proxy using wsdl2java (ADB), using the WDL
URI above. I also set the following system properties prior to running
wsdl2java, or else wsdl2java fails due to an untrusted certificate:
javax.net.ssl.trustStore=v:/tmp/clienttrust.jks
javax.net.ssl.trustStorePassword=changeit

Finally, in my standalone client code, I do the following:
System.setProperty(javax.net.ssl.trustStore,
v:/tmp/clienttrust.jks);
System.setProperty(javax.net.ssl.trustStorePassword, changeit);
HelloServiceStub stub =
new HelloServiceStub(
https://hostname:8181/myapp/HelloService?wsdl;);
doTest(); // this involes a simple web service method

However, I get an exception (see below) which usually appears only if a
trustStore and its pwd are not specified. In fact, if I omit the
System.setProperty calls above, I get the same exact exception (verified
with diff tool).

Does anyone have an idea how to resolve this?
thanks.


org.apache.axis2.AxisFault: sun.security.validator.ValidatorException: PKIX
path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at
org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:98)
at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
at
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
at
org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at
samples.quickstart.service.adb.HelloServiceStub.test(HelloServiceStub.java:183)
at samples.quickstart.clients.ADBClient.test(ADBClient.java:83)
at samples.quickstart.clients.ADBClient.main(ADBClient.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:202)
at
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:134)
at org.apache.tools.ant.taskdefs.Java.run(Java.java:710)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:178)
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:84)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)

A service ONLY over https and not http

2008-09-19 Thread Christian Mielke
Hello,

I want to call one of my web services only by https and not by http. The 
service also shouldn't accept  the requests over http. It only should accept 
the requests over https. Is there a possibility to configure this in the 
services.xml or somewhere else?

Greetings 
Christian


 

Re: A service ONLY over https and not http

2008-09-19 Thread Nandana Mihindukulasooriya
Hi Christian,
In the services.xml, you can add

transports
 transporthttps/transport
/transports

to expose your service only using https transport.

thanks,
nandana


On Fri, Sep 19, 2008 at 3:44 PM, Christian Mielke [EMAIL PROTECTED] wrote:

 Hello,

 I want to call one of my web services only by https and not by http. The
 service also shouldn't accept  the requests over http. It only should accept
 the requests over https. Is there a possibility to configure this in the
 services.xml or somewhere else?

 Greetings
 Christian







-- 
Nandana Mihindukulasooriya
WSO2 inc.

http://nandana83.blogspot.com/
http://www.wso2.org


Re: SSL: ValidatorException: PKIX path building failed

2008-09-19 Thread Nandana Mihindukulasooriya
Hi Sagi,
   It seems we get this same error in both almost all the cases, where
we don't set the system property, where the path to key store is wrong and
where the keystore password is wrong. You can check with java keytool
whether the password is correct.

thanks,
nandana

On Fri, Sep 19, 2008 at 3:28 PM, Sagi Mann [EMAIL PROTECTED] wrote:


 Hi all,
 I am unable to get Axis2 clients to work with via HTTPS. I've read the
 numerous threads here about it, and I think I have set up everything
 correcly, but still - no luck. The client code works great over HTTP. I'm
 using Axis2 1.4.1, NetBeans 5.5.1, SJSAS 9.1 for hosting the web service.

 The setup:
 My web service is inside a .war and has its web.xml set to constraint all
 clients requests to CONFIDENTIAL (it is not an Axis2-based web service). It
 does NOT enforce client authentication, i.e. no CLIENT-AUTH. In fact, the
 login section is omitted entirely. I don't want to test login at this
 point.

 I then access the remote wsdl using IE:
 https://hostname:8181/myapp/HelloService?wsdl to verify it is accessible
 (IE
 prompts me for a security confirmation).
 I then generate the client-side proxy using wsdl2java (ADB), using the WDL
 URI above. I also set the following system properties prior to running
 wsdl2java, or else wsdl2java fails due to an untrusted certificate:
 javax.net.ssl.trustStore=v:/tmp/clienttrust.jks
 javax.net.ssl.trustStorePassword=changeit

 Finally, in my standalone client code, I do the following:
System.setProperty(javax.net.ssl.trustStore,
 v:/tmp/clienttrust.jks);
System.setProperty(javax.net.ssl.trustStorePassword, changeit);
HelloServiceStub stub =
new HelloServiceStub(
https://hostname:8181/myapp/HelloService?wsdl;);
doTest(); // this involes a simple web service method

 However, I get an exception (see below) which usually appears only if a
 trustStore and its pwd are not specified. In fact, if I omit the
 System.setProperty calls above, I get the same exact exception (verified
 with diff tool).

 Does anyone have an idea how to resolve this?
 thanks.


 org.apache.axis2.AxisFault: sun.security.validator.ValidatorException: PKIX
 path building failed:
 sun.security.provider.certpath.SunCertPathBuilderException: unable to find
 valid certification path to requested target
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at

 org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:98)
at

 org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
at

 org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
at

 org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
at

 org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at

 org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at
 org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at
 org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at

 org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
at
 org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
at
 org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at

 org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
at

 org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
at

 org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
at

 org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at
 org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at

 samples.quickstart.service.adb.HelloServiceStub.test(HelloServiceStub.java:183)
at samples.quickstart.clients.ADBClient.test(ADBClient.java:83)
at samples.quickstart.clients.ADBClient.main(ADBClient.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at

 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at

 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
 org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:202)
at
 org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:134)
at org.apache.tools.ant.taskdefs.Java.run(Java.java:710)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:178)
at 

MessageContext writeExternal

2008-09-19 Thread Igor Nogueira
Hey all!

I've got a doubt. How can I save the MessageContext? I have following piece
of code:

 ByteArrayOutputStream baos = new ByteArrayOutputStream();
 ObjectOutputStream oos = new ObjectOutputStream(baos);
 oos.writeObject(MessageContext.getCurrentMessageContext());

But it doesn't work. It gives me the following error:

Caused by: java.lang.ClassCastException: java.lang.Object cannot be cast to
java.io.ObjectOutput
at ShoppingCart.getState(ShoppingCart.java:97) ...

Is that the right way of saving the Message context? What's wrong on this
code?

Thank you in advance,


Igor Nogueira


Re: Re: A service ONLY over https and not http

2008-09-19 Thread Christian Mielke
Hi,

I already tried this using the the transports tag inside the service.xml but 
when I start the AXIS server, I get the information that this tag is not 
supported in AXIS 2.

Greetings
Christian

- original Nachricht 

Betreff: Re: A service ONLY over https and not http
Gesendet: Fr, 19. Sep 2008
Von: Nandana Mihindukulasooriya

Hi Christian,
In the services.xml, you can add
transports
 transporthttps/transport
/transportsto expose your service only using https transport. 

thanks,
nandana


On Fri, Sep 19, 2008 at 3:44 PM, Christian Mielke [EMAIL PROTECTED] wrote:
Hello,

I want to call one of my web services only by https and not by http. The 
service also shouldn't accept  the requests over http. It only should accept 
the requests over https. Is there a possibility to configure this in the 
services.xml or somewhere else?

Greetings
Christian


 


-- 
Nandana Mihindukulasooriya 
WSO2 inc.

http://nandana83.blogspot.com/
http://www.wso2.org


--- original Nachricht Ende 


RE: Newbie wsdl2java question...

2008-09-19 Thread Soyer, Muhammed A.
Can't you just download the WSDL using a browser and use it locally as a 
workaround ?

From: james a. cubeta [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 18, 2008 8:28 PM
To: axis-user@ws.apache.org
Subject: Re: Newbie wsdl2java question...

Thanks Ryan - some stupid follow-up question:

First, setup a java keystore. A simple google search should get you going.
Just set up an empty keystore?

Next, put this code in the WSDL2Java main function:

// set the keystore stuff

System.setProperty(javax.net.ssl.trustStore, keystore_filename);

System.setProperty(javax.net.ssl.keyStorePassword, keystore_password);
How am I to modify the WSDL2Java utility? I only have a bunch of Axis-related 
JARs.

Thanks,
James





-Ryan



From: james a. cubeta [mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 18, 2008 3:10 PM
To: axis-user@ws.apache.orgmailto:axis-user@ws.apache.org
Subject: Newbie wsdl2java question...



Hello everyone,

I am both new to Axis and new to this mailing list, so I apologize in advance 
if my questions are simple or have been covered...

I am trying to use Axis 1.4 to develop a simple application that will test a 
web service that is deployed on a private network. As a first step, I am trying 
to generate stub code using the WSDL2Java tool.  Because the server is https  
uses an IP only, my command line resembles this:

java org.apache.axis.wsdl.WSDL2Java --username user --password pass 
https://192.168.1.150:8443/example-ws/services/SimpleExample?wsdl

When I run this, I get the following exception:

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: 
PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
valid certification path to requested target
exception stack truncated

Questions:

1. I assume that the reason this is happening is because the server is using a 
self-signed certificate, and the JVM cannot validate it. Is this assumption 
correct?

2. How can I get around this problem? (Note that I do not have administrative 
access to the server, so making changes on that end is probably not possible).

Thanks in advance for any help or references,
James

--
james a. cubeta



--
james a. cubeta


Re: {Disarmed} Re: Newbie wsdl2java question...

2008-09-19 Thread SGruverman
I hope it's okay for me to jump in here:

james a. cubeta [EMAIL PROTECTED] wrote on 09/18/2008 08:28:15 PM:
 Thanks Ryan - some stupid follow-up question:
 First, setup a java keystore. A simple google search should get you
going.
 Just set up an empty keystore?

I believe the keystore needs to contain the trust path for SSL
certificate being used.
At it's simplest, that is the certificate of the certificate authority that
signed the SSL cert.
(I wish there was a less circuitous way of saying that!). But there may be
one or more intermediate certs, too - I know this is the case for the
GoDaddy commercial certs we use.

 Next, put this code in the WSDL2Java main function:
 // set the keystore stuff
 System.setProperty(javax.net.ssl.trustStore, keystore_filename);
 System.setProperty(javax.net.ssl.keyStorePassword,
keystore_password);
 How am I to modify the WSDL2Java utility? I only have a bunch of
 Axis-related JARs.

This goes in the the code that WSDL2Java generated, i.e. your client app.

Hope this helps,
Steve
__
Steve Gruverman, Programmer
IntelliCare, Inc. | A Medco Health Solutions Company



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



RE: Strong types in Axis2 wsdl

2008-09-19 Thread Pugalia, Jai P (JP)
Hi Keith,
 
If I do not include the originally generated WSDL (java2wsdl), the
response from server is 
 
?xml version=1.0 encoding=http://www.w3.org/2003/05/soap-envelope;
standalone=no?
soapenv:Envelope
xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope;
 soapenv:Body
  ns:getLicenseInfoResponse
xmlns:ns=http://vpmanagement.ws.xml.avaya.com;
   ns:return xmlns:ax21=http://ws.vp.avaya.com/xsd
http://ws.vp.avaya.com/xsd  type=com.avaya.vp.ws.FieldArray
ax21:field type=com.avaya.vp.ws.Field
 ax21:dataTypeInteger/ax21:dataType
 ax21:nameMaximumLicenses/ax21:name
 ax21:value50/ax21:value
/ax21:field
   /ns:return
  /ns:getLicenseInfoResponse
 /soapenv:Body
/soapenv:Envelope
 
However if I do include the originally generated WSDL in the aar file ,
the response is 
 
?xml version=1.0 encoding=http://www.w3.org/2003/05/soap-envelope;
standalone=no?
soapenv:Envelope
xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope;
 soapenv:Body
  ns:getLicenseInfoResponse
xmlns:ns=http://vpmanagement.ws.xml.avaya.com;
   ns:return type=com.avaya.vp.ws.FieldArray
ns:field type=com.avaya.vp.ws.Field
 ns:dataTypeInteger/ns:dataType
 ns:nameMaximumLicenses/ns:name
 ns:value50/ns:value
   /ns:field
   /ns:return
  /ns:getLicenseInfoResponse
 /soapenv:Body
/soapenv:Envelope
 
The client was generated using the originally generated WSDL and the
generated code throws an exception when the WSDL is included in the aar
file.
Exception occured: org.apache.axis2.databinding.ADBException: Unexpected
subelement field

Thanks,
JP
 
 


From: keith chapman [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 02, 2008 9:24 AM
To: axis-user@ws.apache.org
Subject: Re: Strong types in Axis2 wsdl


Hi Jai,

Can you try using TCPMonitor and capture the messages in the two
scenarios. That would help figure out wats going on. You may use this
link on how TCPMonitor could be set up on Idea or Eclipse.
http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-ser
vice.html  [1]

Thanks,
Keith.

[1]
http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-serv
ice.html

On Tue, Sep 2, 2008 at 9:35 PM, Pugalia, Jai P (JP) [EMAIL PROTECTED]
wrote:


Hi Keith,
 
I tried your suggestion of updating the wsdl and including it in
the aar. (Also set the useOriginalWSDL parameter to true). However
when I make a web service call which returns the Field object, I get
this exception:
 
reason:org.apache.axis2.databinding.ADBException: Unexpected
subelement

If I do not include the updated wsdl, then everything works
properly. 

Any suggestions on what could be wrong? 

Thanks,

Jai





From: keith chapman [mailto:[EMAIL PROTECTED] 

Sent: Monday, September 01, 2008 9:25 PM 

To: axis-user@ws.apache.org
Subject: Re: Strong types in Axis2 wsdl 

Hi,

You cannot get this into a auto generated WSDL.  The workaround
for you will be to save the auto generated WSDL, edit it to your needs
and pack it into the aar file and deploy the service in Axis2. You will
need to use restictions on your dataType in order to achieve this. Here
is an example of a WSDL that has restrictions
http://mooshup.com/services/system/digit2image?wsdl2   [1]

Thanks,
Keith.

[1] http://mooshup.com/services/system/digit2image?wsdl2



On Tue, Sep 2, 2008 at 9:42 AM, Pugalia, Jai P (JP)
[EMAIL PROTECTED] wrote:


Hi Keith,

I have written the Java class and then generating the
WSDL from that.

The WSDL generates this:

   xs:complexType name=Field
   xs:sequence

 xs:element minOccurs=0
name=objectType
nillable=true type=xs:string/

   xs:element minOccurs=0
name=dataType

nillable=true type=xs:string/

   xs:element minOccurs=0 name=name

nillable=true type=xs:string/

   xs:element minOccurs=0
name=value

nillable=true type=xs:string/

   /xs:sequence
   /xs:complexType

I want to restrict the values of objectType to actual
string values like
Array, Structure  Table.

Thanks,
Jai


-Original Message-
From: keith chapman [mailto:[EMAIL PROTECTED]
Sent: Monday, 

Re: Newbie wsdl2java question...

2008-09-19 Thread james a. cubeta
Well, I actually HAD done that and ran into a different problem. I reverted
back to referring to it via the full URL because I wondered if, by saving
the WSDL locally, I had caused my different problem.

Let me give your suggestion another go, and you'll see another post from me
about THAT problem. :)

Thanks,
James


On Fri, Sep 19, 2008 at 8:07 AM, Soyer, Muhammed A. [EMAIL PROTECTED]wrote:

  Can't you just download the WSDL using a browser and use it locally as a
 workaround ?



 *From:* james a. cubeta [mailto:[EMAIL PROTECTED]
 *Sent:* Thursday, September 18, 2008 8:28 PM
 *To:* axis-user@ws.apache.org
 *Subject:* Re: Newbie wsdl2java question...



 Thanks Ryan - some stupid follow-up question:

 First, setup a java keystore. A simple google search should get you going.

 Just set up an *empty* keystore?

  Next, put this code in the WSDL2Java main function:

 // set the keystore stuff

 System.setProperty(javax.net.ssl.trustStore, keystore_filename);

 System.setProperty(javax.net.ssl.keyStorePassword, keystore_password);

  How am I to modify the WSDL2Java utility? I only have a bunch of
 Axis-related JARs.

 Thanks,
 James





 -Ryan



 *From:* james a. cubeta [mailto:[EMAIL PROTECTED]
 *Sent:* Thursday, September 18, 2008 3:10 PM
 *To:* axis-user@ws.apache.org
 *Subject:* Newbie wsdl2java question...



 Hello everyone,

 I am both new to Axis and new to this mailing list, so I apologize in
 advance if my questions are simple or have been covered...

 I am trying to use Axis 1.4 to develop a simple application that will test
 a web service that is deployed on a private network. As a first step, I am
 trying to generate stub code using the WSDL2Java tool.  Because the server
 is https  uses an IP only, my command line resembles this:

 java org.apache.axis.wsdl.WSDL2Java --username user --password pass
 https://192.168.1.150:8443/example-ws/services/SimpleExample?wsdl

 When I run this, I get the following exception:

 javax.net.ssl.SSLHandshakeException:
 sun.security.validator.ValidatorException: PKIX path building failed:
 sun.security.provider.certpath.SunCertPathBuilderException: unable to find
 valid certification path to requested target
 exception stack truncated

 Questions:

 1. I assume that the reason this is happening is because the server is
 using a self-signed certificate, and the JVM cannot validate it. Is this
 assumption correct?

 2. How can I get around this problem? (Note that I do not have
 administrative access to the server, so making changes on that end is
 probably not possible).

 Thanks in advance for any help or references,
 James

 --
 james a. cubeta




 --
 james a. cubeta




-- 
james a. cubeta


Axis1 vs Axis2

2008-09-19 Thread Dilshener Tezcan (extern HVB IS - UniCredit Group)
Hi
We have an Axis 1 web service that uses RPC-Soap1 style.
1-) We want to access to  this web service using an Axis2 Client.
- Can we do this?

2-) When I generate WSDL using Java2WSDL.bat over the Axis1 webservice, the WDL 
has Soap12 encoding. 
How can I override this?
Is there a parameter to specify that Java2WSDL should generate the WSDL in 
Soap1?

Many thanks

Tezcan Dilshener 
Satz Software  Consulting GmbH

HVB Information Services GmbH
Member of UniCredit Group 
HII3ES Development Services Client Server 
Am Tucherpark 12 
D-80538 München 

Tel: +49 89 378-26378 
mailto:[EMAIL PROTECTED] 
http://www.hvbis.com 

The legal obligation information of HVB Information Services GmbH can be found 
at: http://www.hvbis.com/is/de/pub/441.htm
Die gesetzlichen Pflichtangaben zur HVB Information Services GmbH finden Sie 
unter: http://www.hvbis.com/is/de/pub/441.htm

Important Note: 
This e-mail is only intended for the person or company/organisation named as 
recipient. It may contain trade secrets or undisclosed and
confidential information or information otherwise protected by work-product 
immunity or other legal regulations. If you have received this email by 
mistake, we kindly ask you not to copy this message or use it for any purpose 
nor disclose its contents to any other person. Please inform us immediately and 
delete the original document. In addition, please let us know if you or your 
company object to receiving e-mails for messages of this kind. 

Wichtiger Hinweis: 
Diese E-Mail ist nur für die Person oder die Firma/Organisation bestimmt, die 
in der Empfängeradresse benannt ist und enthält u. U. Geschäftsgeheimnisse oder 
vertrauliche Informationen, die dem Schutz von Arbeitsergebnissen unterliegen 
oder sonst rechtlich geschützt sind. Wenn Sie nicht der angegebene Empfänger 
sind, bitten wir Sie, uns unverzüglich zu informieren und diese Nachricht zu 
vernichten und sie insbesondere nicht zu kopieren oder sie für irgendwelche 
anderen Zwecke zu verwenden, noch den Inhalt dieser Nachricht dritten Personen 
zugänglich zu machen. Bitte informieren Sie uns auch unverzüglich, wenn Sie 
oder Ihr Arbeitgeber nicht mit E-Mail Nachrichten dieser Art einverstanden sein 
sollten. 




wsdl port address uses incorrect port number

2008-09-19 Thread Pugalia, Jai P (JP)
Hi,
 
Looks like the wsdl port numbers being populated in the wsdl port
address by Axis2 is incorrect. 
 
wsdl:service name=Version
wsdl:port name=VersionSOAP11port_https
binding=ns0:VersionSOAP11Binding
soap:address
location=https://1.2.3.4:80/axis2/services/Version
https://1.2.3.4:80/axis2/services/Version  / 
/wsdl:port
wsdl:port name=VersionSOAP11port_http1
binding=ns0:VersionSOAP11Binding
soap:address
location=http://1.2.3.4:8080/axis2/services/Version
http://1.2.3.4:8080/axis2/services/Version  / 
/wsdl:port
/wsdl:service
 
In our situation, the port number for https should be 443 and port for
http should be 80. Is there any configuration which needs to be modified
such that the right port number is included in the wsdl when it is
retrieved using ?wsdl option.
 
Thanks,
Jai
 
 


InstantiationException with Axis 1.4...

2008-09-19 Thread james a. cubeta
I am using Axis 1.4, and I am trying to write a simple test application of a
web service.

I saved the WSDL locally, used WSDL2Java to build stub code, created a JAR,
and wrote a test case that basically does this:

URL url = new URL(
https://192.168.1.150:8443/simple-ws/service/SimpleExample;);
SimpleExampleServiceLocator locator = new SimpleExampleServiceLocator();
SimpleExampleSoapBindingStub client = (SimpleExampleSoapBindingStub)
locator.getSimpleExample(url);
client.setUsername(username);
client.setPassword(password);

String response = client.sayHello(James);

When I attempt to run this code, I get the following exception:

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userExcpetion
 faultSubcode:
 faultString: java.lang.InstantiationException
 faultActor:
 faultNode:
 faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.lang.InstantiationException
 at
org.apache.axis.encoding.ConstructorTarget.set(ConstructorTarget.java:97)
 snip
 at org.apache.axis.Call.invoke(Call.java:1812)

Sorry if this is not enough information, but the exception stack seems to be
pretty useless overall... :-/

Ideas/Thoughts appreciated,
James
-- 
james a. cubeta


Re: wsdl port address uses incorrect port number

2008-09-19 Thread charitha kankanamge

Hi,
You may set modifyUserWsdlPortAddress parameter to false in your 
services.xml.


parameter name=*modifyUserWSDLPortAddress*false/parameter

If you set this parameter to false and useoriginalWsdl set to true, the 
port address specified in the original wsdl (wsdl included in META-INF 
directory of your service archive) will be unchanged.


regards
Charitha

http://charithaka.blogspot.com
http://www.wso2.org

Pugalia, Jai P (JP) wrote:


Hi,
 
Looks like the wsdl port numbers being populated in the wsdl port 
address by Axis2 is incorrect. 
 
wsdl:service name=Version
wsdl:port name=VersionSOAP11port_https 
binding=ns0:VersionSOAP11Binding
soap:address 
location=https://1.2.3.4:80/axis2/services/Version 
https://1.2.3.4:80/axis2/services/Version / 
/wsdl:port
wsdl:port name=VersionSOAP11port_http1 
binding=ns0:VersionSOAP11Binding
soap:address 
location=http://1.2.3.4:8080/axis2/services/Version 
http://1.2.3.4:8080/axis2/services/Version / 
/wsdl:port

/wsdl:service
 
In our situation, the port number for https should be 443 and port for 
http should be 80. Is there any configuration which needs to be 
modified such that the right port number is included in the wsdl when 
it is retrieved using ?wsdl option.
 
Thanks,

Jai
 
 




No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 270.7.0/1679 - Release Date: 9/18/2008 5:03 PM
 




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



RE: wsdl port address uses incorrect port number

2008-09-19 Thread Pugalia, Jai P (JP)
Hi Charitha,

I am not including the wsdl with the aar file. Including the wsdl
causing other problems. (There is a separate email chain on this issue).

I do want the hostname to be updated to the machine name or ip address
of the installed machine. The issue is port number is being set to a
wrong value. How does Axis2 determine what the port number should be set
to? Is there some way we can specify what the port number should be?

Regards,
Jai

-Original Message-
From: charitha kankanamge [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 19, 2008 8:24 AM
To: axis-user@ws.apache.org
Subject: Re: wsdl port address uses incorrect port number

Hi,
You may set modifyUserWsdlPortAddress parameter to false in your
services.xml.

parameter name=*modifyUserWSDLPortAddress*false/parameter

If you set this parameter to false and useoriginalWsdl set to true, the
port address specified in the original wsdl (wsdl included in META-INF
directory of your service archive) will be unchanged.

regards
Charitha

http://charithaka.blogspot.com
http://www.wso2.org

Pugalia, Jai P (JP) wrote:

 Hi,
  
 Looks like the wsdl port numbers being populated in the wsdl port 
 address by Axis2 is incorrect.
  
 wsdl:service name=Version
 wsdl:port name=VersionSOAP11port_https 
 binding=ns0:VersionSOAP11Binding
 soap:address
 location=https://1.2.3.4:80/axis2/services/Version
 https://1.2.3.4:80/axis2/services/Version / 
 /wsdl:port
 wsdl:port name=VersionSOAP11port_http1 
 binding=ns0:VersionSOAP11Binding
 soap:address
 location=http://1.2.3.4:8080/axis2/services/Version
 http://1.2.3.4:8080/axis2/services/Version / 
 /wsdl:port
 /wsdl:service
  
 In our situation, the port number for https should be 443 and port for

 http should be 80. Is there any configuration which needs to be 
 modified such that the right port number is included in the wsdl when 
 it is retrieved using ?wsdl option.
  
 Thanks,
 Jai
  
  

---
-

No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 270.7.0/1679 - Release Date: 
9/18/2008 5:03 PM
  



-
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]



RE: InstantiationException with Axis 1.4...

2008-09-19 Thread McCullough, Ryan
James, there is not enough information. You will need to provide your soap stub 
code and an example source file that reproduces the issue.

From: james a. cubeta [mailto:[EMAIL PROTECTED]
Sent: Friday, September 19, 2008 9:17 AM
To: axis-user@ws.apache.org
Subject: InstantiationException with Axis 1.4...

I am using Axis 1.4, and I am trying to write a simple test application of a 
web service.

I saved the WSDL locally, used WSDL2Java to build stub code, created a JAR, and 
wrote a test case that basically does this:
URL url = new URL(https://192.168.1.150:8443/simple-ws/service/SimpleExample;);
SimpleExampleServiceLocator locator = new SimpleExampleServiceLocator();
SimpleExampleSoapBindingStub client = (SimpleExampleSoapBindingStub) 
locator.getSimpleExample(url);
client.setUsername(username);
client.setPassword(password);

String response = client.sayHello(James);

When I attempt to run this code, I get the following exception:
AxisFault
 faultCode: 
{http://schemas.xmlsoap.org/soap/envelope/}Server.userExcpetionhttp://schemas.xmlsoap.org/soap/envelope/%7dServer.userExcpetion
 faultSubcode:
 faultString: java.lang.InstantiationException
 faultActor:
 faultNode:
 faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.lang.InstantiationExceptionhttp://xml.apache.org/axis/%7dstackTrace:java.lang.InstantiationException
 at 
org.apache.axis.encoding.ConstructorTarget.set(ConstructorTarget.java:97)
 snip
 at org.apache.axis.Call.invoke(Call.java:1812)

Sorry if this is not enough information, but the exception stack seems to be 
pretty useless overall... :-/

Ideas/Thoughts appreciated,
James
--
james a. cubeta


RE: Newbie wsdl2java question...

2008-09-19 Thread McCullough, Ryan
No, you have to setup the keystore to contain the self-signed certificate. If 
you perform a google search you will see examples of how this can be done.

There may be an alternative to using System.setProperty so that you do not need 
to modify the WSDL2Java code. Someone on this list may be able to tell you how, 
or Google is your friend.

Regardless, I don't see how this would fix your Instantiation exception 
reported in the other email.

From: james a. cubeta [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 18, 2008 6:28 PM
To: axis-user@ws.apache.org
Subject: Re: Newbie wsdl2java question...

Thanks Ryan - some stupid follow-up question:

First, setup a java keystore. A simple google search should get you going.
Just set up an empty keystore?

Next, put this code in the WSDL2Java main function:

// set the keystore stuff

System.setProperty(javax.net.ssl.trustStore, keystore_filename);

System.setProperty(javax.net.ssl.keyStorePassword, keystore_password);
How am I to modify the WSDL2Java utility? I only have a bunch of Axis-related 
JARs.

Thanks,
James





-Ryan



From: james a. cubeta [mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 18, 2008 3:10 PM
To: axis-user@ws.apache.orgmailto:axis-user@ws.apache.org
Subject: Newbie wsdl2java question...



Hello everyone,

I am both new to Axis and new to this mailing list, so I apologize in advance 
if my questions are simple or have been covered...

I am trying to use Axis 1.4 to develop a simple application that will test a 
web service that is deployed on a private network. As a first step, I am trying 
to generate stub code using the WSDL2Java tool.  Because the server is https  
uses an IP only, my command line resembles this:

java org.apache.axis.wsdl.WSDL2Java --username user --password pass 
https://192.168.1.150:8443/example-ws/services/SimpleExample?wsdl

When I run this, I get the following exception:

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: 
PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
valid certification path to requested target
exception stack truncated

Questions:

1. I assume that the reason this is happening is because the server is using a 
self-signed certificate, and the JVM cannot validate it. Is this assumption 
correct?

2. How can I get around this problem? (Note that I do not have administrative 
access to the server, so making changes on that end is probably not possible).

Thanks in advance for any help or references,
James

--
james a. cubeta



--
james a. cubeta


Re: InstantiationException with Axis 1.4...

2008-09-19 Thread james a. cubeta

 James, there is not enough information. You will need to provide your soap
 stub code and an example source file that reproduces the issue.

I understand, but unfortunately I am unable to do that.

So I'm not sure where to go from here... :-/

James



 *From:* james a. cubeta [mailto:[EMAIL PROTECTED]
 *Sent:* Friday, September 19, 2008 9:17 AM
 *To:* axis-user@ws.apache.org
 *Subject:* InstantiationException with Axis 1.4...



 I am using Axis 1.4, and I am trying to write a simple test application of
 a web service.

 I saved the WSDL locally, used WSDL2Java to build stub code, created a JAR,
 and wrote a test case that basically does this:

 URL url = new URL(
 https://192.168.1.150:8443/simple-ws/service/SimpleExample;);
 SimpleExampleServiceLocator locator = new SimpleExampleServiceLocator();
 SimpleExampleSoapBindingStub client = (SimpleExampleSoapBindingStub)
 locator.getSimpleExample(url);
 client.setUsername(username);
 client.setPassword(password);

 String response = client.sayHello(James);


 When I attempt to run this code, I get the following exception:

 AxisFault
  faultCode: {
 http://schemas.xmlsoap.org/soap/envelope/}Server.userExcpetionhttp://schemas.xmlsoap.org/soap/envelope/%7dServer.userExcpetion
  faultSubcode:
  faultString: java.lang.InstantiationException
  faultActor:
  faultNode:
  faultDetail:
 {http://xml.apache.org/axis/}stackTrace:java.lang.InstantiationExceptionhttp://xml.apache.org/axis/%7dstackTrace:java.lang.InstantiationException
  at
 org.apache.axis.encoding.ConstructorTarget.set(ConstructorTarget.java:97)
  snip
  at org.apache.axis.Call.invoke(Call.java:1812)


 Sorry if this is not enough information, but the exception stack seems to
 be pretty useless overall... :-/

 Ideas/Thoughts appreciated,
 James
 --
 james a. cubeta




-- 
james a. cubeta


Re: Null EndpointDescription Parameter in JAXWSMessageReceiver

2008-09-19 Thread Brian De Pradine
Hi Ben,

I am not sure if this still works. You might be better off repackaging 
your service as a jar file, and dropping it in your 
axis2_home/repository/servicejars directory. The JAXWSDeployer will 
examine all jars within that directory and deploy those classes that have 
JAX-WS annotations which identify them as web services. You won't need a 
service.xml file.

Cheers

Brian DePradine
Web Services Development
IBM Hursley
External  +44 (0) 1962 816319 Internal 246319

If you can't find the time to do it right the first time, where will you 
find the time to do it again?


Ben Reif [EMAIL PROTECTED] wrote on 16/09/2008 21:08:16:

 I am using Axis2 1.4 and I have JAXWS Web Services deployed in *.aar
 files. I have the JAXWSMessageReceiver configured in the service.
 xml, but get an exception because the EndpointDescription parameter 
 in the service is null and it tries to do this:
 
 Parameter endpointDescParam =
 service.getParameter(EndpointDescription.
 AXIS_SERVICE_PARAMETER);
 if (endpointDescParam == null) {
 throw new RuntimeException(Messages.getMessage(
 JAXWSMessageReceiverNoServiceClass));
 }
 
 Does anyone know how this gets set? It seems like the only place 
 I've found is in EndpointDescriptionImpl.addToAxisService(), but 
 what do I need to do to get this logic to be called?
 
 Thanks,
 Ben





Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU







Problem with Axis2 client and XFire service

2008-09-19 Thread jackdawson

Hi,

I created an Axis2 client for an XFire service. But something seems to be
wrong. 
When I run the client this is what I get.

org.apache.axis2.AxisFault: Parameter {urn:login.safe.two.us}TestLoginType
does not exist!
at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)
at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)

I debugged the client and found that the error occurs when this statement is
executed in the stub:

//execute the operation client
_operationClient.execute(true);

Can anyone let me know is it the client that is weird or the service?


Thanks.
-- 
View this message in context: 
http://www.nabble.com/Problem-with-Axis2-client-and-XFire-service-tp19575959p19575959.html
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: Null EndpointDescription Parameter in JAXWSMessageReceiver

2008-09-19 Thread Martin Gainty


agree with brian-

place this deployer in ./WEB-INF/axis2.xml
deployer extension=.jar directory=pojo 
class=org.apache.axis2.jaxws.framework.JAXWSDeployer/

restart axis

copy your .class file to AXIS2_HOME/repository/pojo


HTH
Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


To: axis-user@ws.apache.org
Subject: Re: Null EndpointDescription Parameter in JAXWSMessageReceiver
From: [EMAIL PROTECTED]
Date: Fri, 19 Sep 2008 17:43:48 +0100



Hi Ben,



I am not sure if this still works. You
might be better off repackaging your service as a jar file, and dropping
it in your axis2_home/repository/servicejars directory. The JAXWSDeployer
will examine all jars within that directory and deploy those classes that
have JAX-WS annotations which identify them as web services. You won't
need a service.xml file.



Cheers



Brian DePradine

Web Services Development

IBM Hursley

External  +44 (0) 1962 816319 Internal
246319



If you can't find the time to do it right the first time, where will you
find the time to do it again?





Ben Reif [EMAIL PROTECTED] wrote
on 16/09/2008 21:08:16:



 I am using Axis2 1.4 and I have JAXWS Web Services deployed in *.aar

 files. I have the JAXWSMessageReceiver configured in the service.

 xml, but get an exception because the EndpointDescription parameter


 in the service is null and it tries to do this:

  

 Parameter endpointDescParam =

  
  service.getParameter(EndpointDescription.

 AXIS_SERVICE_PARAMETER);

 if (endpointDescParam
== null) {

 throw
new RuntimeException(Messages.getMessage(

 JAXWSMessageReceiverNoServiceClass));

 }

  

 Does anyone know how this gets set? It seems
like the only place 

 I've found is in EndpointDescriptionImpl.addToAxisService(), but 

 what do I need to do to get this logic to be called?

  

 Thanks,

 Ben











Unless stated otherwise above:

IBM United Kingdom Limited - Registered in England and Wales with number
741598. 

Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU











_
See how Windows Mobile brings your life together—at home, work, or on the go.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/

RE: Problem with Axis2 client and XFire service

2008-09-19 Thread Martin Gainty

the answer is neither

you'll need to construct a messageContext 
fill it with the supplied OMElement parameter
create a client using the supplied operation parameter
add the messageContext to your just created client
then execute..
e.g.

/**
 * Directly invoke a named operation with a Robust In-Only MEP. This method
 * just sends your supplied XML and possibly receives a fault. For more
 * control, you can instead create a client for the operation and use that
 * client to execute the send.
 *
 * @param operation name of operation to be invoked (non-codenull/code)
 * @param elem  XML to send
 * @throws AxisFault if something goes wrong while sending it or if a fault 
is
 *   received in response (per the Robust In-Only MEP).
 * @see #createClient(QName)
 */
public void sendRobust(QName operation, OMElement elem) throws AxisFault {
MessageContext mc = new MessageContext();
fillSOAPEnvelope(mc, elem);
OperationClient mepClient = createClient(operation);
mepClient.addMessageContext(mc);
mepClient.execute(true);
}

If you are unable to execute the client call we will need to see your wsdl to 
assist you further

Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


 Date: Fri, 19 Sep 2008 09:53:55 -0700
 From: [EMAIL PROTECTED]
 To: axis-user@ws.apache.org
 Subject: Problem with Axis2 client and XFire service
 
 
 Hi,
 
 I created an Axis2 client for an XFire service. But something seems to be
 wrong. 
 When I run the client this is what I get.
 
 org.apache.axis2.AxisFault: Parameter {urn:login.safe.two.us}TestLoginType
 does not exist!
   at
 org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)
   at
 org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
   at
 org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
   at
 org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
   at
 org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
 
 I debugged the client and found that the error occurs when this statement is
 executed in the stub:
 
 //execute the operation client
 _operationClient.execute(true);
 
 Can anyone let me know is it the client that is weird or the service?
 
 
 Thanks.
 -- 
 View this message in context: 
 http://www.nabble.com/Problem-with-Axis2-client-and-XFire-service-tp19575959p19575959.html
 Sent from the Axis - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

_
Get more out of the Web. Learn 10 hidden secrets of Windows Live.
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008

[axis2] JAXB does not respect required fixed attributes?

2008-09-19 Thread Jake Goulding

Hey all, I have the following snippet of schema:

xs:complexType name=foo 
  xs:complexContent
xs:extension base=bar
  xs:sequence
xs:element name=user /
  /xs:sequence
  xs:attribute name=animal fixed=cow use=required /
/xs:extension
  /xs:complexContent
/xs:complexType

However, using Wireshark, I do not see @animal=cow being sent across 
the network. Using the same WSDL with .NET, I *do* see the attribute.


I can force it by doing something like:

foo.setAnimal(foo.getAnimal());

But that's pretty ugly...

What am I doing wrong?

Thanks!

-Jake

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



RE: Problem with Axis2 client and XFire service

2008-09-19 Thread jackdawson

Thanks Martin.

Actually, I'm using Eclipse with Axis2 Codegen plugins. When I created
client using it, this is what it created as the stub:
(I'm pasting only the operation testLogin implementation from the stub). 
Please let me know if you want me to post my WSDL.

/**
 * Auto generated method signature
 * 
 * @see us.two.safe.login.LoginService#testLogin
 * @param testLoginType0
 */

 public 
us.two.safe.login.LoginServiceStub.TestLoginTypeResponse testLogin(
   us.two.safe.login.LoginServiceStub.TestLoginType
testLoginType0) throws java.rmi.RemoteException

  {
  org.apache.axis2.context.MessageContext _messageContext =
null;
  try{
org.apache.axis2.client.OperationClient _operationClient = 

_serviceClient.createClient(_operations[0].getName());
_operationClient.getOptions().setAction(\\);
  
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);

addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,);

  // create a message context
  _messageContext = new
org.apache.axis2.context.MessageContext();
  

  // create SOAP envelope with that payload
  org.apache.axiom.soap.SOAPEnvelope env = null;

  env =
toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
testLoginType0,
optimizeContent(new
javax.xml.namespace.QName(urn:login.safe.two.us,
testLogin)));
  
  //adding SOAP soap_headers
  _serviceClient.addHeadersToEnvelope(env);

  // set the message context with that soap envelope
  _messageContext.setEnvelope(env);

 // add the message contxt to the operation client
 _operationClient.addMessageContext(_messageContext);

 //execute the operation client
 _operationClient.execute(true);

 org.apache.axis2.context.MessageContext _returnMessageContext =
_operationClient.getMessageContext(
  
org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
 org.apache.axiom.soap.SOAPEnvelope _returnEnv =
_returnMessageContext.getEnvelope();


 java.lang.Object object =
fromOM(_returnEnv.getBody().getFirstElement() ,

two.safe.login.LoginServiceStub.TestLoginTypeResponse.class,
 
getEnvelopeNamespaces(_returnEnv));

   
 return
(us.two.safe.login.LoginServiceStub.TestLoginTypeResponse)object;
   
 }
catch(org.apache.axis2.AxisFault f){

org.apache.axiom.om.OMElement faultElt = f.getDetail();
if (faultElt!=null){
if (faultExceptionNameMap.containsKey(faultElt.getQName())){
//make the fault by reflection
try{
java.lang.String exceptionClassName =   

(java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());
java.lang.Class exceptionClass =
java.lang.Class.forName(exceptionClassName);
java.lang.Exception ex=
(java.lang.Exception)
exceptionClass.newInstance();
//message class
java.lang.String messageClassName =
(java.lang.String)faultMessageMap.get(faultElt.getQName());
java.lang.Class messageClass =
java.lang.Class.forName(messageClassName);
java.lang.Object messageObject =
fromOM(faultElt,messageClass,null);
java.lang.reflect.Method m =
exceptionClass.getMethod(setFaultMessage,
   new java.lang.Class[]{messageClass});
m.invoke(ex,new java.lang.Object[]{messageObject});


throw new java.rmi.RemoteException(ex.getMessage(),
ex);
}catch(java.lang.ClassCastException e){
   // we cannot intantiate the class - throw the
original Axis fault
throw f;
} catch (java.lang.ClassNotFoundException e) {
// we cannot intantiate the class - throw the
original Axis fault
throw f;
}catch 

Re: Transport out has not been set when using local WSDL file

2008-09-19 Thread Stephen Hall
Don't know if this the cause for you but I've commonly seen this error on Axis2 
clients when all of the necessary run time jars are not on the classpath.

My understanding is that if you don't explicitly have an axis2.xml file a 
default configuration is used -- you don't need one unless you need additional 
configuration.

  
Steve Hall



- Original Message 
From: Sagi Mann [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Friday, September 19, 2008 2:30:47 AM
Subject: Transport out has not been set when using local WSDL file


Hi all, 
I'm using axis2 1.4.1 (Java), and I have encountered yet another case of
Transport out has not been set error, which I was unable to resolve from
looking at the other posts on the subject. 

The exception occurs when trying to invoke any web service method via the
stub (generated using ADB). I only knew that this was the exception because
I added f.printStackTrace() line in my generated HelloServiceStub.test
method. Without it, the main app simply gets a vague NPE on a line in the
stub code: 
   } finally { 
  
_messageContext.getTransportOut().getSender().cleanup(_messageContext); 
   } 

I narrowed the issue down to the client's stub creation line. 
Basically, if I create a stub using a WDL url that looks like this, all is
ok: 
http://localhost:8080/web-ws-simple/HelloService?wsdl

But, if I try to use a local copy, I get the Transport out has not been
set exception: 
file://V:/src/test/ws/web-ws-simple-client-axis2-standalone/resources/META-INF/Hello.wsdl

The content of both WSDL files is identical, and they both contain an
appropriate HTTP port address: 
soap:address location=http://localhost:8080/web-ws-simple/HelloService/

I configured log4j to show all the org.apache.axis2 messages (prio ALL). I'm
attaching the log4j output for both test runs, which are identical almost up
to the exception, but the few differences don't mean much to me (starting
line 703). Note: I don't have an axis2.xml file on the client side. Neither
does the sample axis2 WS client. Is some custom axis2.xml configuration
needed?

Any ideas on how to solve the issue will be appreciated.
http://www.nabble.com/file/p19567501/axis2-good.txt axis2-good.txt 
http://www.nabble.com/file/p19567501/axis2-bad.txt axis2-bad.txt 
-- 
View this message in context: 
http://www.nabble.com/%22Transport-out-has-not-been-set%22-when-using-local-WSDL-file-tp19567501p19567501.html
Sent from the Axis - User mailing list archive at Nabble.com.


-
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]



Rebuilding Context

2008-09-19 Thread Tina Silva
Hello Everybody! I'm new at this list. I am new at Java and Axis too, so I
really need your help. I'd like to save and restore the message context.
Actually, I've alredy serialized it and sent it to another service as an
OMElement object. What do I have to do to rebuild it? As far as I know, the
messagecontext class implements the readExternal method, I just don't know
what to do to unserialize it...

Thanks in advance!