newbie question regarding rampart samples and tcpmon

2008-07-03 Thread Thomas Porschberg
Hi,

I'm new to AXIS2 and rampart. 
However in a first step I got a simple unsecure webservice 
running with AXIS2-server and a gsoap client.
In a second step I installed rampart and tried to execute the 
samples.
I run sample02 successful (I copied the sample02.aar to
axis2-1.4/repository/services and run "ant client.02"). 
Next step was to observe the SOAP-messages exchanged with tcpmon
(at least I thought so...).
I started tcpmon listening on port 9080 changed 

 

in ../rampart-1.3/samples/basic

and started the client again.

Now I get an exception:

[java] Exception in thread "main" org.apache.axis2.AxisFault:
Connection reset [java] at
org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) [java] at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193)

In tcpmon I see:


  POST /axis2/services/sample02 HTTP/1.1

java.net.MalformedURLException: no protocol: axis2/services/sample02
at java.net.URL.(URL.java:567)
at java.net.URL.(URL.java:464)
at java.net.URL.(URL.java:413)
at
org.apache.ws.commons.tcpmon.Connection.run(Connection.java:276)



How can this be solved ?

Regards,
Thomas


-- 
Otto Software Partner GmbH 
Tel.: 0351/49723 158 Email: [EMAIL PROTECTED]
01067 Dresden, Freiberger Str.35 - AG Dresden, HRB 2475 
Geschäftsführer: Burkhard Arrenberg, Heinz A. Bade, Jens Gruhl


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



Re: How to consume .Net ( with WSE3.0 security enabled ) web services using Java Client(Axis 1.3)

2008-07-03 Thread sh_santosh

Dear all,

can please suggest some tutorial or Link or your guidelines using Axis 1.3 ,
jakarta-tomcat-5.0.28.

Regards
Santosh



Nunny wrote:
> 
> Hi Santosh,
> 
> I have to consume .Net web services( WSE 3.0 enabled) from Java Client. I
> am
>> using Axis 1.3 , jakarta-tomcat-5.0.28.
>> They have enabled WSE 3.0 in .Net web services ( Doc / Literal web
>> services
>> ).
>>
>> Problem : Security requirements are not satisfied because the security
>> header is not present in the incoming message .When we invoke .Net web
>> services from Java client, we are getting above exception.
>>
>>
>> What will be the possible solution ?
> 
> 
> You can use  Apache Rampart  [1]  to solve your problem.  Apache Rampart
> is
> the security module for Axis 2.
> Can you post the WSDL of the service you want to consume so that I will be
> able to tell you the exact steps to follow.
> 
> [1] - http://ws.apache.org/rampart/
> 
> -- 
> Nandana Mihindukulasooriya
> WSO2 inc.
> 
> http://nandana83.blogspot.com/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/soapenv%3AServer.userException---SimpleDeserializer-encountered-a-child-element%2C-which-is-NOT-expected%2C-in-something-it-was-trying-to-deserialize-tp16296688p18273078.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: How to consume .Net ( with WSE3.0 security enabled ) web services using Java Client(Axis 1.3)

2008-07-03 Thread Nandana Mihindukulasooriya
Hi Santosh,

I have to consume .Net web services( WSE 3.0 enabled) from Java Client. I am
> using Axis 1.3 , jakarta-tomcat-5.0.28.
> They have enabled WSE 3.0 in .Net web services ( Doc / Literal web services
> ).
>
> Problem : Security requirements are not satisfied because the security
> header is not present in the incoming message .When we invoke .Net web
> services from Java client, we are getting above exception.
>
>
> What will be the possible solution ?


You can use  Apache Rampart  [1]  to solve your problem.  Apache Rampart is
the security module for Axis 2.
Can you post the WSDL of the service you want to consume so that I will be
able to tell you the exact steps to follow.

[1] - http://ws.apache.org/rampart/

-- 
Nandana Mihindukulasooriya
WSO2 inc.

http://nandana83.blogspot.com/


Re: Exceptions when using a Rampart client generated from stub classes.

2008-07-03 Thread Nandana Mihindukulasooriya
Hi Sanjay,

That worked perfectly! Thanks for your advice. On a separate note, I've
> a question regarding disabling HTTPS. The primary reason I want to do
> this is because TCPMON can't intercept encrypted messages. I disabled
> HTTPS by commenting out the following line in the services.xml file :
>
>
>  
>
>  
>
>

I'm not clear about your requirements. By commenting out the above line,
what do is remove the requirement which says the message MUST come through
the HTTPS transport. So if you comment this line and call the web service
through HTTP , you will be able to intercept the messages through TCPMON. Is
this what you want ?

Else if we really want is to disable https for a certain service, "Exposing
a Service on a Selected Transport" section of this tutorial [1].

thanks,
nandana

[1] - http://wso2.org/library/2060

-- 
Nandana Mihindukulasooriya
WSO2 inc.

http://nandana83.blogspot.com/


Re: Axis wsdl2java -generated codes

2008-07-03 Thread prabhu p
Hi Keith ,

Here is my wsdl and xsd file . Please note iam able to get as expected using
Axis2 that is

stub file will have method like login(LoginMethodArgs parameter);

Let me know if you want more informations .

Thanks,
Prabhu

On Thu, Jul 3, 2008 at 9:53 PM, keith chapman <[EMAIL PROTECTED]>
wrote:

> Hi Prabhu,
>
> Can you post your WSDL please.
>
> Thanks,
> Keith.
>
>
> On Thu, Jul 3, 2008 at 6:42 PM, prabhu p <[EMAIL PROTECTED]> wrote:
>
>> Hello Everyone ,
>> I am using Axis 1.4 for converting WSDl2Java and testing my web services .
>> I am writing a client which uses these generated codes. WSDL2Java
>> is successful but the generated codes are missing some informations means,
>>
>> It creates a stub files which has a method like this   *login(AesLogin
>> AL);  *
>>
>> but in my wsdl i have define like this
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> I am expecting method like this *login(LoginMethodArgs parameter)  *in
>> the stub and port file generated . I am able to get properly like this when
>> i use Axis2 framework .
>>
>> Because of this my soap requests goes like this
>>
>> http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="
>> http://www.w3.org/2001/XMLSchema"; xmlns:xsi="
>> http://www.w3.org/2001/XMLSchema-instance";>http://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CAesLogin>changedOn="0"
>>  mask="0" objectId="0" options="0" parentId="0"
>> password="admin" userName="admin" xmlns="
>> http://xyz.com/abc/types"/>http://xyz.com/abc/types%22/%3E%3C/soapenv:Body%3E%3C/soapenv:Envelope>
>> >
>>
>> But my server expects a request like
>>
>> http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="
>> http://www.w3.org/2001/XMLSchema"; xmlns:xsi="
>> http://www.w3.org/2001/XMLSchema-instance";><*Login*
>> >http://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CLogin%3E%3CAesLogin>changedOn="0"
>> > mask="0" objectId="0" options="0" parentId="0"
>> password="admin" userName="admin" xmlns="http://xyz.com/abc/types"/>> Login*>http://xyz.com/abc/types%22/%3E%3C/Login%3E%3C/soapenv:Body%3E%3C/soapenv:Envelope>
>> >
>>
>>
>> Note: I am able to achieve this through Axis2 framework .
>>
>> Can anyone help me on this . Is there any way to overcome this issue.
>>
>> Thanks in Advance,
>> Prabhu
>>
>>
>
>
> --
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org

http://schemas.xmlsoap.org/wsdl/"; xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:tns="http://xyz.com/abc/types"; targetNamespace="http://xyz.com/abc/types"; name="loc">
	
		
			http://xyz.com/abc/types"; schemaLocation="loc.xsd"/>
		
	
	
		
	
	
		
	
	
		
	
	
		
			
			
		
	
	
		http://schemas.xmlsoap.org/soap/http"/>
		
			
			

			
			

			
		
	
	
		
			https://0.0.0.0/aaa"/>
		
	



http://www.w3.org/2001/XMLSchema";
   targetNamespace="http://xyz.com/abc/types";
   xmlns="http://xyz.com/abc/types";
   elementFormDefault="qualified" attributeFormDefault="qualified">





















	   


	
	
		
		
		
		
	
	
		


	
	
	
	
	
	
	   	
	
	
	 
	

	
	
	
		
		
	
	
	
 





	



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

Re: anyType element again and again

2008-07-03 Thread pierre betz
So, any ideas ? I tried some other ways, but I still really need to make a
request which can send differents type of elements when I call it
still blocked..


Re: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize

2008-07-03 Thread Thilina Gunarathne
>  Will this method.addChild will not create the proper XML format when I
> send in the message?
>
What I mean by proper XML format is the XMLSchema which your service
mandates your request should adhere to..

Do you have a proper WSDL for the service.. Is the service under ur control
or something external..

~Thilina

>
>
>
>
> msgAttach.setUserId("Test");
>
> msgAttach.setPassword("test");
>
> msgAttach.setXMLMsg("");
>
> msgAttach.setElement(method);
>
>
>
> myStub.processWithAttach(msgAttach);
>
>
>
> Thanks,
> Asmita
>
>
>  --
>
> *From:* Thilina Gunarathne [mailto:[EMAIL PROTECTED]
> *Sent:* Thursday, July 03, 2008 2:48 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can
> not serialize
>
>
>
> Hi,
> I'm a bit confused... Why are you creating the XML using Axiom while you
> have stubs generated... It would have been better if you fixed your wsdl to
> reflect the correct XML elements and code generated..
>
> Looks like you are getting the fault from the serverside.  A message trace
> of the request and the WSDL of the service would help to figure out the
> problem clearly..
>
>myStub._getServiceClient().getOptions()
>
> .setProperty(Constants.Configuration.*ENABLE_MTOM*,
> Constants.*VALUE_TRUE*);
>
>
> myStub._getServiceClient().getOptions().setTimeOutInMilliSeconds(1);
>
> File file = *new* File(*INPUT_FILE*);
>
> FileInputStream fis = *new* FileInputStream(file);
>
> String base64String = Base64.*encode*(*readFully*(fis));
> //reads the file bitwise before encode is called on it.
>
>  You can just create a DataHandler and create the OMText out of it...
> Trying to do the above will put in you in trouble if you are trying to send
> a larger attachment.
>
>
>
> OMText binaryNode
> =fac.createOMText(base64String,"application/pdf",*true*);
>
>  You can use the createOMText() with DataHandler..
>
>
>
>
>
> Why do I get unknown type cannot serialize?
>
>  Chances are that you are not sending the message in the correct (XML
> hierachy) format..
>
> thanks,
> Thilina
>
>
>
> Thanks,
>
> Asmita
>  --
>
> *From:* Tony Dean [mailto:[EMAIL PROTECTED]
> *Sent:* Thursday, July 03, 2008 11:46 AM
> *To:* axis-user@ws.apache.org
> *Subject:* RE: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can
> not serialize
>
>
>
> don't know about your issue, but there are other issues fixed in 1.4 that
> were broke in 1.3 so I wouldn't go back there.
>
>
>
> *From:* Attharkar, Asmita [mailto:[EMAIL PROTECTED]
> *Sent:* Thursday, July 03, 2008 9:40 AM
> *To:* axis-user@ws.apache.org
> *Subject:* MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not
> serialize
>
>
>
> All,
>
>
>
> I am trying to send a pdf attachment in the soap message but I get this:
>
>
>
>
> org.apache.axis2.databinding.utils.ConverterUtil.serializeAnyType(ConverterUtil.java:1449)
>
>
>
> And the message doesn't come to web services server, it is failing in
> OperationClient.execute() method itself.
>
> The AxisFault message shows "*Unknow type can not serialize*". What could
> be the possible reasons for this or is this a known issue with axis2 1.4
> release? Should I use axis2 1.3 release if I need to send an attachment
> using MTOM?
>
>
>
> Thanks so much for you help!
>
>
>
> I am using JRE and JDK 1.5_15, Ant 1.6, apache tomcat server 1.6 and Axis2
> 1.4
>
>
>
> Thanks,
>
> Asmita
>
>
>
>
>
>
> --
> Thilina Gunarathne - http://thilinag.blogspot.com
>



-- 
Thilina Gunarathne - http://thilinag.blogspot.com


Re: Axis2 Client config location

2008-07-03 Thread Sameera Jayasoma
Hi Brian,

I just have look at Axis2 source code. I noticed that Axis2 uses the system
properties "axis2.repo" and "axis2.xml" to get the locations of the
repository and the axis2.xml, if you haven't specified them in your client
side code.

So you can use  -Daxis2.repo or -Daxis2.xml system properties.

1. If you are using serviceClient, use the constructor which requires no
parameters
* ServiceClient sc = new ServiceClient();
*
2. If you are using generated client stub (There may be a better solution)
* ConfigurationContext ctx = ConfigurationContextFactory**
.createConfigurationContextFrom**FileSystem(null, null);
ServiceStub stub = new ServiceStub(ctx);*

Thanks

Sameera Jayasoma
Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://sameera-jayasoma.blogspot.com/


RE: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize

2008-07-03 Thread Attharkar, Asmita
Ok Now I am using

File file = new File(INPUT_FILE);
FileDataSource fileDataSource = new FileDataSource(file); //---
DataHandler dataHandler = new DataHandler(fileDataSource); //
processWithAttach msgAttach = new processWithAttach ();
OMFactory fac = OMAbstractFactory.getOMFactory();
OMText binaryNode =fac.createOMText(dataHandler,true);

But still the same issue, how can I make sure if I am using the right format.
To create my message I am using the standard methods itself:

OMElement method = fac.createOMElement("processWithAttach ", omNs);
method.addChild(binaryNode);

 Will this method.addChild will not create the proper XML format when I send in 
the message?


msgAttach.setUserId("Test");
msgAttach.setPassword("test");
msgAttach.setXMLMsg("");
msgAttach.setElement(method);

myStub.processWithAttach(msgAttach);

Thanks,
Asmita


From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 03, 2008 2:48 PM
To: axis-user@ws.apache.org
Subject: Re: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not 
serialize

Hi,
I'm a bit confused... Why are you creating the XML using Axiom while you have 
stubs generated... It would have been better if you fixed your wsdl to reflect 
the correct XML elements and code generated..

Looks like you are getting the fault from the serverside.  A message trace of 
the request and the WSDL of the service would help to figure out the problem 
clearly..

myStub._getServiceClient().getOptions()

.setProperty(Constants.Configuration.ENABLE_MTOM, 
Constants.VALUE_TRUE);


myStub._getServiceClient().getOptions().setTimeOutInMilliSeconds(1);

File file = new File(INPUT_FILE);

FileInputStream fis = new FileInputStream(file);

String base64String = Base64.encode(readFully(fis)); //reads the 
file bitwise before encode is called on it.
You can just create a DataHandler and create the OMText out of it... Trying to 
do the above will put in you in trouble if you are trying to send a larger 
attachment.


OMText binaryNode 
=fac.createOMText(base64String,"application/pdf",true);
You can use the createOMText() with DataHandler..



Why do I get unknown type cannot serialize?
Chances are that you are not sending the message in the correct (XML hierachy) 
format..

thanks,
Thilina



Thanks,

Asmita



From: Tony Dean [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 03, 2008 11:46 AM
To: axis-user@ws.apache.org
Subject: RE: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not 
serialize



don't know about your issue, but there are other issues fixed in 1.4 that were 
broke in 1.3 so I wouldn't go back there.



From: Attharkar, Asmita [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 03, 2008 9:40 AM
To: axis-user@ws.apache.org
Subject: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not 
serialize



All,



I am trying to send a pdf attachment in the soap message but I get this:



org.apache.axis2.databinding.utils.ConverterUtil.serializeAnyType(ConverterUtil.java:1449)



And the message doesn't come to web services server, it is failing in 
OperationClient.execute() method itself.

The AxisFault message shows "Unknow type can not serialize". What could be the 
possible reasons for this or is this a known issue with axis2 1.4 release? 
Should I use axis2 1.3 release if I need to send an attachment using MTOM?



Thanks so much for you help!



I am using JRE and JDK 1.5_15, Ant 1.6, apache tomcat server 1.6 and Axis2 1.4



Thanks,

Asmita





--
Thilina Gunarathne - http://thilinag.blogspot.com


Re: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize

2008-07-03 Thread Thilina Gunarathne
Hi,
I'm a bit confused... Why are you creating the XML using Axiom while you
have stubs generated... It would have been better if you fixed your wsdl to
reflect the correct XML elements and code generated..

Looks like you are getting the fault from the serverside.  A message trace
of the request and the WSDL of the service would help to figure out the
problem clearly..

> myStub._getServiceClient().getOptions()
>
> .setProperty(Constants.Configuration.*ENABLE_MTOM*,
> Constants.*VALUE_TRUE*);
>
>
> myStub._getServiceClient().getOptions().setTimeOutInMilliSeconds(1);
>
> File file = *new* File(*INPUT_FILE*);
>
> FileInputStream fis = *new* FileInputStream(file);
>
> String base64String = Base64.*encode*(*readFully*(fis));
> //reads the file bitwise before encode is called on it.
>
You can just create a DataHandler and create the OMText out of it... Trying
to do the above will put in you in trouble if you are trying to send a
larger attachment.

>
> OMText binaryNode
> =fac.createOMText(base64String,"application/pdf",*true*);
>
You can use the createOMText() with DataHandler..


Why do I get unknown type cannot serialize?
>
Chances are that you are not sending the message in the correct (XML
hierachy) format..

thanks,
Thilina


>
> Thanks,
>
> Asmita
>  --
>
> *From:* Tony Dean [mailto:[EMAIL PROTECTED]
> *Sent:* Thursday, July 03, 2008 11:46 AM
> *To:* axis-user@ws.apache.org
> *Subject:* RE: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can
> not serialize
>
>
>
> don't know about your issue, but there are other issues fixed in 1.4 that
> were broke in 1.3 so I wouldn't go back there.
>
>
>
> *From:* Attharkar, Asmita [mailto:[EMAIL PROTECTED]
> *Sent:* Thursday, July 03, 2008 9:40 AM
> *To:* axis-user@ws.apache.org
> *Subject:* MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not
> serialize
>
>
>
> All,
>
>
>
> I am trying to send a pdf attachment in the soap message but I get this:
>
>
>
>
> org.apache.axis2.databinding.utils.ConverterUtil.serializeAnyType(ConverterUtil.java:1449)
>
>
>
> And the message doesn't come to web services server, it is failing in
> OperationClient.execute() method itself.
>
> The AxisFault message shows "*Unknow type can not serialize*". What could
> be the possible reasons for this or is this a known issue with axis2 1.4
> release? Should I use axis2 1.3 release if I need to send an attachment
> using MTOM?
>
>
>
> Thanks so much for you help!
>
>
>
> I am using JRE and JDK 1.5_15, Ant 1.6, apache tomcat server 1.6 and Axis2
> 1.4
>
>
>
> Thanks,
>
> Asmita
>
>
>



-- 
Thilina Gunarathne - http://thilinag.blogspot.com


RE: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize

2008-07-03 Thread Tony Dean
try specifying "application/octet"... I personally use a dataHandler and use 
streams directly...

From: Attharkar, Asmita [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 03, 2008 12:18 PM
To: axis-user@ws.apache.org
Subject: RE: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not 
serialize

Hi,

Here is my client code:


myStub._getServiceClient().getOptions()
.setProperty(Constants.Configuration.ENABLE_MTOM, 
Constants.VALUE_TRUE);

myStub._getServiceClient().getOptions().setTimeOutInMilliSeconds(1);
File file = new File(INPUT_FILE);
FileInputStream fis = new FileInputStream(file);
String base64String = Base64.encode(readFully(fis)); //reads the 
file bitwise before encode is called on it.

ServiceMethodWithAttach serviceMsgAttach = new ServiceMethodWithAttach ();

OMFactory fac = OMAbstractFactory.getOMFactory();

OMText binaryNode 
=fac.createOMText(base64String,"application/pdf",true);

OMNamespace omNs = fac.createOMNamespace("http://abc.xyz.com";, 
"ns1");

OMElement method = fac.createOMElement("processNPCMsgWithAttach", 
omNs);

method.addChild(binaryNode);


serviceMsgAttach.setUserId("Test"); // String 1
serviceMsgAttach.setPassword("test"); //String 2
serviceMsgAttach.setXMLMsg(""); //String 3
serviceMsgAttach.setElement(method); //Attachment

myStub.serviceMethodWithAttach (serviceMsgAttach);
System.out.println("done calling service...");

In Services.xml I have added the parameter :

true

Why do I get unknown type cannot serialize?

Thanks,
Asmita

From: Tony Dean [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 03, 2008 11:46 AM
To: axis-user@ws.apache.org
Subject: RE: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not 
serialize

don't know about your issue, but there are other issues fixed in 1.4 that were 
broke in 1.3 so I wouldn't go back there.

From: Attharkar, Asmita [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 03, 2008 9:40 AM
To: axis-user@ws.apache.org
Subject: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not 
serialize

All,

I am trying to send a pdf attachment in the soap message but I get this:

org.apache.axis2.databinding.utils.ConverterUtil.serializeAnyType(ConverterUtil.java:1449)

And the message doesn't come to web services server, it is failing in 
OperationClient.execute() method itself.
The AxisFault message shows "Unknow type can not serialize". What could be the 
possible reasons for this or is this a known issue with axis2 1.4 release? 
Should I use axis2 1.3 release if I need to send an attachment using MTOM?

Thanks so much for you help!

I am using JRE and JDK 1.5_15, Ant 1.6, apache tomcat server 1.6 and Axis2 1.4

Thanks,
Asmita



RE: Axis2 Client config location

2008-07-03 Thread Brian Dillon
Hi,

Thanks, I had seen this but I was hoping that there was a configuration
way of doing this rather than needing to hardcode the repository
location. Is there any system parameter way equivalent to the axis1
approach ?

Thanks,

Brian 

-Original Message-
From: Charitha Kankanamge [mailto:[EMAIL PROTECTED] 
Sent: 03 July 2008 11:05
To: axis-user@ws.apache.org
Subject: Re: Axis2 Client config location

Hi Brian,
You can use ConfigurationContext to pick up config files (e.g:-
axis2.xml) as follows

1.Create configurationContext from file system as follows.
ConfigurationContext cc =
ConfigurationContextFactory.createConfigurationContextFromFileSystem("\h
ome\user\axis2\repository","\home\user\axis2\conf\\axis2.xml");

2. Pass it to stub constructor (If you are using generated client stub)
ServiceStub stub = new ServiceStub(cc);

If you are using serviceClient;
ServiceClient sc = new ServiceClient(cc);

HTH
Charitha
Brian Dillon wrote:

>Hi,
>
>Is there way to indicate where a standalone axis2 client should pick up

>it's configuration files (e.g. in axis1 this could be done using 
>-Daxis.ClientConfigFile).
>
>Thanks,
>
>Brian
>
>__
>FINEOS Corporation is the global brand name of FINEOS Corporation
Limited and its affiliated group companies worldwide.
>The information contained in this e-mail is confidential, may be 
>privileged and is intended only for the user of the recipient named 
>above. If you are not the intended recipient or a representative of the

>intended recipient, you have received this e-mail in error and must not
copy, use or disclose the contents of this e-mail to anybody else.
>
>If you have received this e-mail in error, please notify the sender 
>immediately by return e-mail and permanently delete the copy you 
>received.  This e-mail has been swept for computer viruses. However,
you should carry out your own virus checks.
>Registered in Ireland, No. 205721.  http://www.FINEOS.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]


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



Re: Axis wsdl2java -generated codes

2008-07-03 Thread keith chapman
Hi Prabhu,

Can you post your WSDL please.

Thanks,
Keith.

On Thu, Jul 3, 2008 at 6:42 PM, prabhu p <[EMAIL PROTECTED]> wrote:

> Hello Everyone ,
> I am using Axis 1.4 for converting WSDl2Java and testing my web services . I
> am writing a client which uses these generated codes. WSDL2Java
> is successful but the generated codes are missing some informations means,
>
> It creates a stub files which has a method like this   *login(AesLogin
> AL);  *
>
> but in my wsdl i have define like this
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> I am expecting method like this *login(LoginMethodArgs parameter)  *in the
> stub and port file generated . I am able to get properly like this when i
> use Axis2 framework .
>
> Because of this my soap requests goes like this
>
> http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="
> http://www.w3.org/2001/XMLSchema"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance";>http://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CAesLogin>changedOn="0"
>  mask="0" objectId="0" options="0" parentId="0"
> password="admin" userName="admin" xmlns="
> http://xyz.com/abc/types"/>http://xyz.com/abc/types%22/%3E%3C/soapenv:Body%3E%3C/soapenv:Envelope>
> >
>
> But my server expects a request like
>
> http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="
> http://www.w3.org/2001/XMLSchema"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance";><*Login*
> >http://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CLogin%3E%3CAesLogin>changedOn="0"
> > mask="0" objectId="0" options="0" parentId="0"
> password="admin" userName="admin" xmlns="http://xyz.com/abc/types"/> Login*>http://xyz.com/abc/types%22/%3E%3C/Login%3E%3C/soapenv:Body%3E%3C/soapenv:Envelope>
> >
>
>
> Note: I am able to achieve this through Axis2 framework .
>
> Can anyone help me on this . Is there any way to overcome this issue.
>
> Thanks in Advance,
> Prabhu
>
>


-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org


RE: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize

2008-07-03 Thread Attharkar, Asmita
Hi,

Here is my client code:


myStub._getServiceClient().getOptions()
.setProperty(Constants.Configuration.ENABLE_MTOM, 
Constants.VALUE_TRUE);

myStub._getServiceClient().getOptions().setTimeOutInMilliSeconds(1);
File file = new File(INPUT_FILE);
FileInputStream fis = new FileInputStream(file);
String base64String = Base64.encode(readFully(fis)); //reads the 
file bitwise before encode is called on it.

ServiceMethodWithAttach serviceMsgAttach = new ServiceMethodWithAttach ();

OMFactory fac = OMAbstractFactory.getOMFactory();

OMText binaryNode 
=fac.createOMText(base64String,"application/pdf",true);

OMNamespace omNs = fac.createOMNamespace("http://abc.xyz.com";, 
"ns1");

OMElement method = fac.createOMElement("processNPCMsgWithAttach", 
omNs);

method.addChild(binaryNode);


serviceMsgAttach.setUserId("Test"); // String 1
serviceMsgAttach.setPassword("test"); //String 2
serviceMsgAttach.setXMLMsg(""); //String 3
serviceMsgAttach.setElement(method); //Attachment

myStub.serviceMethodWithAttach (serviceMsgAttach);
System.out.println("done calling service...");

In Services.xml I have added the parameter :

true

Why do I get unknown type cannot serialize?

Thanks,
Asmita

From: Tony Dean [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 03, 2008 11:46 AM
To: axis-user@ws.apache.org
Subject: RE: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not 
serialize

don't know about your issue, but there are other issues fixed in 1.4 that were 
broke in 1.3 so I wouldn't go back there.

From: Attharkar, Asmita [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 03, 2008 9:40 AM
To: axis-user@ws.apache.org
Subject: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not 
serialize

All,

I am trying to send a pdf attachment in the soap message but I get this:

org.apache.axis2.databinding.utils.ConverterUtil.serializeAnyType(ConverterUtil.java:1449)

And the message doesn't come to web services server, it is failing in 
OperationClient.execute() method itself.
The AxisFault message shows "Unknow type can not serialize". What could be the 
possible reasons for this or is this a known issue with axis2 1.4 release? 
Should I use axis2 1.3 release if I need to send an attachment using MTOM?

Thanks so much for you help!

I am using JRE and JDK 1.5_15, Ant 1.6, apache tomcat server 1.6 and Axis2 1.4

Thanks,
Asmita



Re: Axis2 SOAP-client and HTTPS-based server using basic authentication

2008-07-03 Thread keith chapman
Noticed that you had

auth.setPassword(userName);
auth.setUsername(password);

in your code. A mistake probably that caused the issue?

Thanks,
Keith.

On Thu, Jul 3, 2008 at 8:07 PM, Odd Kenneth Oden <[EMAIL PROTECTED]>
wrote:

>
> Hello,
>
> I have been unable to successfully execute my WSDL-generated Axis2 1.4
> client against a web service that uses HTTPS and basic authentication.
>
> After some extensive search on the Internet, I found some suggestions which
> I have tried to implement. I've managed to successfully do a HTTP get
> against the service's WSDL-file using plain HTTPClient, but when I try to
> implement what should basically be the same parameters on the service stub,
> I receive a "Transport error: 401 Error: Unauthorized" error message.
>
> I've included the source code for the successful HTTPClient code and the
> not-so-successfull service stub:
>
>ProtocolSocketFactory protocolSocketFactory = new
> EasySSLProtocolSocketFactory();
>//ProtocolSocketFactory protocolSocketFactory = new
> SSLProtocolSocketFactory();
>Protocol https = new Protocol("https", protocolSocketFactory,
> 443);
>
>HttpState state = new HttpState();
>state.setCredentials(new AuthScope(host, 443), new
> UsernamePasswordCredentials(userName, password));
>
>HttpClient httpclient = new HttpClient();
>httpclient.setState(state);
>
>httpclient.getHostConfiguration().setHost(host, 443, https);
>GetMethod httpget = new GetMethod(wsdlPath);
>try {
>  httpclient.executeMethod(httpget);
>  System.out.println(httpget.getStatusLine());
>} finally {
>  httpget.releaseConnection();
>}
>
>HttpTransportProperties.Authenticator auth = new
> HttpTransportProperties.Authenticator();
>auth.setPassword(userName);
>auth.setUsername(password);
>auth.setHost(host);
>auth.setPort(443);
>
>SmsServiceStub service = new SmsServiceStub(endPoint);
>Options options = service._getServiceClient().getOptions();
>options.setProperty(HTTPConstants.AUTHENTICATE, auth);
>options.setProperty(HTTPConstants.CUSTOM_PROTOCOL_HANDLER,
> https);
>options.setTimeOutInMilliSeconds(60 * 1000); //1 minute
>
>SmsServiceStub.SubmitRsp resp = service.Submit(req);
>
> And the log:
>
> Running com.telenor.nwnsms.SmsServiceTest
> 03.jul.2008 16:11:29
> org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
> INFO: basic authentication scheme selected
> HTTP/1.1 200 OK
> 03.jul.2008 16:11:30 org.apache.axis2.deployment.ModuleDeployer deploy
> INFO: Deploying module: addressing-1.4
> 03.jul.2008 16:11:31
> org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
> INFO: basic authentication scheme selected
> 03.jul.2008 16:11:31 org.apache.commons.httpclient.HttpMethodDirector
> processWWWAuthChallenge
> INFO: Failure authenticating with BASIC ''@:443
> 03.jul.2008 16:11:31 org.apache.axis2.transport.http.HTTPSender sendViaPost
> INFO: Unable to sendViaPost to url[https://]
> org.apache.axis2.AxisFault: Transport error: 401 Error: Unauthorized
>at
>
> org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:298)
>at
> org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:192)
>at
> org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
>at
>
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327)
>at
>
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206)
>at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>at
>
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)
>at
>
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
>at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>at
> com.telenor.mr2.channel.nwn.SmsServiceStub.Submit(SmsServiceStub.java:207)
>at com.telenor.nwnsms.SmsServiceTest.testApp(SmsServiceTest.java:95)
>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:585)
>at junit.framework.TestCase.runTest(TestCase.java:154)
>at junit.framework.TestCase.runBare(TestCase.java:127)
>at junit.framework.TestResult$1.protect(TestResult.java:106)
>at junit.framework.TestResult.runProtected(TestResult.java:124)
>at junit.framework.TestResult.run(TestResult.j

RE: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize

2008-07-03 Thread Tony Dean
don't know about your issue, but there are other issues fixed in 1.4 that were 
broke in 1.3 so I wouldn't go back there.

From: Attharkar, Asmita [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 03, 2008 9:40 AM
To: axis-user@ws.apache.org
Subject: MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not 
serialize

All,

I am trying to send a pdf attachment in the soap message but I get this:

org.apache.axis2.databinding.utils.ConverterUtil.serializeAnyType(ConverterUtil.java:1449)

And the message doesn't come to web services server, it is failing in 
OperationClient.execute() method itself.
The AxisFault message shows "Unknow type can not serialize". What could be the 
possible reasons for this or is this a known issue with axis2 1.4 release? 
Should I use axis2 1.3 release if I need to send an attachment using MTOM?

Thanks so much for you help!

I am using JRE and JDK 1.5_15, Ant 1.6, apache tomcat server 1.6 and Axis2 1.4

Thanks,
Asmita



Re: Lightweight servlet container to test web services

2008-07-03 Thread Andrew Clegg
2008/7/3 Paul Fremantle <[EMAIL PROTECTED]>:
> Andrew
>
> In tests, Axis2 is much more performant running in Tomcat or with the
> native non-blocking NIO transports that with the built-in standard
> server. We use Tomcat in an embedded way in the WSO2 Web Services App
> server (http://wso2.org/projects/wsas/java) because we found it faster
> than Jetty or the built-in classes. Synapse on the other hand uses the
> non-blocking transport because it makes more sense as an intermediary.

Thanks for the tips. We'll certainly bear that in mind when we reach
production and host it in a proper app server!

Cheers,

Andrew.

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



Re: Lightweight servlet container to test web services

2008-07-03 Thread Paul Fremantle
Andrew

In tests, Axis2 is much more performant running in Tomcat or with the
native non-blocking NIO transports that with the built-in standard
server. We use Tomcat in an embedded way in the WSO2 Web Services App
server (http://wso2.org/projects/wsas/java) because we found it faster
than Jetty or the built-in classes. Synapse on the other hand uses the
non-blocking transport because it makes more sense as an intermediary.

Paul

On Thu, Jul 3, 2008 at 1:47 PM, Andrew Clegg <[EMAIL PROTECTED]> wrote:
> For production use, what are the advantages of deploying Axis2 within
> a full-on application server?
>
> We don't use any other Java web applications -- indeed, we don't use
> any other Java applications at the moment -- but we are migrating some
> webservices from Perl/SOAP::Lite to Java/Axis2.
>
> Given that the rest of our web infrastructure is based on Apache,
> mod_perl and legacy CGI scripts, and is likely to remain that way for
> quite some time, is there any actual point in the additional overhead
> of using a servlet container like Tomcat? Is it somehow more secure or
> robust than Axis2's built-in http server?
>
> Thanks,
>
> Andrew.
>
> 2008/7/3 Paul Fremantle <[EMAIL PROTECTED]>:
>> Axis and Axis2 also offer a lightweight built-in server runtime for
>> testing. Just look in the bin\ directory.
>>
>> Paul
>>
>> On Thu, Jul 3, 2008 at 12:12 PM, Alexey Zavizionov
>> <[EMAIL PROTECTED]> wrote:
>>> Is there anybody who use maven2 and any servlet container to test web
>>> services?
>>> Probably, servlet container runs as maven plugin.
>>>
>>> Regards,
>>> Alexey
>>>
>>
>>
>>
>> --
>> Paul Fremantle
>> Co-Founder and CTO, WSO2
>> Apache Synapse PMC Chair
>> OASIS WS-RX TC Co-chair
>>
>> blog: http://pzf.fremantle.org
>> [EMAIL PROTECTED]
>>
>> "Oxygenating the Web Service Platform", www.wso2.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]
>
>



-- 
Paul Fremantle
Co-Founder and CTO, WSO2
Apache Synapse PMC Chair
OASIS WS-RX TC Co-chair

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

"Oxygenating the Web Service Platform", www.wso2.com

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



Axis2 SOAP-client and HTTPS-based server using basic authentication

2008-07-03 Thread Odd Kenneth Oden

Hello,

I have been unable to successfully execute my WSDL-generated Axis2 1.4
client against a web service that uses HTTPS and basic authentication. 

After some extensive search on the Internet, I found some suggestions which
I have tried to implement. I've managed to successfully do a HTTP get
against the service's WSDL-file using plain HTTPClient, but when I try to
implement what should basically be the same parameters on the service stub,
I receive a "Transport error: 401 Error: Unauthorized" error message.

I've included the source code for the successful HTTPClient code and the
not-so-successfull service stub:

ProtocolSocketFactory protocolSocketFactory = new
EasySSLProtocolSocketFactory();
//ProtocolSocketFactory protocolSocketFactory = new
SSLProtocolSocketFactory();
Protocol https = new Protocol("https", protocolSocketFactory,
443);

HttpState state = new HttpState();
state.setCredentials(new AuthScope(host, 443), new
UsernamePasswordCredentials(userName, password));

HttpClient httpclient = new HttpClient();
httpclient.setState(state);

httpclient.getHostConfiguration().setHost(host, 443, https);
GetMethod httpget = new GetMethod(wsdlPath);
try {
  httpclient.executeMethod(httpget);
  System.out.println(httpget.getStatusLine());
} finally {
  httpget.releaseConnection();
}

HttpTransportProperties.Authenticator auth = new
HttpTransportProperties.Authenticator();
auth.setPassword(userName);
auth.setUsername(password);
auth.setHost(host);
auth.setPort(443);

SmsServiceStub service = new SmsServiceStub(endPoint);
Options options = service._getServiceClient().getOptions();
options.setProperty(HTTPConstants.AUTHENTICATE, auth);
options.setProperty(HTTPConstants.CUSTOM_PROTOCOL_HANDLER,
https);
options.setTimeOutInMilliSeconds(60 * 1000); //1 minute

SmsServiceStub.SubmitRsp resp = service.Submit(req);

And the log:

Running com.telenor.nwnsms.SmsServiceTest
03.jul.2008 16:11:29
org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: basic authentication scheme selected
HTTP/1.1 200 OK
03.jul.2008 16:11:30 org.apache.axis2.deployment.ModuleDeployer deploy
INFO: Deploying module: addressing-1.4
03.jul.2008 16:11:31
org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: basic authentication scheme selected
03.jul.2008 16:11:31 org.apache.commons.httpclient.HttpMethodDirector
processWWWAuthChallenge
INFO: Failure authenticating with BASIC ''@:443
03.jul.2008 16:11:31 org.apache.axis2.transport.http.HTTPSender sendViaPost
INFO: Unable to sendViaPost to url[https://]
org.apache.axis2.AxisFault: Transport error: 401 Error: Unauthorized
at
org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:298)
at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:192)
at
org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at
com.telenor.mr2.channel.nwn.SmsServiceStub.Submit(SmsServiceStub.java:207)
at com.telenor.nwnsms.SmsServiceTest.testApp(SmsServiceTest.java:95)
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:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMe

Re: Lightweight servlet container to test web services

2008-07-03 Thread Alexey Zavizionov
Thank you for reply.
I am developer of java web services based on Axis1.
For regular testing I have to start/stop servlet container to
deploy/undeploy test WAR application. This process should be embedded into
maven2 regular test process.

Is there documentation how can we start and deploy sample test application
with maven2 test phase on SimpleAxisServer?

PS,
we found Cargo project, but don't sure is it well for such kind of task.

Thanks and regards,
Alexey

On Thu, Jul 3, 2008 at 3:47 PM, Andrew Clegg <[EMAIL PROTECTED]> wrote:

> For production use, what are the advantages of deploying Axis2 within
> a full-on application server?
>
> We don't use any other Java web applications -- indeed, we don't use
> any other Java applications at the moment -- but we are migrating some
> webservices from Perl/SOAP::Lite to Java/Axis2.
>
> Given that the rest of our web infrastructure is based on Apache,
> mod_perl and legacy CGI scripts, and is likely to remain that way for
> quite some time, is there any actual point in the additional overhead
> of using a servlet container like Tomcat? Is it somehow more secure or
> robust than Axis2's built-in http server?
>
> Thanks,
>
> Andrew.
>
> 2008/7/3 Paul Fremantle <[EMAIL PROTECTED]>:
> > Axis and Axis2 also offer a lightweight built-in server runtime for
> > testing. Just look in the bin\ directory.
> >
> > Paul
> >
> > On Thu, Jul 3, 2008 at 12:12 PM, Alexey Zavizionov
> > <[EMAIL PROTECTED]> wrote:
> >> Is there anybody who use maven2 and any servlet container to test web
> >> services?
> >> Probably, servlet container runs as maven plugin.
> >>
> >> Regards,
> >> Alexey
> >>
> >
> >
> >
> > --
> > Paul Fremantle
> > Co-Founder and CTO, WSO2
> > Apache Synapse PMC Chair
> > OASIS WS-RX TC Co-chair
> >
> > blog: http://pzf.fremantle.org
> > [EMAIL PROTECTED]
> >
> > "Oxygenating the Web Service Platform", www.wso2.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]
>
>


MTOM: Axis2-1.4 issue?? XMLStreamException: Unknow type can not serialize

2008-07-03 Thread Attharkar, Asmita
All,

I am trying to send a pdf attachment in the soap message but I get this:

org.apache.axis2.databinding.utils.ConverterUtil.serializeAnyType(ConverterUtil.java:1449)

And the message doesn't come to web services server, it is failing in 
OperationClient.execute() method itself.
The AxisFault message shows "Unknow type can not serialize". What could be the 
possible reasons for this or is this a known issue with axis2 1.4 release? 
Should I use axis2 1.3 release if I need to send an attachment using MTOM?

Thanks so much for you help!

I am using JRE and JDK 1.5_15, Ant 1.6, apache tomcat server 1.6 and Axis2 1.4

Thanks,
Asmita



Re: Lightweight servlet container to test web services

2008-07-03 Thread Alexey Zavizionov
I see SimpleAxis2Server in the bin dir for Axis2, but nothing in the
axis1distribution.
My service is based on Axis1.


On Thu, Jul 3, 2008 at 3:26 PM, Paul Fremantle <[EMAIL PROTECTED]> wrote:

> Axis and Axis2 also offer a lightweight built-in server runtime for
> testing. Just look in the bin\ directory.
>
> Paul
>
> On Thu, Jul 3, 2008 at 12:12 PM, Alexey Zavizionov
> <[EMAIL PROTECTED]> wrote:
> > Is there anybody who use maven2 and any servlet container to test web
> > services?
> > Probably, servlet container runs as maven plugin.
> >
> > Regards,
> > Alexey
> >
>
>
>
> --
> Paul Fremantle
> Co-Founder and CTO, WSO2
> Apache Synapse PMC Chair
> OASIS WS-RX TC Co-chair
>
> blog: http://pzf.fremantle.org
> [EMAIL PROTECTED]
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


FW: ADB external mapping

2008-07-03 Thread Martin Kadlec
Hi,

 

I'm still struggling with getting the XML contents (or ) in a parse() method
of a ADBBean, storing them in the bean and feeding them later back to the
serialize() method. Is there an efficient way to copy the raw XML contents
from one to another without having to go through all the parse events? 

 

Thanks,

Martin

 

 

From: Martin Kadlec [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 30, 2008 10:15 AM
To: axis-user@ws.apache.org
Subject: RE: ADB external mapping

 

Hi Amila,

 

thank you for the quick answer.

I already tried to edit the parse() and serialize() methods in the generated
code but ended up with a dangling XMLStreamReader at the one and a
XMLStreamWriter at the other end. I don't see a way to ge input/output
streams from these writers. 

Is there an efficient way to copy the raw XML contents from one to another
without having to go through all the parse events? 

 

Thanks,

Martin

 

 

From: Amila Suriarachchi [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 30, 2008 7:01 AM
To: axis-user@ws.apache.org
Subject: Re: ADB external mapping

 

 

On Mon, Jun 30, 2008 at 4:15 AM, Martin Kadlec <[EMAIL PROTECTED]> wrote:

Hi,

 

I would like ADB to stop parsing at a certain point in the XML hierarchy,
thus I want all of my 'high level' parameters in the SOAP message mapped to
Java objects via ADB for easier handling but I need ADB to exclude some
elements/types from breaking them further down.  This means the latter
elements and all of their contents shall be stored as plain XML at the
corresponding point in the ADBBean hierarchy to be extracted and passed
along without any further parsing or serializing needed (these are large
blocks of XML data that is not going to be processed by the web service
layer itself).


I am not sure how -em option helps you solve this problem. 
One option is to edit the generated code (please see the parse() method.) so
that it does not parse after the necessary class level.

 

I tried to solve this use case with the -em (external mapping) option but
did not succeed because there is not much user documentation about this
feature. Also almost all questions about this I've found on the mailing list
and the web seem to be unanswered.

-em option is used to give an external mapping file to codegen engine. This
means you can sepecify to use some class written by you for codegen classes
instead of generated databinding class.

you can understand the format of the file using this code[1] :)

thanks,
Amila.

[1]
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/sr
c/org/apache/axis2/wsdl/codegen/extension/TypeMapperExtension.java?revision=
637413
 &view=markup

Is there someone who actually uses this?

 

Regards

Martin Kadlec




-- 
Amila Suriarachchi,
WSO2 Inc. 



Axis wsdl2java -generated codes

2008-07-03 Thread prabhu p
Hello Everyone ,
I am using Axis 1.4 for converting WSDl2Java and testing my web services . I
am writing a client which uses these generated codes. WSDL2Java
is successful but the generated codes are missing some informations means,

It creates a stub files which has a method like this   *login(AesLogin AL);
*

but in my wsdl i have define like this



















I am expecting method like this *login(LoginMethodArgs parameter)  *in the
stub and port file generated . I am able to get properly like this when i
use Axis2 framework .

Because of this my soap requests goes like this

http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="
http://www.w3.org/2001/XMLSchema"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance";>http://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CAesLogin>changedOn="0"
mask="0" objectId="0" options="0" parentId="0"
password="admin" userName="admin" xmlns="
http://xyz.com/abc/types"/>http://xyz.com/abc/types%22/%3E%3C/soapenv:Body%3E%3C/soapenv:Envelope>
>

But my server expects a request like

http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="
http://www.w3.org/2001/XMLSchema"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance";><*Login*>http://www.w3.org/2001/XMLSchema-instance%22%3E%3Csoapenv:Body%3E%3CLogin%3E%3CAesLogin>changedOn="0"
mask="0" objectId="0" options="0" parentId="0"
password="admin" userName="admin" xmlns="http://xyz.com/abc/types"/>http://xyz.com/abc/types%22/%3E%3C/Login%3E%3C/soapenv:Body%3E%3C/soapenv:Envelope>
>


Note: I am able to achieve this through Axis2 framework .

Can anyone help me on this . Is there any way to overcome this issue.

Thanks in Advance,
Prabhu


Re: Lightweight servlet container to test web services

2008-07-03 Thread Andrew Clegg
For production use, what are the advantages of deploying Axis2 within
a full-on application server?

We don't use any other Java web applications -- indeed, we don't use
any other Java applications at the moment -- but we are migrating some
webservices from Perl/SOAP::Lite to Java/Axis2.

Given that the rest of our web infrastructure is based on Apache,
mod_perl and legacy CGI scripts, and is likely to remain that way for
quite some time, is there any actual point in the additional overhead
of using a servlet container like Tomcat? Is it somehow more secure or
robust than Axis2's built-in http server?

Thanks,

Andrew.

2008/7/3 Paul Fremantle <[EMAIL PROTECTED]>:
> Axis and Axis2 also offer a lightweight built-in server runtime for
> testing. Just look in the bin\ directory.
>
> Paul
>
> On Thu, Jul 3, 2008 at 12:12 PM, Alexey Zavizionov
> <[EMAIL PROTECTED]> wrote:
>> Is there anybody who use maven2 and any servlet container to test web
>> services?
>> Probably, servlet container runs as maven plugin.
>>
>> Regards,
>> Alexey
>>
>
>
>
> --
> Paul Fremantle
> Co-Founder and CTO, WSO2
> Apache Synapse PMC Chair
> OASIS WS-RX TC Co-chair
>
> blog: http://pzf.fremantle.org
> [EMAIL PROTECTED]
>
> "Oxygenating the Web Service Platform", www.wso2.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]



Re: Lightweight servlet container to test web services

2008-07-03 Thread Paul Fremantle
Axis and Axis2 also offer a lightweight built-in server runtime for
testing. Just look in the bin\ directory.

Paul

On Thu, Jul 3, 2008 at 12:12 PM, Alexey Zavizionov
<[EMAIL PROTECTED]> wrote:
> Is there anybody who use maven2 and any servlet container to test web
> services?
> Probably, servlet container runs as maven plugin.
>
> Regards,
> Alexey
>



-- 
Paul Fremantle
Co-Founder and CTO, WSO2
Apache Synapse PMC Chair
OASIS WS-RX TC Co-chair

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

"Oxygenating the Web Service Platform", www.wso2.com

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



Lightweight servlet container to test web services

2008-07-03 Thread Alexey Zavizionov
Is there anybody who use maven2 and any servlet container to test web
services?
Probably, servlet container runs as maven plugin.

Regards,
Alexey


Re: Axis and websphere

2008-07-03 Thread Alexey Zavizionov
Thanks for your reply. I fixed problems.

On Thu, Jun 19, 2008 at 5:38 PM, ab <[EMAIL PROTECTED]> wrote:

> Yes. I've done that and its been working in production for about 6months or
> so. Are you running into some issues?
>
> -ab
>
>
> - Original Message 
> From: Alexey Zavizionov <[EMAIL PROTECTED]>
> To: axis-user@ws.apache.org
> Sent: Thursday, June 19, 2008 10:07:20 AM
> Subject: Axis and websphere
>
> Hello,
>
> Does anybody work with axis on websphere application server?
>
> Regards,
> Alexey
>
>


Re: Axis2 Client config location

2008-07-03 Thread Charitha Kankanamge

Hi Brian,
You can use ConfigurationContext to pick up config files (e.g:- 
axis2.xml) as follows


1.Create configurationContext from file system as follows.
ConfigurationContext cc = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem("\home\user\axis2\repository","\home\user\axis2\conf\\axis2.xml");


2. Pass it to stub constructor (If you are using generated client stub)
ServiceStub stub = new ServiceStub(cc);

If you are using serviceClient;
ServiceClient sc = new ServiceClient(cc);

HTH
Charitha
Brian Dillon wrote:


Hi,

Is there way to indicate where a standalone axis2 client should pick up
it's configuration files (e.g. in axis1 this could be done using
-Daxis.ClientConfigFile).

Thanks,

Brian

__
FINEOS Corporation is the global brand name of FINEOS Corporation Limited and 
its affiliated group companies worldwide.
The information contained in this e-mail is confidential, may be privileged and is intended 
only for the user of the recipient named above. If you are not the intended recipient or a 
representative of the intended recipient, you have received this e-mail in error and must 
not copy, use or disclose the contents of this e-mail to anybody else.  

If you have received this e-mail in error, please notify the sender immediately by return 
e-mail and permanently delete the copy you received.  This e-mail has been swept for 
computer viruses. However, you should carry out your own virus checks. 
Registered in Ireland, No. 205721.  http://www.FINEOS.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]



How to consume .Net ( with WSE3.0 security enabled ) web services using Java Client(Axis 1.3)

2008-07-03 Thread sh_santosh

Dear all,

I have to consume .Net web services( WSE 3.0 enabled) from Java Client. I am
using Axis 1.3 , jakarta-tomcat-5.0.28.
They have enabled WSE 3.0 in .Net web services ( Doc / Literal web services
).

Problem : Security requirements are not satisfied because the security
header is not present in the incoming message .When we invoke .Net web
services from Java client, we are getting above exception.

It's clear that we have to add security header in request xml but the
problem is how to add header. We have added security header manually but it
didn't work.

So, we search on google and found that we can use wss4j-1.5.4.jar to SOLVE
this issue.
we have implemented this but it didn't work too..I think i some where
missing in configuration setting.

How to solve this issue. 
How can we use this wss4j-1.5.4.jar concept to solve this issue. 

Please find the exception -

Exception in thread "main" AxisFault
 faultCode:
{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security
 faultSubcode: 
 faultString: Microsoft.Web.Services3.Security.SecurityFault: Security
requirements are not satisfied because the security header is not present in
the incoming message.
   at
Microsoft.Web.Services3.Design.UsernameOverTransportAssertion.ServiceInputFilter.ValidateMessageSecurity(SoapEnvelope
envelope, Security security)
   at
Microsoft.Web.Services3.Security.ReceiveSecurityFilter.ProcessMessage(SoapEnvelope
envelope)
   at Microsoft.Web.Services3.Pipeline.ProcessInputMessage(SoapEnvelope
envelope)
   at Microsoft.Web.Services3.WseProtocol.FilterRequest(SoapEnvelope
requestEnvelope)
   at Microsoft.Web.Services3.WseProtocol.RouteRequest(SoapServerMessage
message)
   at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
   at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type,
HttpContext context, HttpRequest request, HttpResponse response,
Boolean& abortProcessing)
 faultActor: https://annetest.com/bookingapi.asmx
 faultNode: 
 faultDetail: 

{http://xml.apache.org/axis/}stackTrace:Microsoft.Web.Services3.Security.SecurityFault:
Security requirements are not satisfied because the security header is not
present in the incoming message.
   at
Microsoft.Web.Services3.Design.UsernameOverTransportAssertion.ServiceInputFilter.ValidateMessageSecurity(SoapEnvelope
envelope, Security security)
   at
Microsoft.Web.Services3.Security.ReceiveSecurityFilter.ProcessMessage(SoapEnvelope
envelope)
   at Microsoft.Web.Services3.Pipeline.ProcessInputMessage(SoapEnvelope
envelope)
   at Microsoft.Web.Services3.WseProtocol.FilterRequest(SoapEnvelope
requestEnvelope)
   at Microsoft.Web.Services3.WseProtocol.RouteRequest(SoapServerMessage
message)
   at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
   at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type,
HttpContext context, HttpRequest request, HttpResponse response,
Boolean& abortProcessing)
at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
a

Problem with Axis2 client in JBoss 4 environment

2008-07-03 Thread Domenico Nappo
Hi all,

we have a problem in invoking a web service (exposed in Siebel CRM) in
a JBoss environment.

The client code is generated with Axis2 (with adb mapping). It works
fine in a stand-alone environment.
When we use the client in a web-app deployed on JBoss, a Socket
exception occurs.

We think that it's a library version problem (some libraries in
Jboss/lib come in conflict with some Axis2 libs???).
How can we solve it?
Thanks in advance!

The exception stack trace is the following:

[HTTPSender] Unable to sendViaPost to
url[http://..org/eai_ita/start.swe?SWEExtSource=WebService&SWEExtCmd=Execute&UserName=user&Password=password]
java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at 
org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
at 
org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
at 
org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
at 
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)
at 
org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
at 
org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
at 
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
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:364)
at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:208)
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 
com.org.app.util.RG_spcWS_spcSR_spcInboundStub.Insert(RG_spcWS_spcSR_spcInboundStub.java:152)

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



Axis2 Client config location

2008-07-03 Thread Brian Dillon
Hi,

Is there way to indicate where a standalone axis2 client should pick up
it's configuration files (e.g. in axis1 this could be done using
-Daxis.ClientConfigFile).

Thanks,

Brian

__
FINEOS Corporation is the global brand name of FINEOS Corporation Limited and 
its affiliated group companies worldwide.
The information contained in this e-mail is confidential, may be privileged and 
is intended 
only for the user of the recipient named above. If you are not the intended 
recipient or a 
representative of the intended recipient, you have received this e-mail in 
error and must 
not copy, use or disclose the contents of this e-mail to anybody else.  

If you have received this e-mail in error, please notify the sender immediately 
by return 
e-mail and permanently delete the copy you received.  This e-mail has been 
swept for 
computer viruses. However, you should carry out your own virus checks. 
Registered in Ireland, No. 205721.  http://www.FINEOS.com
__


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