Re: Sandesha2 1.5 Release Candidate

2010-02-17 Thread Amila Suriarachchi
since rampart 1.5 has been released shall we do the sandesha release?

thanks,
Amila.

On Tue, Oct 6, 2009 at 9:07 PM, David Parsons1  wrote:

>
> Hi,
>
> I have created a Sandesha2 1.5 release candidate here:
>
> 
> http://people.apache.org/~parsonsd/sandesha-1.5/RC1/dist/<http://people.apache.org/%7Eparsonsd/sandesha-1.5/RC1/dist/>
>
> and the M2 repository can be found here:
>
> 
> http://people.apache.org/~parsonsd/sandesha-1.5/RC1/m2_repo/<http://people.apache.org/%7Eparsonsd/sandesha-1.5/RC1/m2_repo/>
>
> This release candidate is using the Rampart 1.5 release candidate which can
> be found:
>
>  
> *http://people.apache.org/~nandana/rampart-1.5/RC1/dist/*<http://people.apache.org/%7Enandana/rampart-1.5/RC1/dist/>
>
> and the M2 repository for this can be found here:
> *
>
> **http://people.apache.org/~nandana/rampart-1.5/RC1/m2_repo/*<http://people.apache.org/%7Enandana/rampart-1.5/RC1/m2_repo/>
>
>
> I will leave this available for a short period of time.  If no one finds
> any issues I'll request a vote on whether to submit it as a release of
> Sandesha2.  The Rampart 1.5 release is going to have to be cut before I can
> officially cut the Sandesha2 release so does anyone know how close this is
> to being done?
>
> Regards,
>
> Dave
>
> Dave Parsons
> Web Services Development
> INTERNAL:  David Parsons1/UK/i...@ibmgb :: DE3F20 :: 246930
> EXTERNAL:  parso...@uk.ibm.com :: (01962) 816930
> Mail Point 211, IBM Hursley Park, Winchester. SO21 2JN
>
>
>
>  --
>
> *
> *
>
> *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
> *
>
>
>
>
>
>
>
>
>
>
>  --
>
> *
> *
>
> *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
> *
>
>
>
>
>
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Parameter ordering in SOAP Requests

2010-02-13 Thread Amila Suriarachchi
On Thu, Feb 11, 2010 at 9:02 PM, Larry Gilliam  wrote:

> Hello,
>
>  Is there any way to enable users to pass SOAP and/or REST parameters in
> any order? I can't quite understand why the order (as per the WSDL) is
> necessary since the input is name/value pairs.
>
>  If there is a way to accept input in any order, please advise how. If not,
> a brief explanation why would be great.
>
> Thanks for any info you can provide.
>

The bottom line is you need to send your request message according to the
way it is specified in the wsdl schema. If the schema specified it as a
sequence (which is most of the case) parameters has to send in an order.

Actually there is no concept of parameter order here. Only thing is the
request message must match in the way it is described in wsdl file.

this[1] may help you as well.

thanks,
Amila.

[1] http://wso2.org/library/2873

>
> -Larry
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Basic question on WSDL

2010-02-11 Thread Amila Suriarachchi
this[1] may help you.

please see how to specify headers.

thanks,
Amila.

[1] http://wso2.org/library/2935

On Fri, Feb 12, 2010 at 7:48 AM, Yashwanth Rajaram -X (yrajaram - Zensar at
Cisco)  wrote:

>  Hi All:
>
>
>
> I want to expose a WebService that would take a single parameter. However I
> want the caller to provide certain SOAP header parameters. Is there a way to
> enforce these required header, say, by using an XSD in WSDL or anything
> along those lines?
>
>
>
> thanks,
>
> --
>
> Yashwanth
>
> This email does not reflect the opinion of my employer/cisco.
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: com.ctc.wstx.exc.WstxEOFException

2010-02-10 Thread Amila Suriarachchi
On Thu, Feb 11, 2010 at 2:26 AM, Colin Sharples [DATACOM] <
colin.sharp...@datacom.co.nz> wrote:

>  I have an Axis2 web service that was working fine, but in the last couple
> of days has started misbehaving. Every now and then, the client gets a 
> *com.ctc.wstx.exc.WstxEOFException
> *when calling OperationClient.execute().  The exception detail says: 
> “*Unexpected
> EOF in prolog at [row,col {unknown-source}]: [1,0]*”
>
>
>
> The stack trace showed the fault occurred in *
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse()*,
> just after AxisEngine.receive().
>
>
>
> I put some debugging into my service class, and it is clear that the
> incoming request never gets into the service, which suggests that it is the
> request from the client that is faulty.
>

I think it gets this exception when it try to parse the response. see the
response message. You can use tcpmon[1] for that.

thanks,
Amila.

[1] http://ws.apache.org/commons/tcpmon/download.cgi

>
>
> Does anyone have any idea what might be causing this?
>
>
>
> Colin Sharples
>
>
>
> Solutions Architect | Datacom Systems & Integration
>
> Email: colin.sharp...@datacom.co.nz | Mob: +64-27-457-6628
>
>
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Interoperability of Axis2

2010-02-10 Thread Amila Suriarachchi
On Wed, Feb 10, 2010 at 9:31 PM, Sandeep Khurana <
sandeep_khur...@persistent.co.in> wrote:

>  Hi,
>
> I have created a simple webservice using the POJO class in eclipse. One of
> the web had a custom class as a parameter.
>
> The issue that I faced was when I created the C++ client using gSoap
> client. The Webservice was not able to receive the custom class object and
> it was null
>
>
>
> Is this a known issue or I need to do some more settings?
>

check the wsdl you get with the deployed service with the request and
response messages.

thanks,
Amila.

>
>
> -sandeep
>
> DISCLAIMER == This e-mail may contain privileged and confidential
> information which is the property of Persistent Systems Ltd. It is intended
> only for the use of the individual or entity to which it is addressed. If
> you are not the intended recipient, you are not authorized to read, retain,
> copy, print, distribute or use this message. If you have received this
> communication in error, please notify the sender and delete all copies of
> this message. Persistent Systems Ltd. does not accept any liability for
> virus infected mails.
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Axis2] - Error setting SOAP 1.1

2010-02-09 Thread Amila Suriarachchi
hi,

as I see both of your request in the same name space.
http://schemas.xmlsoap.org/soap/envelope/";>

what is difference is the ws security header namespace. Please send this
question to rampar-dev as well.

thanks,
Amila.


On Tue, Feb 9, 2010 at 7:35 PM, Juan Felipe Alvarez Saldarriaga <
nebi...@gmail.com> wrote:

> Hey.
>
> What about if I force the client to be SOAP 1.1? this will change those
> namepsaces, right?
>


>
> Thanks for any help.
>
>
> On Mon, Feb 8, 2010 at 10:16 PM, Juan Felipe Alvarez Saldarriaga <
> nebi...@gmail.com> wrote:
>
>> Hey Amila.
>>
>> Thanks for asking, yes, same libraries in both servers, I just copy those
>> from one server to the other, pretty odd eh?
>>
>> Thanks.
>>
>>
>> On Mon, Feb 8, 2010 at 10:07 PM, Amila Suriarachchi <
>> amilasuriarach...@gmail.com> wrote:
>>
>>>
>>>
>>> On Tue, Feb 9, 2010 at 2:26 AM, Juan Felipe Alvarez Saldarriaga <
>>> nebi...@gmail.com> wrote:
>>>
>>>> Hey!.
>>>>
>>>> I got some question about Axis2, in one machine when I create a request
>>>> using Axis2 it creates this request:
>>>>
>>>> 
>>>> http://schemas.xmlsoap.org/soap/envelope/";>
>>>> 
>>>> http://schemas.xmlsoap.org/ws/2002/07/secext";
>>>> soapenv:mustUnderstand="1">
>>>> http://schemas.xmlsoap.org/ws/2002/07/utility";
>>>> EncodingType="wsse:Base64Binary" ValueType="wsse:X509v3"
>>>> wsu:Id="CertId-36765048">
>>>> /* Secure message */
>>>> 
>>>> http://www.w3.org/2000/09/xmldsig#";
>>>> Id="Signature-28340672">
>>>> 
>>>> http://www.w3.org/2001/10/xml-exc-c14n#"; />
>>>> http://www.w3.org/2000/09/xmldsig#rsa-sha1"; />
>>>> 
>>>> 
>>>> http://www.w3.org/2001/10/xml-exc-c14n#"; />
>>>> 
>>>> http://www.w3.org/2000/09/xmldsig#sha1"; />
>>>> 
>>>> /* Some digest */
>>>> 
>>>> 
>>>> 
>>>> 
>>>> /* Sign value */
>>>> 
>>>> 
>>>> http://schemas.xmlsoap.org/ws/2002/07/utility";
>>>> wsu:Id="STRId-664369085">
>>>> >>> ValueType="wsse:X509v3" />
>>>> 
>>>> 
>>>> 
>>>> http://schemas.xmlsoap.org/ws/2002/07/utility";
>>>> wsu:Id="Timestamp-1735528613">
>>>> 2010-02-06T02:52:19.946Z
>>>> 
>>>> 
>>>> http://www.uc-council.org/smp/schemas/eanucc";
>>>> soapenv:mustUnderstand="0">
>>>> /* Message header */
>>>> 
>>>> 
>>>> http://schemas.xmlsoap.org/ws/2002/07/utility"; wsu:Id="id-1283730842">
>>>> /* Body */
>>>> 
>>>> 
>>>>
>>>> And on the other machine, the same code change the namespaces from
>>>> http://schemas.xmlsoap.org/* to http://docs.oasis-open.org/* and
>>>> doesn't work with our server:
>>>>
>>>> 
>>>> http://schemas.xmlsoap.org/soap/envelope/";>
>>>> 
>>>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
>>>> soapenv:mustUnderstand="1">
>>>> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
>>>> EncodingType="wsse:Base64Binary" ValueType="wsse:X509v3"
>>>> wsu:Id="CertId-36765048">
>>>> /* Secure message */
>>>> 
>>>> http://www.w3.org/2000/09/xmldsig#";
>>>> Id="Signature-1809025927">
>>>> 
>>>> http://www.w3.org/2001/10/xml-exc-c14n#"; /

Re: Axis - javascript

2010-02-08 Thread Amila Suriarachchi
On Sat, Feb 6, 2010 at 12:41 AM, Demetris  wrote:

>
> Does anyone know any tool that can either generate javascript code from
> wsdl documents or
> any examples of how a remote client can use the wsdl file to build soap
> calls within javascript
> that can access an Axis remote service. In other words my goal here is to
> avoid generating
> and compiling the stubs.
>

please have a look at here[1]. WSO2 Mashup server allows you to develop web
services using javascript.
and generate the code as well.

thanks,
Amila.

[1] http://wso2.org/downloads/mashup

>
> Thanks
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Axis2] - Error setting SOAP 1.1

2010-02-08 Thread Amila Suriarachchi
On Tue, Feb 9, 2010 at 2:26 AM, Juan Felipe Alvarez Saldarriaga <
nebi...@gmail.com> wrote:

> Hey!.
>
> I got some question about Axis2, in one machine when I create a request
> using Axis2 it creates this request:
>
> 
> http://schemas.xmlsoap.org/soap/envelope/
> ">
> 
> http://schemas.xmlsoap.org/ws/2002/07/secext"; soapenv:mustUnderstand="1">
> http://schemas.xmlsoap.org/ws/2002/07/utility";
> EncodingType="wsse:Base64Binary" ValueType="wsse:X509v3"
> wsu:Id="CertId-36765048">
> /* Secure message */
> 
> http://www.w3.org/2000/09/xmldsig#";
> Id="Signature-28340672">
> 
> http://www.w3.org/2001/10/xml-exc-c14n#"; />
> http://www.w3.org/2000/09/xmldsig#rsa-sha1"; />
> 
> 
> http://www.w3.org/2001/10/xml-exc-c14n#"; />
> 
> http://www.w3.org/2000/09/xmldsig#sha1"; />
> 
> /* Some digest */
> 
> 
> 
> 
> /* Sign value */
> 
> 
> http://schemas.xmlsoap.org/ws/2002/07/utility"; wsu:Id="STRId-664369085">
>  ValueType="wsse:X509v3" />
> 
> 
> 
> http://schemas.xmlsoap.org/ws/2002/07/utility";
> wsu:Id="Timestamp-1735528613">
> 2010-02-06T02:52:19.946Z
> 
> 
> http://www.uc-council.org/smp/schemas/eanucc";
> soapenv:mustUnderstand="0">
> /* Message header */
> 
> 
> http://schemas.xmlsoap.org/ws/2002/07/utility";
> wsu:Id="id-1283730842">
> /* Body */
> 
> 
>
> And on the other machine, the same code change the namespaces from
> http://schemas.xmlsoap.org/* to http://docs.oasis-open.org/* and doesn't
> work with our server:
>
> 
> http://schemas.xmlsoap.org/soap/envelope/
> ">
> 
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
> soapenv:mustUnderstand="1">
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
> EncodingType="wsse:Base64Binary" ValueType="wsse:X509v3"
> wsu:Id="CertId-36765048">
> /* Secure message */
> 
> http://www.w3.org/2000/09/xmldsig#";
> Id="Signature-1809025927">
> 
> http://www.w3.org/2001/10/xml-exc-c14n#"; />
> http://www.w3.org/2000/09/xmldsig#rsa-sha1"; />
> 
> 
> http://www.w3.org/2001/10/xml-exc-c14n#"; />
> 
> http://www.w3.org/2000/09/xmldsig#sha1"; />
> 
> /* Some digest */
> 
> 
> 
> 
> /* Sign value */
> 
> 
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
> wsu:Id="STRId-1148428095">
>  ValueType="wsse:X509v3" />
> 
> 
> 
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
> wsu:Id="Timestamp-1179468258">
> 2010-02-08T15:08:55.749Z
> 
> 
> http://www.uc-council.org/smp/schemas/eanucc";
> soapenv:mustUnderstand="0">
> /* Message header */
> 
> 
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
> wsu:Id="id-47973429">
> /* Body */
> 
> 
>
> Why is that? is there a way to set a default SOAP1.1 version for all
> servers? My container is tomcat6 on a Red Hat Enterprise Linux.
>

this seems to be a problem with ws-security namespce. Are you using the same
libraries on both machine?

thanks,
Amila.

>
> Thanks.
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Preventing Axis2/Rampart from encrypting faults

2010-02-07 Thread Amila Suriarachchi
On Mon, Feb 8, 2010 at 7:25 AM, Doughty, Michael wrote:

>  We’ve rewritten several of our services from another Web services stack
> to Axis2 1.5.1.  We are using Rampart 1.4 to handle the WS-Security 1.0
> functionality from our previous services.
>
>
>
> There have been a few differences though and I am unable to resolve some of
> them.  The most important one right now is in the fault messages being sent
> from the service.
>
>
>
> In our previous implementation, Fault messages were never signed and
> encrypted.  However, in this Axis2 version they are always signed and
> encrypted.  I’ve tried a few things I’ve seen from Google searches to see if
> I can prevent this.  One of them was to remove the security phase from the
> OutFaultFlow section of the axis2.xml file in the WEB-INF/conf directory.
> However, this causes the Axis2 bundle to fail to load properly.
>
>
>
> Is there any way to prevent the faults from being signed and encrypted
> while still allowing the standard outbound messages to be signed and
> encrypted?
>

you can unpack the rampart.mar file and edit the module.xml file so that no
handlers goes to outFaultFlow. Then recreate the mar file. This won't create
any problem when loading modules.

thanks,
Amila.




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: xml payload

2010-02-04 Thread Amila Suriarachchi
On Fri, Feb 5, 2010 at 12:29 AM, Joe White  wrote:

>  I’m calling a SOAP service and one of the input methods is a String
> object.
>
> The problem I’m having is that this String object, is actually an xml
> document.
>
> When Axis attempts to send to payload, it’s encoding all of the special
> characters IE  etc..
>
> Is being send over encoded. <?xml version="1.0"
> encoding="UTF-8"?>
>

In fact this is the correct way to do it. if you use Axis2 try to build an
Axiom Object from the string and attached it.

thanks,
Amila.

>
>
> How can I tell the Apache Engine to NOT encode this? The server I’m talking
> to is having issues ciphering the data because of this.
>
>
>
>
>
>
>
> MailGate.vsp.com made the following annotations
> -
> NOTICE: This message is intended only for the individual to whom it is
> addressed and may contain information that is confidential or privileged. If
> you are not the intended recipient, or the employee or person responsible
> for delivering it to the intended recipient, you are hereby notified that
> any dissemination, distribution, copying or use is strictly prohibited. If
> you have received this communication in error, please notify the sender and
> destroy or delete this communication immediately.
> -
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Embedding Axis2 into an existing web-app

2010-02-03 Thread Amila Suriarachchi
hi,

this[1] may help you.

thanks,
Amila.


[1] http://wso2.org/library/90

On Wed, Feb 3, 2010 at 4:55 PM, Chris Mannion
wrote:

> I Wonder if anyone can help, I'm trying to embed Axis2 into an existing
> web-app running on Tomcat 5.5 in order to server web-services from the app.
> I've done everything I can think of to do based on reading around the
> subject on various web-pages but whenever I try to hit any of the services
> I've deployed, the client program I'm using (soapUI 3.0.1) reports a
> connection refused error.  My web-app is setup as follows -
>
> web-app
> -- classes
> -- -- TransactionTypesWs
> -- -- -- TransactionTypes.class
> -- conf
> -- -- axis2.xml
> -- lib
> -- modules
> -- services
> -- -- TransactionTypes
> -- -- -- META-INF
> -- -- -- -- services.xml
>
> The axis2.xml file in conf is that version included in the Axis2 bin
> download, as are all the modules in the modules directory.  The lib
> directory contains all the jar files distributed with Axis2 and Axiom.  The
> services.xml in /service/TransactionType/META-INF reads as follows -
>
> 
> 
>   Lists the transaction type ids of any transactions submitted
> to the system in a specified date rage.
>name="ServiceClass">TransactionTypesWs.TransactionTypes
>   
>  class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
>   
> 
>
> And refers to the class file included in the classes/TransactionTypesWs
> directory.  I'm sure I previously had this service successfully embedded
> using Axis2 but now I come to redeploy it I'm constantly hitting problems
> that I can't seem to get past.  Can anyone help or at least recommend a
> good, in depth tutorial on embedding Axis2?  I'd be very grateful, thanks.
>
> --
> Chris Mannion
> iCasework and LocalAlert implementation team
> 0208 144 4416
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: doc/literal style and wsdl:part combination

2010-02-03 Thread Amila Suriarachchi
On Wed, Feb 3, 2010 at 7:40 PM, rahul yadav  wrote:

> one more query on standards
>
> Can we have multipart messages in wsdl of doc/lit type? As per my
> understanding for multipart messages wsdl should be of rpc/enc type.
>
> If answer for above query is "yes"...then i have seen some wsdls with
> multipart messages following doc/lit style, these wsdls are
> consumed(wsdl2java) well by .net and Axis1.4 but fails with Axis2. how Can
> we justify this ?
>

see R2210 with the same link. There can be only one soap boady child.

thanks,
Amila.

>
> Thanks & Regards,
> Rahul Yadav
>
> Can we have multipart messages in
>
> Following wsdl has multipart messages and is doc/lit type, Axis2 does not 
> support multipart messages in doc/lit wsdl, it has to be a rpc/enc wsdl.
>
>
>
> On Tue, Feb 2, 2010 at 10:39 AM, Amila Suriarachchi <
> amilasuriarach...@gmail.com> wrote:
>
>>
>>
>> On Mon, Feb 1, 2010 at 11:05 PM, rahul yadav wrote:
>>
>>> Hi All,
>>>
>>> Will it be true to say If your WSDL is a document-literal style, then
>>> wsdl:part should point to an element instead of type.
>>>
>> yes.
>> see [1] R2204 and R2203. if it is rpc-literal the part should refer to a
>> type.
>>
>> basic profile does not talk about rpc-enc
>>
>> thanks,
>> Amila.
>>
>>
>> [1] http://www.ws-i.org/Profiles/BasicProfile-1.1.html#Bindings_and_Parts
>>
>>> And if WSDL is a rpc-enc style, then wsdl:part should point to type.
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Amila Suriarachchi
>> WSO2 Inc.
>> blog: http://amilachinthaka.blogspot.com/
>>
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: doc/literal style and wsdl:part combination

2010-02-01 Thread Amila Suriarachchi
On Mon, Feb 1, 2010 at 11:05 PM, rahul yadav  wrote:

> Hi All,
>
> Will it be true to say If your WSDL is a document-literal style, then
> wsdl:part should point to an element instead of type.
>
yes.
see [1] R2204 and R2203. if it is rpc-literal the part should refer to a
type.

basic profile does not talk about rpc-enc

thanks,
Amila.


[1] http://www.ws-i.org/Profiles/BasicProfile-1.1.html#Bindings_and_Parts

> And if WSDL is a rpc-enc style, then wsdl:part should point to type.
>
>
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: help needed building axis2 using NetBeans 6.8 and maven 2.2.1

2010-02-01 Thread Amila Suriarachchi
--
> >
> > Trace
> >
> > org.apache.maven.lifecycle.LifecycleExecutionException: Error executing
> ant
> > tasks
> >
> > at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
> >
> > at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> >
> > at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> >
> > at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
> >
> > at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
> >
> > at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
> >
> > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
> >
> > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
> >
> > at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> >
> > at
> > org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
> >
> > 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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> >
> > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> >
> > at
> > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> >
> > at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> >
> > Caused by: org.apache.maven.plugin.MojoExecutionException: Error
> executing
> > ant tasks
> >
> > at
> >
> org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:114)
> >
> > at
> > org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:83)
> >
> > at
> >
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> >
> > at
> >
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> >
> > ... 17 more
> >
> > Caused by:
> >
> C:\asf\webservices\axis2\tags\java\v1.5.1\modules\jaxws-integration\target\test-classes\servicejars\AppleFinderService
> > not found.
> >
> > at
> >
> org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:349)
> >
> > at org.apache.tools.ant.taskdefs.Zip.grabResources(Zip.java:949)
> >
> > at
> org.apache.tools.ant.taskdefs.Zip.getResourcesToAdd(Zip.java:799)
> >
> > at org.apache.tools.ant.taskdefs.Zip.executeMain(Zip.java:425)
> >
> > at org.apache.tools.ant.taskdefs.Zip.execute(Zip.java:350)
> >
> > 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.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:108)
> >
> > ... 20 more
> >
> > 
> >
> > Total time: 39 seconds
> >
> > Finished at: Mon Feb 01 16:18:51 CET 2010
> >
> > Final Memory: 14M/26M
> >
> > 
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Missing operation name in request body

2010-01-30 Thread Amila Suriarachchi
On Sat, Jan 30, 2010 at 7:07 PM, Milan Tomic  wrote:

>
> Any ideas? My question is why Axis generates SOAP request body without
> operation name from normal WSDL? What could by the reason?
>

I am not familiar with Axis1. But there is no requirement to sent a message
with operation name. The requirement is to send the request as given in the
wsdl. So check the corresponding message part and refered element from that.

thanks,
Amila.

>
> Kind regards,
> Milan
>
>
>
>
> - Original Message 
> From: Milan Tomic 
> To: axis-user@ws.apache.org
> Sent: Fri, January 29, 2010 2:21:01 PM
> Subject: Missing operation name in request body
>
>
> My SOAP body request looks like:
>
> 112233
>
> and it should look like:
>
>  xmlns="">112233
>
> I'm using document/literal style with Axis1 version 1.4. I have other
> project that has very similar WSDL and it uses the same Axis version and it
> works OK. I don't know where the difference is???
>
> Thank you in advance,
> Milan
>
>
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: ADB Code Generation issues

2010-01-28 Thread Amila Suriarachchi
On Wed, Jan 27, 2010 at 12:48 AM, Brandon Low wrote:

> Hi,
>
> I'm using the ant codegen task to build the Google Adwords v2009 API and
> am running into issues relating to the code generator's handling of
> complex extensions.
>
> The initial issue is that the sub-types of an explicitly referenced type
> are not themselves explicitly referenced, they are not built (eg.
> ImageAd extends Ad and is not built).  I know that this has been
> discussed before and I'm able to resolve the top-level issue by enabling
> both -ss and -g ("serverSide" and "generateAllClasses" in the ant task)
> in the code generator.  Unfortunately, when I do this, I run into an
> issue that relates to Google's use of the same name for both their main
> fault soap message and a complex type.  Both are named APIException.  As
> a result of this, when the inner classes are unpacked from the Stubs,
> the Fault (which extends Exception) is generated first and then not
> overwritten by the complex type (which does not).
>
> The simplest solution that I can think of for this would be to find a
> way to enable the functionality of -g/generateAllClasses without the
> -ss/serverSide.  This would resolve the issue because the classes would
> no longer have any reason to be unpacked from the Stub and would
> therefor reside properly in different namespaces.  I do not know how to
> do this, so any help would be very kindly appreciated.
>
> I'm open to other suggestions for handling this issue.  Please feel free
> to ask for any further details that I can provide.
>

if you still have the problem, try to use -p option with a different package
name
so that you can move fault class names to a different package.

But I think this should be fixed with Axis2 1.5 or later.

thanks,
Amila.

>
> Thanks kindly in advance,
>
> --Brandon Low
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Axis2] How to deploy Axis2 in https

2010-01-28 Thread Amila Suriarachchi
On Sat, Dec 16, 2006 at 5:27 PM, Subash Devkota wrote:

> Ruchith,
>
> My https configuration does not require client to authenticate itself.
>
> I have already included security in Axis2 with rampart. It works fine when
> axis server is hosted in http.
> But, when i hosted the same axis in https domain, the client can not
>  connect to axis server.
> It throws nullPointerException.
>
> I used the same key that is used for https as client key in axis client
> (for testing purpose) and it worked properly without errors. But when I use
> self signed certificate in axis client, it does not work.
>
> The only configuration I changed for https was in axis2.xml file of web
> service client.
>
>  class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
>

why this name is empty. isn't it https?

try with Axis2 1.5.1 which is the latest one.

thanks,
Amila.

> locked="false">HTTP/1.1
>chunked
>   
>
> Should I do any more configuration changes?
>
> The next question is, if i intend to use axis in https, should i need to
> configure rampart?
>
> Thanks
> Subash
>
>
> Ruchith Fernando wrote:
>
>> How have you configured HTTPS at the service? (the servlet container
>> axis2 is deployed). Does it require the client to authenticate itself
>> with its certificate?
>>
>> if so you MUST add the client cert into the container's trust store
>> and then configure the client's following JSSE properties properly.
>> javax.net.ssl.keyStore
>> javax.net.ssl.keyStoreType
>> javax.net.ssl.keyStoreType
>>
>> However even if the HTTPS config of the container does not require
>> client auth you MUST have the CA cert of the CA that signed the
>> container's cert in your jre/lib/security/cacerts store or if it uses
>> a self signed cert then you can override trust store config with the
>> JSSE properties. Please see here for more information [1]
>>
>> Thanks,
>> Ruchith
>>
>> [1] http://java.sun.com/products/jsse/install.html
>>
>> On 12/16/06, Subash Devkota  wrote:
>>
>>> Hi all,
>>>
>>> I have problem deploying axis2 1.0 in https.
>>>
>>> I need to deploy my axis2 1.0 server over https application.
>>>
>>> I used following configuration in axis2.xml in client side.
>>>
>>>>> class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
>>> >> locked="false">HTTP/1.1
>>> chunked
>>>
>>>
>>>
>>> The web service works well when i use it in http.  But when axis2 server
>>> is deployed in https, the client can not connect to server (axis2 1.0
>>> where web services is deployed).
>>>
>>> I am using self signed certificate in client side. I added the
>>> certificate of the client in https server's trusted certificate key
>>> store. But could not connect to server.
>>>
>>> It throws nullPointerException while trying to connect web service.
>>>
>>> I tried using CA certified key in the client side. In this case, it
>>> works.
>>>
>>> I need to connect to axis2 1.0 server deployed over https with client
>>> that has self signed certificate.
>>>
>>> Does any one knows how to configure the client for this?
>>>
>>> Thanks in advance.
>>> Subash
>>>
>>>
>>> PRIVACY NOTICE
>>>
>>> This email and any attachments may be confidential and/or privileged. Use
>>> of the information contained in this email by anyone other than the intended
>>> recipient is strictly prohibited. If you have received this email in error,
>>> please notify the sender by replying to this message and delete this email.
>>>
>>> -
>>> To unsubscribe, e-mail: axis-user-unsubscr...@ws.apache.org
>>> For additional commands, e-mail: axis-user-h...@ws.apache.org
>>>
>>>
>>>
>>
>>
> -
> To unsubscribe, e-mail: axis-user-unsubscr...@ws.apache.org
> For additional commands, e-mail: axis-user-h...@ws.apache.org
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Axis2 DII client exception : Unexpected subelement arg0

2010-01-28 Thread Amila Suriarachchi
On Wed, Jan 27, 2010 at 5:52 PM, Tarus  wrote:

>
> Hello All,
>
> I am facing a problem when is using DII client to invoke a webservice.
>
> Any help on this is appreciated.
>
> Thanks in advance.
>

this seems to be a problem with the request message to send to the server.
Try to access the server by generating the code for client side instead of
using RPCServiceClient.

thanks,
Amila.

>
>
> env:
> -
> Axis 2.1.3, Tomcat 5.0, JDK 5.0
>
>
> Trace is below:
> log4j:WARN No appenders could be found for logger
> (org.apache.axis2.description.AxisService).
> log4j:WARN Please initialize the log4j system properly.
> org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
> Unexpected subelement arg0
>at
>
> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486)
>at
>
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
>at
>
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
>at
>
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
>at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
>at
>
> org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:99)
>at
> test.DynamicProxy.lsmsdynamicBlockInvocation(DynamicProxy.java:82)
>at test.DynamicProxy.main(DynamicProxy.java:207)
>
> DII sample code:
> --
>
> RPCServiceClient svrClient = new RPCServiceClient(null,
> new URL("
> http://localhost:2323/TestServer/services/TestGateway?wsdl";),
> new QName("http://sys.com/MyGW
> ","TestGateway"),
> "TestGatewaySoap");
>
>Object params[] = new Object[]{"test"};
> //  Object[] returnArray= svrClient.invokeBlocking(new
> QName("http://sys.com/MyGW";,
> //
>"testMsgRecieve"), params,new Class[]{String.class});
>Object[] returnArray= svrClient.invokeBlocking(new
> QName("http://sys.com/MyGW";,
>  "testMsgRecieve"), params,new
> Class[]{String.class});
>
>
> WSDL:
> --
> 
> http://wsproviders.mnp.Test.com";
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/";
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
> xmlns:tns="http://sys.com/MyGW"; xmlns:s="http://www.w3.org/2001/XMLSchema";
> xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";
> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
> targetNamespace="http://sys.com/MyGW";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
>  
> targetNamespace="http://wsproviders.mnp.Test.com";>
>  
>
>  
>
> nillable="true" type="s:string" />
>  
>
>  
>  
>
>  
> nillable="true" type="s:string" />
>  
>
>  
>
> targetNamespace="http://sys.com/MyGW";>
>  
>
>  
>  
>
>  
>  
>
>  
>  
>
>
>  
>  
>
>  
>  
>
>
>  
>  
>
>  
>  
>
>  
>  
>
>  
>  
>
>  
>  
>
>  
>  
>
>  
>  
>
>  
>  
>http://schemas.xmlsoap.org/soap/http"; />
>
>  
>  
>
>  
>  
>
>  
>
>  
>  
>http://schemas.xmlsoap.org/soap/http"; />
>
>  
>  
>    
>  
>  
>
>  
>
>  
>  
>
>
>  
>  
>
>  
>  
>
>  
>
>  
>  
>
>
>  
>  
>
>  
>  
>
>  
>
>  
>  
>
>  http://localhost/TestGateway/TestGateway.asmx
> "
> />
>
>
>   location="http://localhost/TestGateway/TestGateway.asmx"; />
>
>
>  http://localhost/TestGateway/TestGateway.asmx
> "
> />
>
>
>  http://localhost/TestGateway/TestGateway.asmx
> "
> />
>
>  
> 
> --
> View this message in context:
> http://old.nabble.com/Axis2-DII-client-exception-%3A-Unexpected-subelement-arg0-tp27338174p27338174.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Operation without input parameter

2010-01-21 Thread Amila Suriarachchi
On Thu, Jan 21, 2010 at 2:54 AM, Pascal Kesseli
wrote:

> Well, that's good to hear, but as I stated before, generating Stubs using a
> WSDL including messages without any parts using Eclipse and Axis 2 creates
> invalid code.
>
> In fact, the generated code raises the following runtime exception, as
> stated before:
> org.apache.axis2.AxisFault: No XML element tag
>at
>
> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:435
> )
>at
>
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAx
> isOperation.java:371)
>at
>
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperatio
> n.java:417)
>at
>
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisO
> peration.java:229)
>at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
>at
>
> org.example.www.emc_remote.EmcRemoteStub.getMeteringPoints(EmcRemoteStub.jav
> a:309)
>at org.example.Runner.main(Runner.java:13)
>
> This is probably due to the fact that the generated SOAP message contains
> an
> empty body:
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";> />
>
> Clearly, this is a bug. Either in Axis 2 or in the Eclipse Web Service
> Client generation wizard. So who should I approach to fix this?
>

No this is correct. If there are not input xml it should send an empty soap
boady.

thanks,
Amila.


>
> Thanks and best regards
> Pascal
>
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: axis2 multiple ports, dime support (SWA)

2010-01-18 Thread Amila Suriarachchi
On Mon, Jan 18, 2010 at 7:07 PM, Alex  wrote:

> hi there,
>
>
> Does axis2 V1.5.1 supports multiple ports from one wsdl-file like the old
> axis 1.4?
>
No. One service can have only one porttype. if you have multiple port types
you need to have multiple ports.

>
> During generating code with wsdl2java-tool only one port is produced, but I
> need
> all three ports in my service (the -g or -pn dosent' help).
> Is there another solution to solve this problem.
>
> Does axis2 V1.5.1 support receiving and sending SWA in DIME-Format?
>
I am not sure but certainly it supports SWA.

>
> Why does wsdl2java-tool generates multiple java-classes for one and the
> same xml-complex-type (adb Databinding)?
>

is this an anonymous complex type? for named complex types it generates only
one.

thanks,
Amila.

>
> Thank you, Alex
>
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: deploy time for services using wsdl2

2010-01-18 Thread Amila Suriarachchi
On Mon, Jan 18, 2010 at 4:37 PM, Amila Suriarachchi <
amilasuriarach...@gmail.com> wrote:

> hi,
>
> with the patch applied it gives this error
>
> [ERROR] A problem was encountered while creating the build in XML schema
> types: java.lang.NullPointerException
>
> [WARN] Woden[Warning],0:0,Description-1001,The targetNamespace '
> http://axis2.apache.org' is not dereferencable.
>
> at the WSDL20ToAxisServiceBuilder at this line
>
>  return readInTheWSDLFile(document);
>
> is this because of an old version?
>

I mean an old version of a woden?

Amila.


>
> thanks,
> Amila.
>
>
> On Mon, Jan 18, 2010 at 3:38 PM, Sagara Gunathunga <
> sagara.gunathu...@gmail.com> wrote:
>
>> Hi Amila,
>>
>> As I noticed this issue is related to AXIS2-4436 [1] and AXIS2-4521 [2] ,
>> please test your service with the attached patch [2] . Let me know if you
>> face same issue again ?
>>
>>
>> [1]- https://issues.apache.org/jira/browse/AXIS2-4436
>> [2]- https://issues.apache.org/jira/browse/AXIS2-4521
>>
>> Thanks,
>>
>> On Mon, Jan 18, 2010 at 3:12 PM, Amila Suriarachchi <
>> amilasuriarach...@gmail.com> wrote:
>>
>>> hi,
>>>
>>> I am also getting this exception and it takes a long time to deploy when
>>> deploying the attached service.
>>>
>>> [WARN] Woden[Warning],0:0,Description-1001,The targetNamespace '
>>> http://axis2.apache.org' is not dereferencable.
>>> [INFO] Deploying Web service: StudentService.aar -
>>> file:/home/amila/projects/axis2_trunk/java/modules/test/repository_server/services/StudentService.aar
>>>
>>> thanks,
>>> Amila.
>>>
>>>
>>> On Mon, Jan 18, 2010 at 9:11 AM, Sagara Gunathunga <
>>> sagara.gunathu...@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> On Mon, Jan 18, 2010 at 4:54 AM, Filipe Caló wrote:
>>>>
>>>>> Hi,
>>>>> I'm using axis2 1.5.1 to publish about 100 services using wsdl2 and it
>>>>> takes about 6 minutes to deploy them all. Is this normal?
>>>>>
>>>>> The WSDL2 were generated by JAVA2WSDL and only the whttp:location  and
>>>>> whttp:method for the http binding were changed .
>>>>>
>>>>> It seems that axis tries to resolve the target namespace for the wsdl2
>>>>> and maybe more. Can this be turned off?
>>>>>
>>>>
>>>>
>>>> Can you provide any console log or  some kind of a log related to this
>>>> issue ?  I'm not sure  this is same as AXIS2-4436 [1].
>>>>
>>>> [1]-  https://issues.apache.org/jira/browse/AXIS2-4436
>>>>
>>>>
>>>>
>>>> Thanks
>>>>
>>>>
>>>>
>>>>
>>>>>
>>>>> Is there a way to only deploy a service on demand?
>>>>>
>>>>>
>>>>> Thanks,
>>>>> Filipe
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Sagara Gunathunga
>>>>
>>>> Blog - http://ssagara.blogspot.com
>>>> Web - 
>>>> http://people.apache.org/~sagara/<http://people.apache.org/%7Esagara/>
>>>>
>>>
>>>
>>>
>>> --
>>> Amila Suriarachchi
>>> WSO2 Inc.
>>> blog: http://amilachinthaka.blogspot.com/
>>>
>>
>>
>>
>> --
>> Sagara Gunathunga
>>
>> Blog - http://ssagara.blogspot.com
>> Web - http://people.apache.org/~sagara/<http://people.apache.org/%7Esagara/>
>>
>
>
>
> --
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: deploy time for services using wsdl2

2010-01-18 Thread Amila Suriarachchi
hi,

with the patch applied it gives this error

[ERROR] A problem was encountered while creating the build in XML schema
types: java.lang.NullPointerException
[WARN] Woden[Warning],0:0,Description-1001,The targetNamespace '
http://axis2.apache.org' is not dereferencable.

at the WSDL20ToAxisServiceBuilder at this line

 return readInTheWSDLFile(document);

is this because of an old version?

thanks,
Amila.

On Mon, Jan 18, 2010 at 3:38 PM, Sagara Gunathunga <
sagara.gunathu...@gmail.com> wrote:

> Hi Amila,
>
> As I noticed this issue is related to AXIS2-4436 [1] and AXIS2-4521 [2] ,
> please test your service with the attached patch [2] . Let me know if you
> face same issue again ?
>
>
> [1]- https://issues.apache.org/jira/browse/AXIS2-4436
> [2]- https://issues.apache.org/jira/browse/AXIS2-4521
>
> Thanks,
>
> On Mon, Jan 18, 2010 at 3:12 PM, Amila Suriarachchi <
> amilasuriarach...@gmail.com> wrote:
>
>> hi,
>>
>> I am also getting this exception and it takes a long time to deploy when
>> deploying the attached service.
>>
>> [WARN] Woden[Warning],0:0,Description-1001,The targetNamespace '
>> http://axis2.apache.org' is not dereferencable.
>> [INFO] Deploying Web service: StudentService.aar -
>> file:/home/amila/projects/axis2_trunk/java/modules/test/repository_server/services/StudentService.aar
>>
>> thanks,
>> Amila.
>>
>>
>> On Mon, Jan 18, 2010 at 9:11 AM, Sagara Gunathunga <
>> sagara.gunathu...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> On Mon, Jan 18, 2010 at 4:54 AM, Filipe Caló  wrote:
>>>
>>>> Hi,
>>>> I'm using axis2 1.5.1 to publish about 100 services using wsdl2 and it
>>>> takes about 6 minutes to deploy them all. Is this normal?
>>>>
>>>> The WSDL2 were generated by JAVA2WSDL and only the whttp:location  and
>>>> whttp:method for the http binding were changed .
>>>>
>>>> It seems that axis tries to resolve the target namespace for the wsdl2
>>>> and maybe more. Can this be turned off?
>>>>
>>>
>>>
>>> Can you provide any console log or  some kind of a log related to this
>>> issue ?  I'm not sure  this is same as AXIS2-4436 [1].
>>>
>>> [1]-  https://issues.apache.org/jira/browse/AXIS2-4436
>>>
>>>
>>>
>>> Thanks
>>>
>>>
>>>
>>>
>>>>
>>>> Is there a way to only deploy a service on demand?
>>>>
>>>>
>>>> Thanks,
>>>> Filipe
>>>>
>>>
>>>
>>>
>>> --
>>> Sagara Gunathunga
>>>
>>> Blog - http://ssagara.blogspot.com
>>> Web - http://people.apache.org/~sagara/<http://people.apache.org/%7Esagara/>
>>>
>>
>>
>>
>> --
>> Amila Suriarachchi
>> WSO2 Inc.
>> blog: http://amilachinthaka.blogspot.com/
>>
>
>
>
> --
> Sagara Gunathunga
>
> Blog - http://ssagara.blogspot.com
> Web - http://people.apache.org/~sagara/<http://people.apache.org/%7Esagara/>
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: axis2 architecture client side runtime requireed jar files

2010-01-17 Thread Amila Suriarachchi
hi,

this[1] may help you. Since you use xml beans you have to use
xmlbeans-2.3.0.jar as well.

thanks,
Amila.

[1]
http://amilachinthaka.blogspot.com/2009/11/minimal-jars-required-for-axis2-15.html

On Mon, Jan 18, 2010 at 8:50 AM,  wrote:

>
> Hi,
>
> Can anyone reply to my question ?.
>
> We are using axis2 architecture for  webservice client call.
> Client generated using xmlbinding option.
>
> In axis2-1.3\libfolder there are 60 jar files .  Out of these 60 jar
> files which are all jar necessary for  client application to do release
> (which are all runtime required jar files).
>
> do we required to release all the  above mentioned jar files?.
> Thanks in advance for your early reply.
>
> It will be helpful if you reply early.
>
>
> Note: In axis1 architecture  we had used only   the follow jars.
>   *
> axis.jar,jaxrpc.jar,saaj.jar,wsdl4j-1.5.1.jar,commons-logging-1.0.4.jar,commons-discovery-0.2.jar
> *
>
>
> Thanks & Regards,
> Arockia
>
> This email message and any attachments may contain confidential,
> proprietary or non-public information.  The information is intended solely
> for the designated recipient(s).  If an addressing or transmission error has
> misdirected this email, please notify the sender immediately and destroy
> this email.  Any review, dissemination, use or reliance upon this
> information by unintended recipients is prohibited.  Any opinions expressed
> in this email are those of the author personally.




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Operation without input parameter

2010-01-17 Thread Amila Suriarachchi
I am not clear about your question. but you can have an operation without
input parameters
if your wsdl message does not have any message parts.

thanks,
Amila.

On Mon, Jan 18, 2010 at 4:36 AM, Pascal Kesseli
wrote:

>  No ideas, anyone?
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Axis2: Replacing Services in the access URL

2010-01-15 Thread Amila Suriarachchi
hi,

this[1] may help you.

Amila.

[1]
http://amilachinthaka.blogspot.com/2010/01/changing-axis2-application-path.html

On Thu, Jan 14, 2010 at 4:32 AM, Rahul Rulz  wrote:

> Hi Everyone,
>
> I have a query reg the URL to access the service..
>
> Is there anyways to replace the 'services' as in
> http://localhost:8080/axis2/services/Myservice to "
> http://localhost:8080/axis2/serviceGrp1/Myservice"; ?
>
> If am just renaming the services inside the deployment file to serviceGrp1
> it is not able to locate the Myservice inside that..Is there a way to
> achieve this..?
>
> Thanks,
> Raghav.
>
>
>
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Third web service invoctaion always throws Timeout Exception

2010-01-15 Thread Amila Suriarachchi
On Fri, Jan 15, 2010 at 10:48 PM, tislam  wrote:

>
> Hello Again,
> I must say that I was disheartened to not get any response from anyone.
> While I continued my painful "debugging" journey, I found the solution that
> worked for me. It is basically Amila's suggested solution with a caveat for
> my situation. For some unknown reason, the following options did not work:
>
>options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, true);
> options.setProperty(HTTPConstants.CACHED_HTTP_CLIENT,
> this.httpClient);
>
> I had to set these options to the configuration context instead:
>
>ConfigurationContext context =
> this.client.getServiceContext().getConfigurationContext();
>context.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, true);
>context.setProperty(HTTPConstants.CACHED_HTTP_CLIENT,
> this.httpClient);
>context.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION, true);
>
>It baffles me as to why the former did not work for me as it worked for
> most people (as I found on google). I wish someone can explain to me some
> logical reason for this. I wasted a couple of days pondering why it didn't
> work. But at the end, it all worked out for.
>

My suggestion basically tested with Axis2 1.5 and there were some changes to
http transport (Done by Glen)
in Axis2 1.5.1.

Axis2 1.5.1 keeps an one cached http client object in the configuration
context. Since default Multithreaded connection manager allows only two
connections there is a problem if some one try to use more than two
connections with out releasing used ones.

that is why Deepal has asked to cleanUp the transport.

But anyway you can not use three simultaneous connections with Axis2 1.5.1.
The only way to do that is to set a Httpclient as follows,

ConfigurationContext configurationContext =

ConfigurationContextFactory.createConfigurationContextFromFileSystem(

AXIS2_REPOSITORY_LOCATION,
AXIS2_CLIENT_CONFIG_FILE);

MultiThreadedHttpConnectionManager
multiThreadedHttpConnectionManager = new
MultiThreadedHttpConnectionManager();

HttpConnectionManagerParams params = new
HttpConnectionManagerParams();
params.setDefaultMaxConnectionsPerHost(20);
multiThreadedHttpConnectionManager.setParams(params);
HttpClient httpClient = new
HttpClient(multiThreadedHttpConnectionManager);
configurationContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT,
httpClient);

this increase 2 to 20. can you need to call
serviceClient.cleanupTransport();

otherwise same problem comes after 20 invocations.

if you set the
context.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION, true);

I think you don't need to set any other parameter. But this builds the OM
tree once the response is received.

thanks,
Amila.



> Thanks,
> Tariq.
> --
> View this message in context:
> http://old.nabble.com/Third-web-service-invoctaion-always-throws-Timeout-Exception-tp27029690p27180475.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [axis2] axis2c memory management process unclear

2010-01-15 Thread Amila Suriarachchi
hi,

please ask this from Axis2/c[1] list

thanks,
Amila.

[1]http://ws.apache.org/axis2/c/lists_issues.html

On Sat, Jan 16, 2010 at 12:20 AM, Brody Lodmell wrote:

> we're using axis2 to consume soap services.
>
> this function
> axiom_node_to_string
>   AXIS2_EXTERN axis2_char_t *AXIS2_CALL
>   axiom_node_to_string(
>   axiom_node_t * om_node,
>   const axutil_env_t * env);
> declared in \axiom\include\axiom_node.h and defined in
> \axiom\src\om\om_node.h
>
> returns a different address each time I call it, indicating it might
> be dynamically allocated memory.  but when I try to free it, I get
> errors.
> I can't find any documentation on how this memory might be freed.
>
> is it the job of axiom_node_free_tree()?
>
> any insight anyone can provide would be helpful.
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: two similar xsd in the same wsdl databinded with xmlbean in axis2

2010-01-14 Thread Amila Suriarachchi
On Thu, Jan 14, 2010 at 7:35 PM, Bartolomeo Nicolotti
wrote:

>  Hello,
>
> we're using xmlbean to parse xmls as an axis2 databinding for travel
> industries web services
>
> A web service we query has different version of the same kind of xml
>
> AirAvailability_8
> AirAvailability_9
>
>
> Is it possible to use xmlbean data binding with only one wsdl that has both
> the kind of xml, i.e. something like:
>
> ...
>   
>   
>
> 
> 
> 
> 
> 
> 
> 
>  name="LocalDateTimeCT_6_0"  type="s0:LocalDateTimeCT_6_0Type"/>
>  name="AirAvailability_8"  type="s0:AirAvailability_8Type"/>
>  name="AirAvailability_9"  type="s0:AirAvailability_9Type"/>
> 
> 
> 
> 
> 
> 
> 
>
> My doubt is that this two kinds of xml have, oviously many similiar tags,
> won't these conflict?
>

yes. if they have the same target namespace.

thanks,
Amila.

>
> Many many thanks
>
> Best regards.
>
> Bartolomeo Nicolotti.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Axis2 1.5.1 service handling is very slow

2010-01-14 Thread Amila Suriarachchi
On Thu, Jan 14, 2010 at 9:19 PM, Martin Gerner <
martin.ger...@postgrad.manchester.ac.uk> wrote:

> As far as I can tell from the source, it looks like the temporary directory
> is specified by a parameter Constants.Configuration.ARTIFACTS_TEMP_DIR,
> which according to a comment in
> http://issues.apache.org/jira/browse/AXIS2-3552 is set to
> javax.servlet.context.tempdir.
>

But currently I think this value is not being used.

please check whether there is any temp folder created under temp folder.

thanks,
Amila.


>
> I haven't had much success with changing it myself though, or finding out
> what the real value of the parameter is.
>
>
> [WARN] Exception extracting jars into temporary directory :
> java.io.IOException: No such file or directory : switching to alternate
> class loading mechanism
> [DEBUG] java.io.IOException: No such file or directory
> java.lang.RuntimeException: java.io.IOException: No such file or directory
>   at
> org.apache.axis2.deployment.util.Utils.getURLsForAllJars(Utils.java:194)
>   at
> org.apache.axis2.deployment.util.Utils.createClassLoader(Utils.java:899)
>   at
> org.apache.axis2.deployment.repository.util.DeploymentFileData.setClassLoader(DeploymentFileData.java:115)
>   at
> org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:64)
>   at
> org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
>   at
> org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:659)
>   at
> org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
>   at
> org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:337)
>   at
> org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:241)
>   at
> org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:131)
>   at
> org.apache.axis2.deployment.FileSystemConfigurator.loadServices(FileSystemConfigurator.java:147)
>   at
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:95)
>   at
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:206)
>   at
> org.apache.axis2.transport.SimpleAxis2Server.(SimpleAxis2Server.java:47)
>   at
> org.apache.axis2.transport.SimpleAxis2Server.main(SimpleAxis2Server.java:98)
> Caused by: java.io.IOException: No such file or directory
>   at java.io.UnixFileSystem.createFileExclusively(Native Method)
>   at java.io.File.checkAndCreate(File.java:1704)
>   at java.io.File.createTempFile(File.java:1792)
>   at
> org.apache.axis2.deployment.util.TempFileManager.createTempFile(TempFileManager.java:101)
>   at
> org.apache.axis2.deployment.util.Utils.createTempFile(Utils.java:224)
>   at
> org.apache.axis2.deployment.util.Utils.getURLsForAllJars(Utils.java:188)
>   ... 14 more
>
>
> On 14/01/2010 14:36, Amila Suriarachchi wrote:
>
>>
>>
>> On Thu, Jan 14, 2010 at 4:38 PM, Martin Gerner <
>> martin.ger...@postgrad.manchester.ac.uk > martin.ger...@postgrad.manchester.ac.uk>> wrote:
>>
>>Hi Andreas (and the rest of you),
>>
>>Thank you very much for your answer.
>>
>>Seeing as the problem seems to be in accessing the .jar file, I
>>extracted the .jar file to the services directory and then removed
>>the .jar file, so axis2 could access the service in an already
>>extracted format. The access times are now down to what I would
>>expect them to be, and everything seems to be running fine.
>>
>>I'm now guessing that the extremely slow accessing of the service
>>.jar file is related to the following warning I get during axis2
>>startup: "[WARN] Exception extracting jars into temporary
>>directory : java.io.IOException: No such file or directory :
>>switching to alternate class loading mechanism". It would be nice
>>to be able to solve this root cause of the problem (both so I can
>>go back to using .jars but also for future readers of this
>>conversation), but I have been unable to find where this
>>"temporary directory" is set (so I could change the directory to
>>something that would work). As far as I can tell, conf/axis2.xml
>>does not contain any option for this.
>>
>>It is a bit irritating that the warning does not specify what path
>>the temporary directory is - that would really be a helpful
>>addition to the warning message. Axi

Re: Axis2 1.5.1 service handling is very slow

2010-01-14 Thread Amila Suriarachchi
;> org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImpl.java:124)
>>>   at
>>>
>>> org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:297)
>>>   at
>>>
>>> org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:213)
>>>   at
>>>
>>> org.apache.axiom.soap.impl.llom.SOAPBodyImpl.addChild(SOAPBodyImpl.java:231)
>>>   at
>>>
>>> org.apache.axis2.rpc.receivers.RPCUtil.processResponseAsDocLitWrapped(RPCUtil.java:381)
>>>   at
>>>
>>> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:138)
>>>   at
>>>
>>> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
>>>   at
>>>
>>> org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114)
>>>   at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
>>>   at
>>>
>>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:167)
>>>   at
>>> org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:266)
>>>   at
>>>
>>> org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281)
>>>   at
>>>
>>> org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
>>>   at
>>>
>>> org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
>>>   at
>>>
>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>>   at
>>>
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>>   at java.lang.Thread.run(Thread.java:619)
>>>
>>> "DestroyJavaVM" prio=10 tid=0x2ee3c000 nid=0x1c66 waiting on condition
>>> [0x]
>>>  java.lang.Thread.State: RUNNABLE
>>>
>>> "HttpListener-8080-1" prio=10 tid=0x2f013400 nid=0x1c75 runnable
>>> [0x2ebad000]
>>>  java.lang.Thread.State: RUNNABLE
>>>   at java.net.PlainSocketImpl.socketAccept(Native Method)
>>>   at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390)
>>>   - locked <0x34998010> (a java.net.SocksSocketImpl)
>>>   at java.net.ServerSocket.implAccept(ServerSocket.java:453)
>>>   at java.net.ServerSocket.accept(ServerSocket.java:421)
>>>   at
>>>
>>> org.apache.axis2.transport.http.server.DefaultConnectionListener.run(DefaultConnectionListener.java:79)
>>>   at
>>>
>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>>   at
>>>
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>>   at java.lang.Thread.run(Thread.java:619)
>>>
>>> "Timer-1" daemon prio=10 tid=0x0896ac00 nid=0x1c74 in Object.wait()
>>> [0x2ebfe000]
>>>  java.lang.Thread.State: TIMED_WAITING (on object monitor)
>>>   at java.lang.Object.wait(Native Method)
>>>   - waiting on <0x3445d260> (a java.util.TaskQueue)
>>>   at java.util.TimerThread.mainLoop(Timer.java:509)
>>>   - locked <0x3445d260> (a java.util.TaskQueue)
>>>   at java.util.TimerThread.run(Timer.java:462)
>>>
>>> "Timer-0" daemon prio=10 tid=0x08c17c00 nid=0x1c73 in Object.wait()
>>> [0x2eda7000]
>>>  java.lang.Thread.State: TIMED_WAITING (on object monitor)
>>>   at java.lang.Object.wait(Native Method)
>>>   - waiting on <0x342b3a08> (a java.util.TaskQueue)
>>>   at java.util.TimerThread.mainLoop(Timer.java:509)
>>>   - locked <0x342b3a08> (a java.util.TaskQueue)
>>>   at java.util.TimerThread.run(Timer.java:462)
>>>
>>> "Low Memory Detector" daemon prio=10 tid=0x2f78d800 nid=0x1c6f runnable
>>> [0x]
>>>  java.lang.Thread.State: RUNNABLE
>>>
>>> "CompilerThread1" daemon prio=10 tid=0x2f78b400 nid=0x1c6e waiting on
>>> condition [0x]
>>>  java.lang.Thread.State: RUNNABLE
>>>
>>> "CompilerThread0" daemon prio=10 tid=0x2f789800 nid=0x1c6d waiting on
>>> condition [0x]
>>>  java.lang.Thread.State: RUNNABLE
>>>
>>> "Signal Dispatcher" daemon prio=10 tid=0x2f788000 nid=0x1c6c waiting on
>>> condition [0x]
>>>  java.lang.Thread.State: RUNNABLE
>>>
>>> "Finalizer" daemon prio=10 tid=0x2f778800 nid=0x1c6b in Object.wait()
>>> [0x2f517000]
>>>  java.lang.Thread.State: WAITING (on object monitor)
>>>   at java.lang.Object.wait(Native Method)
>>>   - waiting on <0x341b10f0> (a java.lang.ref.ReferenceQueue$Lock)
>>>   at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
>>>   - locked <0x341b10f0> (a java.lang.ref.ReferenceQueue$Lock)
>>>   at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
>>>   at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
>>>
>>> "Reference Handler" daemon prio=10 tid=0x2f777000 nid=0x1c6a in
>>> Object.wait() [0x2f568000]
>>>  java.lang.Thread.State: WAITING (on object monitor)
>>>   at java.lang.Object.wait(Native Method)
>>>   - waiting on <0x341b1110> (a java.lang.ref.Reference$Lock)
>>>   at java.lang.Object.wait(Object.java:485)
>>>   at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
>>>   - locked <0x341b1110> (a java.lang.ref.Reference$Lock)
>>>
>>> "VM Thread" prio=10 tid=0x2f773000 nid=0x1c69 runnable
>>>
>>> "GC task thread#0 (ParallelGC)" prio=10 tid=0x08891800 nid=0x1c67
>>> runnable
>>>
>>> "GC task thread#1 (ParallelGC)" prio=10 tid=0x08893000 nid=0x1c68
>>> runnable
>>>
>>> "VM Periodic Task Thread" prio=10 tid=0x2f78f800 nid=0x1c70 waiting on
>>> condition
>>>
>>> JNI global references: 1196
>>>
>>> Heap
>>>  PSYoungGen  total 105984K, used 11722K [0xa5e1, 0xacb9,
>>> 0xb419)
>>>  eden space 103232K, 8% used [0xa5e1,0xa66d9fc8,0xac2e)
>>>  from space 2752K, 98% used [0xac8e,0xacb889e8,0xacb9)
>>>  to   space 4096K, 0% used [0xac39,0xac39,0xac79)
>>>  PSOldGentotal 23552K, used 18525K [0x3419, 0x3589,
>>> 0xa5e1)
>>>  object space 23552K, 78% used [0x3419,0x353a7510,0x3589)
>>>  PSPermGen   total 16384K, used 8087K [0x3019, 0x3119,
>>> 0x3419)
>>>  object space 16384K, 49% used [0x3019,0x30975f70,0x3119)
>>>
>>>
>>>
>>
>
> --
> Martin Gerner
> Faculty of Life Sciences
> Michael Smith Building
> University of Manchester
> Manchester, M13 9PT
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Axis2 1.5.1 service handling is very slow

2010-01-13 Thread Amila Suriarachchi
On Wed, Jan 13, 2010 at 5:21 PM, Martin Gerner <
martin.ger...@postgrad.manchester.ac.uk> wrote:

> Hi all,
>
> I'm running a simple web service which receives a string from the
> client, processes it and returns an array of custom objects (nothing
> complicated, they're just data holders containing a few ints, strings
> and booleans). While the actual serverside processing performed by my
> server code is performed very fast, the response times from the server
> are very large and seem to be linear in the number of returned objects.
>
> A short example: if I send a string to the server which results in 0
> objects being returned, the response from the server is received just a
> few milliseconds after the request is made. If the string is modified
> such that it returns one object, that increases to 8 seconds, and if it
> returns two objects it increases to 16 seconds. In all cases, I can see
> that the actual processing takes less than a second, so the web service
> java code that I've deployed is handling the requests quickly.
>
> All responses are small in size - the largest is ~900 bytes (so I can't
> imagine that it's an XML transformation issue). Using packet sniffers, I
> can see that the delay definitely is occurring on the server side (for
> the last example, I could see the POST packet going to the server, and
> then the response packet coming back 16 seconds later). Going by client
> and server log timings, I can see that the delay occurs after processing
> rather than before.
>
> I'm running axis2 1.5.1 with default settings, have tested it running on
> both the bundled SimpleAxisServer and Tomcat (both on a Debian server)
> and am using a very simple client based on code auto-generated by axis
> from the WSDL (running in Windows).
>
> Does anybody here have any clue as to what's causing the delays? It
> seems clear enough that it's something in the internal axis2 system, but
> as I'm quite new to axis2 I'm having difficulties locating the issue.
>

As a alternative you can use the contract first approach.
you can get the wsdl which is generated from the POJO and generate the
server side code for that.
then use the generated Skelton class to call your pojo.

thanks,
Amila.

>
> Best wishes,
> Martin Gerner
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Axis Clustering in OC4J Cluster

2010-01-12 Thread Amila Suriarachchi
On Mon, Jan 11, 2010 at 11:02 AM, Shailesh Potnis wrote:

> Hi Amila:
>
> Thank you for additional info.  I see that Synapse is an ESB.  We already
> use Oracle ESB at this site.  Can use of Synapse (an ESB) be justified in
> view of this to support discovering new services.  Also would we have to use
> Synapse as an ESB for obtaining this feature
>


> yes. Synapse Dynamic loadbalancer discover the new endpoints and send the
> message to new end points.
>

Amila.

>
>
> Thank You and Best Regards
>
> Sincerely
>
>
> Shailesh
>
>
> --
> *From:* Amila Suriarachchi 
>
> *To:* axis-user@ws.apache.org
> *Sent:* Sat, January 9, 2010 11:18:28 AM
>
> *Subject:* Re: Axis Clustering in OC4J Cluster
>
>
>
> On Fri, Jan 8, 2010 at 10:53 PM, Shailesh Potnis wrote:
>
>> Hi Azeez:
>>
>> Thank you for valuable input and links.  I think I went through the first
>> link during my research and the axis2.xml clustering guide includes info
>> from the second link.  I am still not clear about the end user use cases for
>> stateless services.
>>
>> What I am trying to determine is:  Under what specific scenarios Axis2
>> cluster deployed within OC4J cluster would provide additional value,  In
>> other words what would be use cases for using Axis2 cluster within OC4J
>> cluster that is fronted by OHS (Apache Web server) and a hardware load
>> balancer?  I am trying to find this only for stateless services.
>>
>
> if you use synapse <http://synapse.apache.org/> dynamic load balancer,
> then Axis2 clustering can be use to  the members. i.e it can be used to
> detect newly added members.
>
> thanks,
> Amila.
>
>>
>> During my discussion with some of my coworkers some possible use cases
>> were discussed though I do not know if they would be provided by Axis2
>> Cluster.  I would like to list them below:
>>
>> 1) In case a service is down in one Axis2 container, would Axis2 container
>> redirect the request to another container -- I think the you provided
>> (clustering at the servlet container level (HTTP session & request
>> replication) is out of the scope of Axis2) indicates that this is not
>> possible or out of scope. Correct me if this assumption is incorrect.
>> 2) The second scenario is to be able to redeploy a single service
>> (deployed with other services in a single J2EE war) using a central remote
>> repository -- this may not be related to cluster itself but would Axis
>> clustering assist accomplishing this when OC4J standard deployment requires
>> entire Axis2 war (potentially containing multiple services) to be
>> redeployed.  Would like to know whether this can be done using a central
>> repository and Axis2 Admin console (with or without Axis2 cluster).
>> 3) What are specific advantages of replicating ConfigurationContext,
>> ServiceGroupContext & ServiceContext (For someone who has limited
>> understanding of those objects) in Axis2 cluster for stateless services?
>>
>>
>> Thank You and Best Regards
>>
>> Sincerely
>>
>>
>> Shailesh
>>
>>
>> --
>> *From:* Afkham Azeez 
>> *To:* axis-user@ws.apache.org
>> *Sent:* Fri, January 8, 2010 12:30:00 AM
>> *Subject:* Re: Axis Clustering in OC4J Cluster
>>
>> We have not tested Axis2 clustering on OC4J AFAIK.
>> With respect to state replication, at the Axis2 level, we are only
>> concerned about replicating the values stored in the Axis2
>> ConfigurationContext, ServiceGroupContext & ServiceContext. We use
>> default Java serialization, hence the entire object tree should be
>> serializable for the replication to be successful. Please note that
>> clustering at the servlet container level (HTTP session & request
>> replication) is out of the scope of Axis2 and has to be handled by the
>> respective servlet containers.
>>
>> For more details; refer to my articles;
>> 1. Introduction to WSO2 Carbon Clustering
>> http://wso2.org/library/articles/introduction-wso2-carbon-clustering
>> 2. WSO2 Carbon Cluster Configuration Language
>>
>> http://wso2.org/library/articles/wso2-carbon-cluster-configuration-language
>>
>>
>> Azeez
>>
>> On Fri, Jan 8, 2010 at 1:29 AM, Shailesh Potnis 
>> wrote:
>> >
>> > Hi:
>> >
>> > I am going through a good deal of Axis2 documents and links.  I am
>> trying to determine if anyone has deployed Axis2 Cluster within OC4J cluster
>> and what is the experience.  I am planning to use it

Re: Axis Clustering in OC4J Cluster

2010-01-09 Thread Amila Suriarachchi
On Fri, Jan 8, 2010 at 10:53 PM, Shailesh Potnis wrote:

> Hi Azeez:
>
> Thank you for valuable input and links.  I think I went through the first
> link during my research and the axis2.xml clustering guide includes info
> from the second link.  I am still not clear about the end user use cases for
> stateless services.
>
> What I am trying to determine is:  Under what specific scenarios Axis2
> cluster deployed within OC4J cluster would provide additional value,  In
> other words what would be use cases for using Axis2 cluster within OC4J
> cluster that is fronted by OHS (Apache Web server) and a hardware load
> balancer?  I am trying to find this only for stateless services.
>

if you use synapse <http://synapse.apache.org/> dynamic load balancer, then
Axis2 clustering can be use to  the members. i.e it can be used to detect
newly added members.

thanks,
Amila.

>
> During my discussion with some of my coworkers some possible use cases were
> discussed though I do not know if they would be provided by Axis2 Cluster.
> I would like to list them below:
>
> 1) In case a service is down in one Axis2 container, would Axis2 container
> redirect the request to another container -- I think the you provided
> (clustering at the servlet container level (HTTP session & request
> replication) is out of the scope of Axis2) indicates that this is not
> possible or out of scope. Correct me if this assumption is incorrect.
> 2) The second scenario is to be able to redeploy a single service (deployed
> with other services in a single J2EE war) using a central remote  repository
> -- this may not be related to cluster itself but would Axis clustering
> assist accomplishing this when OC4J standard deployment requires entire
> Axis2 war (potentially containing multiple services) to be redeployed.
> Would like to know whether this can be done using a central repository and
> Axis2 Admin console (with or without Axis2 cluster).
> 3) What are specific advantages of replicating ConfigurationContext,
> ServiceGroupContext & ServiceContext (For someone who has limited
> understanding of those objects) in Axis2 cluster for stateless services?
>
>
> Thank You and Best Regards
>
> Sincerely
>
>
> Shailesh
>
>
> --
> *From:* Afkham Azeez 
> *To:* axis-user@ws.apache.org
> *Sent:* Fri, January 8, 2010 12:30:00 AM
> *Subject:* Re: Axis Clustering in OC4J Cluster
>
> We have not tested Axis2 clustering on OC4J AFAIK.
> With respect to state replication, at the Axis2 level, we are only
> concerned about replicating the values stored in the Axis2
> ConfigurationContext, ServiceGroupContext & ServiceContext. We use
> default Java serialization, hence the entire object tree should be
> serializable for the replication to be successful. Please note that
> clustering at the servlet container level (HTTP session & request
> replication) is out of the scope of Axis2 and has to be handled by the
> respective servlet containers.
>
> For more details; refer to my articles;
> 1. Introduction to WSO2 Carbon Clustering
> http://wso2.org/library/articles/introduction-wso2-carbon-clustering
> 2. WSO2 Carbon Cluster Configuration Language
> http://wso2.org/library/articles/wso2-carbon-cluster-configuration-language
>
>
> Azeez
>
> On Fri, Jan 8, 2010 at 1:29 AM, Shailesh Potnis 
> wrote:
> >
> > Hi:
> >
> > I am going through a good deal of Axis2 documents and links.  I am trying
> to determine if anyone has deployed Axis2 Cluster within OC4J cluster and
> what is the experience.  I am planning to use it exclusively for stateless
> web services.  Here are some specific questions:
> >
> > 1) What would be specific benefits of deploying the stateless web
> services in Axis2 cluster when scalability would be provided by OC4J
> cluster?
> > 2) Are the Axis2 clustering benefits limited to deploying in Tomcat or
> are useful in other app servers?
> > 3) In case a service is hung due to application or infrastructure issues,
> would Axis2 cluster direct a request to another Axis2 instance in a cluster?
> >
> > I posted the above some time ago in the Axis2 developers group and I
> think that this group may be a more appropriate group for this.
> >
> > Also when I deployed a stateless service (with a single stateless
> operation: version), I get the following error:
> >
> > Could not send command message ContextClusteringCommandCollection to
> group since it is not serializable
> >
> > I will be glad to send complete stack trace if necessary.
> >
> > All helpful suggestions are highly appreciated..
> >
> > Thank You and Best Regards
> >
> >
> > Sincerely
> >
> >
> > Shailesh
> >
> >
>
>
>
> --
> Thanks
> Afkham Azeez
>
> Blog: http://afkham.org
> Developer Portal: http://www.wso2.org
> WSAS Blog: http://wso2wsas.blogspot.com
> Company: http://wso2.com
> GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Operation without input parameter

2010-01-06 Thread Amila Suriarachchi
ception thrown when I try to execute
> the above code assures me on this suspicion:
>
> Hello Tom!
> org.apache.axis2.AxisFault: No XML element tag
>at
>
> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:435
> )
>at
>
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAx
> isOperation.java:371)
>

I can't see any problem with what you do. use tcpmon[1] to check the request
and response.

thanks,
Amila.

[1] http://ws.apache.org/commons/tcpmon/


>at
>
> org.apache.axis2.desycription.OutInAxisOperationClient.send(OutInAxisOperatio
> n.java:417)
>at
>
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisO
> peration.java:229)
>at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
>at
>
> org.example.www.emc_remote.EmcRemoteStub.getMeteringPoints(EmcRemoteStub.jav
> a:309)
>at org.example.Runner.main(Runner.java:13)
>
> My question to you would thus be: How to correctly implement a web service
> without any input parameters? And, of course, how to describe such a
> service
> in WSDL?
>
> Thanks for any help on this issue and best regards
> Pascal Kesseli
>
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Please correct me if wrong

2010-01-06 Thread Amila Suriarachchi
get it from here[1].

thanks,
Amila.

[1] http://ws.apache.org/commons/transport/download.cgi

On Wed, Jan 6, 2010 at 5:58 PM, Karthik Nanjangude <
karthik.nanjang...@xius-bcgi.com> wrote:

>  Hi
>
>
>
> I have configured the HTTP / TCP in  AXIS215  engine on TOMCAT  ( axis2.xml
> )
>
>
>
>  "org.apache.axis2.transport.tcp.TCPServer"*>
>
> 6060
>
> 
>
>
>
>
>
> I am able to see the exceptions for the same as below
>
>
>
> *java.lang.ClassNotFoundException*:
> org.apache.axis2.transport.tcp.TCPServer
>
>
>
> I presume this class is not available in jar files of AXIS2
>
>
>
> How to proceed
>
>
>
>
>
> With regards
>
> Karthik
>
>
>  --
>
> *From:* Amila Suriarachchi [mailto:amilasuriarach...@gmail.com]
> *Sent:* Wednesday, January 06, 2010 12:55 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Please correct me if wrong
>
>
>
>
>
> On Wed, Jan 6, 2010 at 10:51 AM, Karthik Nanjangude <
> karthik.nanjang...@xius-bcgi.com> wrote:
>
> Hi
>
>
>
> I am exploring the possibilities …
>
> Please  correct me if  wrong
>
>
>
> Spec
>
> SOAP : AXIS2
>
> JDK 1.5
>
> WebContainer : Tomcat 6.20.0
>
> O/s  Windows / Linux / Unix
>
>
>
>
>
> I need to run AXIS2 SOAP on  Web Container ( TOMCAT 6.20.0 )
>
> with Protocol support HTTP (default) for north bound Request / Response
>
> and  TCP ( additional configuration ) for south bound  processing with an
>  3rd party  Server
>
>
>
> The AXIS2 Soap Engine needs to have simultaneously support 2 protocols when
> ever the web container is
>
> Is up and thus act a 2 way middleware for manipulation of the Data  between
> the  North / South bound  process
>
>
> you should be able to do this.
>
> thanks,
> Amila.
>
>
>
>
>
> Request  à  Tomcat ßà Axis (Soap, http) ßà  POJO Filter  ßà Axis( Soap
> ,Tcp) ßà 3rd Party Server
>
>  |
>
> Response ß |
>
>
>
>
>
>
>
>
>
>
>
> With regards
>
> Karthik
>
>
>
>
> --
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Please correct me if wrong

2010-01-05 Thread Amila Suriarachchi
On Wed, Jan 6, 2010 at 10:51 AM, Karthik Nanjangude <
karthik.nanjang...@xius-bcgi.com> wrote:

>  Hi
>
>
>
> I am exploring the possibilities …
>
> Please  correct me if  wrong
>
>
>
> Spec
>
> SOAP : AXIS2
>
> JDK 1.5
>
> WebContainer : Tomcat 6.20.0
>
> O/s  Windows / Linux / Unix
>
>
>
>
>
> I need to run AXIS2 SOAP on  Web Container ( TOMCAT 6.20.0 )
>
> with Protocol support HTTP (default) for north bound Request / Response
>
> and  TCP ( additional configuration ) for south bound  processing with an
>  3rd party  Server
>
>
>
> The AXIS2 Soap Engine needs to have simultaneously support 2 protocols when
> ever the web container is
>
> Is up and thus act a 2 way middleware for manipulation of the Data  between
> the  North / South bound  process
>

you should be able to do this.

thanks,
Amila.

>
>
>
>
> Request  à  Tomcat ßà Axis (Soap, http) ßà  POJO Filter  ßà Axis( Soap
> ,Tcp) ßà 3rd Party Server
>
>  |
>
> Response ß |
>
>
>
>
>
>
>
>
>
>
>
> With regards
>
> Karthik
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Several HTTP session acessing Web Services

2010-01-02 Thread Amila Suriarachchi
On Sun, Jan 3, 2010 at 1:52 AM, Bruno Simioni wrote:

> Please, could you give me an example, to solve this problem using
> WS-Addressing ?
>
> My problem is about acess the same service using different clients. One
> client consumes the service using Javascritp, and the another one, the Java
> Service Client.
>
> Although the Javascript client gets the related message Id, how can I use
> this on Java Clent?
>

so your problem is to share a one session among different clients?

I think there is no standard way to do this. even with the http sessions you
need to copy
the cookie which contains the JSESSION to other requests.

thanks,
Amila.

>
> Regards,
>
> Bruno.
>
> On Sat, Jan 2, 2010 at 9:53 AM, Yashvant chauhan wrote:
>
>> Use WS-Addressing for stateful web service..
>>
>>
>>
>> On Sat, Jan 2, 2010 at 3:46 PM, Bruno Simioni wrote:
>>
>>> Amila, thats about JAX-WS services.
>>>
>>> Here's the situation:
>>>
>>> First Access
>>> --- HTTP Session 1---
>>> Client1 (JavaScript) -> Axis2 -> JAX-WS Service1
>>> --- HTTP Session 1---
>>>
>>> Second Access
>>> --- HTTP Session 1---
>>> --- HTTP Session 2---
>>> Client1 (Java, Service Client, WSA) -> Axis2 -> JAX-WS Service2
>>> --- HTTP Session 2---
>>> --- HTTP Session 1---
>>>
>>> On First Acess, there is one HTTP Session created by my web container
>>> (Tomcat), and it is used for authentication purposes (application logic).
>>>
>>> On Second Acess, because of WSA, there is two HTTP Sessions!
>>>
>>> How to solve this?
>>>
>>> Bruno.
>>>
>>>
>>>
>>>
>>> n Sat, Jan 2, 2010 at 12:10 AM, Amila Suriarachchi <
>>> amilasuriarach...@gmail.com> wrote:
>>>
>>>> in which scope you have deploy your service?
>>>>
>>>> please have a look at here[1].
>>>>
>>>> thanks,
>>>> Amila.
>>>>
>>>> [1] http://wso2.org/library/articles/stateful-web-services-axis2
>>>>
>>>>
>>>> On Fri, Jan 1, 2010 at 7:05 PM, Bruno Simioni 
>>>> wrote:
>>>>
>>>>> Needing some help with HTTP sessions.
>>>>>
>>>>> When sending a SOAP simple message to Axis2, it create a single HTTP
>>>>> session to handle the client message, and to handle the client HTTP POST
>>>>> request.
>>>>>
>>>>> When sending a WSA SOAP message (by Axis2 Java Client), it creates
>>>>> another http session to handle the WSA soap header, and then process the
>>>>> message. The first one HTTP session persist, but inside any module or
>>>>> webservice, I have only acess to the second one. That´s a problem to me,
>>>>> since I need the first one session, for authorization purposes 
>>>>> (application
>>>>> logic)
>>>>>
>>>>> How to remove this second http session? I need only ONE http session,
>>>>> for all SOAP messages that I send.
>>>>>
>>>>> ps. Client setManageSession(true) does not solve the problem.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Bruno.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Amila Suriarachchi
>>>> WSO2 Inc.
>>>> blog: http://amilachinthaka.blogspot.com/
>>>>
>>>
>>>
>>
>>
>> --
>> 
>> Yashvant Singh Chauhan
>> Mobile- 09845277271
>> Bangalore
>>
>> *
>>
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Issue : AXIS2-3919

2010-01-01 Thread Amila Suriarachchi
On Tue, Dec 15, 2009 at 11:19 PM, Nirav Shah  wrote:

> Hi,
>
> Is there a patch to fix AXIS2-3919 currently ?If not, * *Can anyone from
> Axis Team please suggest when would the fix for 
> *AXIS2-3919<http://issues.apache.org/jira/browse/AXIS2-3919>
> *be available *?
> *


Have you tried keeping one configuration context object for all client
invocations than creating one for each invocation?

thanks,
Amila.

> *
>
>
> *Regards,
> Nirav S*.
> *




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Axis2] 1.5.1 Getting Http Authentication username and password in ServiceSkeleton

2010-01-01 Thread Amila Suriarachchi
2009/12/16 Björn Krüger 

> Hi,
> i have an issue getting the basic http authentification username and
> password in the service skeleton of my webservice.
>
> I try to resolve them via the MessageContext. The Code looks like this:
>
>
> MessageContext msgContext = MessageContext.getCurrentMessageContext();
>
> HttpTransportProperties.Authenticator authenticator =
> (HttpTransportProperties.Authenticator)
> msgContext.getOptions().getProperty(HTTPConstants.AUTHENTICATE);
>if (authenticator != null){
>user = authenticator.getUsername();
>password = authenticator.getPassword();
>}
>
> What am i doing wrong? The client is definitly sending the
> authentifaction  data.
>

try this.

HttpServletRequest httpRequest = (HttpServletRequest)
msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
httpRequest.getUserPrincipal().getName();

you want be able to get the password. but this should work.

thanks,
Amila.

>
> Help would be welcome.
>
> Thanks.
>
> Björn Krüger
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: XSD Import/Include Issue

2010-01-01 Thread Amila Suriarachchi
set the target namespaces for SchemaOne.xsd and SchemaTwo.xsd.

thanks,
Amila.

On Sat, Dec 19, 2009 at 11:22 AM, Appasamy Thirugnana <
athirugn...@sapient.com> wrote:

>
>  Hi  Axis Members ,
>
>   I have one issue with XSDs along with Axis2
>
>  We have two XSDs (SchemaOne.xsd and SchemaTwo.xsd) with no
> namespaces defined.
>
>   Both XSDs contains single element of same name and type
>
>  We have one WSDL which imports it with two different namespaces as
> given below to avoid name collision
>
>
> xmlns:tns="http://xml.com/SchemaOne";
>xmlns:xs="http://www.w3.org/2001/XMLSchema";
>targetNamespace="http://xml.com/SchemaOne";
>elementFormDefault="qualified"
>attributeFormDefault="unqualified">
>
>   
>
> xmlns:tns="http://xml.com/SchemaTwo
> "
>xmlns:xs="http://www.w3.org/2001/XMLSchema";
>targetNamespace="http://xml.com/SchemaTwo";
>elementFormDefault="qualified"
>attributeFormDefault="unqualified">
>
>   
>
> When I validate WSDL with Altova XML Spy it is showing
>
> "Invalid XML schema: ''UnsuspendRequest' is already declared in schema
> document 'C:\SchemaOne.xsd'."
>
> How can I get rid of this error?
> Attached WSDL and XSDs.
>
> Thanks in advance,
> Appasamy AT
>
>
> 
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Number of HTTP sessions increasing

2010-01-01 Thread Amila Suriarachchi
what is the Axis2 version you use? try with Axis2 1.5.1.

thanks,
Amila.

On Sat, Dec 19, 2009 at 6:56 AM, Josh123 wrote:

>
> Hi,
> I am using Axis 2 client to access a web service written using .net.
> The client gets a record from the database, convert it into SOAP message,
> and sends it to service, gets a response back and process the record in the
> database, and then gets another record and so on.
>
> Now when I start the process and run netstat on the client machine, I see
> number of connections to server and database increasing drastically. (in
> couple of minutes it reaches 200 to 300) and after some time i start
> getting
> socket errors on the server side.
> Now
> 1. Is the socket error caused due to these http sessions opened in excess?
> 2. Is it normal when using Axis 2 client for sending multiple records
> (synchronously), to have multiple http sessions, or have I messed up in my
> code?
>
> Any help will be appreciated.
>
> I have generated the client side service stub using WSDL2JAVA and the code
> to invoke the service stub is as follow:
> public class Client {
>
>private static ServiceStub service;
>
>private static void getService(String endPointUrl) throws AxisFault{
>if (service == null){
>service = new ServiceStub(endPointUrl);
>}
>}
>
>public static Response sendData(Object obj,
>String endPointUrl, long socketTimeOut, String
> userName,
>String password) {
>Operation operation = (Operation) obj;
>OperationResponse response = new OperationResponse();
>try {
>getService(endPointUrl);
>
>Authenticator auth = new Authenticator();
>
>auth.setUsername(userName);
>auth.setPassword(password);
>auth.setPreemptiveAuthentication(true);
>
>  service._getServiceClient().getOptions().setProperty(
>
>  org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,
>auth);
>
>response = service.Operation(operation,
> socketTimeOut);
>} catch (AxisFault e1) {
>
>e1.printStackTrace();
>} catch (RemoteException e) {
>e1.printStackTrace();
>} catch (Exception e) {
>e1.printStackTrace();
>}
>return response;
>}
> }
>
> --
> View this message in context:
> http://old.nabble.com/Number-of-HTTP-sessions-increasing-tp26851898p26851898.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Axis2--How to access custom http headers from axis2 client

2010-01-01 Thread Amila Suriarachchi
On Mon, Dec 21, 2009 at 11:22 PM, santhosh kotte wrote:

> Hi guyz...
>
> I have added my own http headers in the axis service.
>
> MessageContext rmc
> =MessageContext.getCurrentMessageContext().getOperationContext().getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
>   List headers = new ArrayList();
>   headers.add(new Header("http_header1","value1"));
>   headers.add(new Header("http_header2","value2"));
>   rmc.setProperty(HTTPConstants.HTTP_HEADERS, headers);
>

axis2 sets the transport headers like this.
msgContext.setProperty(MessageContext.TRANSPORT_HEADERS, transportHeaders);

try to get the values back from this property

have a look at here[1] too.

thanks,
Amila.

[1]
http://amilachinthaka.blogspot.com/2008/11/accessing-axis2-information-at-client.html

>
> I could see them through tcpmon in the response .
>
> But I need a way to access these in client code.
>
> Is there a way to do it?
>
> --
> The INTERNET now has a personality. YOURS! See your Yahoo! 
> Homepage<http://in.rd.yahoo.com/tagline_yyi_1/*http://in.yahoo.com/>
> .
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Several HTTP session acessing Web Services

2010-01-01 Thread Amila Suriarachchi
in which scope you have deploy your service?

please have a look at here[1].

thanks,
Amila.

[1] http://wso2.org/library/articles/stateful-web-services-axis2

On Fri, Jan 1, 2010 at 7:05 PM, Bruno Simioni wrote:

> Needing some help with HTTP sessions.
>
> When sending a SOAP simple message to Axis2, it create a single HTTP
> session to handle the client message, and to handle the client HTTP POST
> request.
>
> When sending a WSA SOAP message (by Axis2 Java Client), it creates another
> http session to handle the WSA soap header, and then process the message.
> The first one HTTP session persist, but inside any module or webservice, I
> have only acess to the second one. That´s a problem to me, since I need the
> first one session, for authorization purposes (application logic)
>
> How to remove this second http session? I need only ONE http session, for
> all SOAP messages that I send.
>
> ps. Client setManageSession(true) does not solve the problem.
>
> Regards,
>
> Bruno.
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: No CredentialProviders problem in axis2 and httpclient

2010-01-01 Thread Amila Suriarachchi
I tried with the sample described here[1] and it worked. this may help you.

Amila.

[1] http://amilachinthaka.blogspot.com/2010/01/axis2-authentication.html

On Wed, Dec 23, 2009 at 1:19 PM, DJP JEAN-PROST Dominique <
dominique.jean-pr...@dexia-sofaxis.com> wrote:

>  Hello,
>
>
>
> [ENV]
>
> AXIS2 1.5.1
>
> Commons-httpclient 3.1
>
> [/ENV]
>
>
>
> I’m meeting a problem I really can’t resolve and after reading many lines
> of code in axis2, here where I am :
>
> - I’m trying to call a ms exchange 2007 WS
>
> - I setup I think my authentication code using this kind of code :
>
>
>
>  final Options options =
> this.serviceExchange._getServiceClient().getOptions();
>
>  final Authenticator authenticator = new Authenticator();
>
>
>
>  // Cf.
> http://ws.apache.org/axis2/1_5_1/http-transport.html#preemptive_auth
>
>  final List authScheme = new ArrayList();
>
>  authScheme.add(Authenticator.NTLM);
>
>  authScheme.add(Authenticator.BASIC);
>
>
>
>  authenticator.setAuthSchemes(authScheme);
>
>  authenticator.setUsername(this.username);
>
>  authenticator.setPassword(this.password);
>
>  authenticator.setHost(this.host);
>
>  authenticator.setDomain(this.domain);
>
>  authenticator.setPort(this.port);
>
>
>
>  options.setTimeOutInMilliSeconds(this.timeout);
>
>  options.setProperty(HTTPConstants.CHUNKED, "false");
>
>  options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, "true");
>
>  options.setProperty(HTTPConstants.AUTHENTICATE, authenticator);
>
>
>
>  this.serviceExchange._getServiceClient().setOptions(options);
>
>
>
> I then get the following execution logs where you can see that there is no
> credential providers found.
>
> So I searched the net, and found this
> http://markmail.org/search/list:org%2Eapache%2Ews%2Eaxis-dev+CredentialsProviderwhere
>  you can see that the credential providers was first added and the
> deleted in org/apache/axis2/transport/http/AbstractHTTPSender.java
>
>
>
>
>
> My question is then quite simple : how can I make this work ? Is it right
> that CredentialsProvider was deleted from AbstractHTTPSender ? If so, what
> should I add in my authentication setup to make it work ?
>
> Regards,
>
> dom
>
>
>
>
>
>
>
>
>
> HttpMethodDirector.java:843) - Authorization required
>
> 2009-12-21 12:01:11,447 DEBUG
> org.apache.commons.httpclient.HttpMethodDirector (
> HttpMethodDirector.java:662) - enter
> HttpMethodBase.processAuthenticationResponse(HttpState, HttpConnection)
>
> 2009-12-21 12:01:11,447 DEBUG
> org.apache.commons.httpclient.auth.AuthChallengeProcessor (
> AuthChallengeProcessor.java:90) - Supported authentication schemes in
> the order of preference: [NTLM, Basic]
>
> 2009-12-21 12:01:11,447 INFO
> org.apache.commons.httpclient.auth.AuthChallengeProcessor (
> AuthChallengeProcessor.java:101) - NTLM authentication scheme selected
>
> 2009-12-21 12:01:11,463 DEBUG
> org.apache.commons.httpclient.auth.AuthChallengeProcessor (
> AuthChallengeProcessor.java:155) - Using authentication scheme: ntlm
>
> 2009-12-21 12:01:11,463 DEBUG
> org.apache.commons.httpclient.auth.AuthChallengeProcessor (
> AuthChallengeProcessor.java:163) - Authorization challenge processed
>
> 2009-12-21 12:01:11,463 DEBUG
> org.apache.commons.httpclient.HttpMethodDirector (
> HttpMethodDirector.java:714) - Authentication scope: NTLM  realm>@mercure:443
>
> 2009-12-21 12:01:11,463 DEBUG org.apache.commons.httpclient.HttpState (
>HttpState.java:436) - enter
> HttpState.getCredentials(AuthScope)
>
> 2009-12-21 12:01:11,463 DEBUG
> org.apache.commons.httpclient.HttpMethodDirector (
> HttpMethodDirector.java:861) - Credentials required
>
> 2009-12-21 12:01:11,463 DEBUG
> org.apache.commons.httpclient.HttpMethodDirector (
> HttpMethodDirector.java:879) - Credentials provider not available
>
> 2009-12-21 12:01:11,463 INFO
> org.apache.commons.httpclient.HttpMethodDirector (
> HttpMethodDirector.java:737) - No credentials available for NTLM  realm>@mercure:443
>
> 2009-12-21 12:01:11,463 DEBUG org.apache.axis2.transport.http.HTTPSender
> (   HTTPSender.java:278) - Handling response - 401
>
>
>
>
>
>
>
> Consultez nos nouveaux sites internet : http://www.dexia-sofaxis.com 
> http://www.dexia-sofcap-sofcah.com
>
> Tous ensemble pour l’environnement : n’imprimer ce courriel que si nécessaire.
>
> Dexia Sofaxis disclaimer : http://www.dexia-sofaxis.com/disclaimer.html
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Passing custom object to Axis2/J Web service

2010-01-01 Thread Amila Suriarachchi
2009/12/23 "Kamran Soomro (کامران سومرو)" 

> Hi,
>
> I've created a web service using Axis2/J and Eclipse WTP tools.

how you have create the service. you can create the service as a POJO class
which has a method
taking your custom class as a parameter.

thanks,
Amila.

> I want to pass an object of a custom class into it. The class contains only
> one public String member. However, the proxy class generated on the client
> side does not provide me any way of specifying this member. Any suggestions
> on how to go about this would be much appreciated. Thanks!
>
> --Kamran
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: encryption exception

2010-01-01 Thread Amila Suriarachchi
 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
>
>
> xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
>
>
>
>http://ws.apache.org/rampart/policy";>
>modesto
>
>  jem
>
>
> com.jem.ws.cc.client.PWCBHandler
>
> provider="org.apache.ws.security.components.crypto.Merlin">
>
> name="org.apache.ws.security.crypto.merlin.keystore.type">JKS
>
> name="org.apache.ws.security.crypto.merlin.file">/JEM_CERTS-1024/modesto.jks
>    
> name="org.apache.ws.security.crypto.merlin.keystore.password">modestopwd
>
>
>
> provider="org.apache.ws.security.components.crypto.Merlin">
>
> name="org.apache.ws.security.crypto.merlin.keystore.type">JKS
>
> name="org.apache.ws.security.crypto.merlin.file">/JEM_CERTS-1024/modesto.jks
>
> name="org.apache.ws.security.crypto.merlin.keystore.password">modestopwd
>
>
>
>
>  
>
>
>
>
>
> --
> View this message in context:
> http://old.nabble.com/encryption-exception-tp26914366p26914366.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: unwrap primitives with ADB

2009-12-31 Thread Amila Suriarachchi
On Tue, Dec 29, 2009 at 12:13 AM, Li Ma  wrote:

> Any comment on this? I'm desperately waiting for an answer now.


use -Euwc option to generate wrapped classes.

or you can use Integer.MIN_VALUE as the null value.

thanks,
Amila.

>
> Thanks in advance!
>
> Li
>
>
> On Sun, Dec 27, 2009 at 8:59 PM, Li Ma  wrote:
>
>> Hi there,
>>
>> I'm upgrading from Axis1 to Axis2 now. In Axis1, method:
>> Integer getMyInt()
>> will be converted to:
>> Integer getMyInt();
>>
>> So I can return null to indicate special situation, such as value not
>> defined.
>>
>> But in Axis2, it's been change to:
>> int getMyInt();
>>
>> I know if I do not unwrap when do WSDL2Java, I can perform extra check on
>> weather the value has been assigned or not. But I have to unwrap the code,
>> otherwise, change of my existing code will be unbearable.
>>
>> Any idea how I can keep my Integer type?
>>
>> Thanks!
>>
>> --
>> Li Ma
>> lim...@gmail.com
>>
>>
>
>
> --
> Li Ma
> lim...@gmail.com
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: WSDL2Java: How to generating a single serivce.xml for multiple wsdl files?

2009-12-31 Thread Amila Suriarachchi
On Wed, Dec 30, 2009 at 11:07 AM, fazlan  wrote:

>
> Hi All,
>
> I'am trying to generate a *.aar from multiple wsdl's using the wsdl2java
> ant
> task.
> But I;am having a problem when generating services.xml files.
>
> My requirement is to generate a single services.xml for all the *.wsdl's,
> rather than services.xml files for each *.wsdl file.
>
> Is this possible?
>
no unless you merge your wsdl files into into one by creating multiple
services.

thanks,
Amila.

> If so, Pleases provide me with a snippet of ant script how
> to achieve this.
>
> e.g:
> I need something like the following,
>
> 
>
>. . .
>
>
> . . .
>
> 
>
> but, at present it generates in seperate services.xml files as,
>
> services.xml for WsdlA
> 
>
>. . .
>
> 
>
> services.xml for WsdlB
> 
>
>. . .
>
> 
>
> Thanks & Regards,
> Fazlan
> --
> View this message in context:
> http://old.nabble.com/WSDL2Java%3A-How-to-generating-a-single-serivce.xml-for-multiple-wsdl-files--tp26964298p26964298.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: The server failed to respond- Proxy server

2009-12-14 Thread Amila Suriarachchi
On Mon, Dec 14, 2009 at 5:30 PM, Pierre G  wrote:

>
> Hi all,
> As a complete beginner with Axis, I am trying to make a client based on the
> example given by the server at
>
> http://eutils.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/DOC/esoap_java_help.html
>
> Everything works correctly but when I want to deploy this client inside a
> company using a proxy server, I get the following errors :
>
> org.apache.axis2.AxisFault: The server eutils.ncbi.nlm.nih.gov failed to
> respond
> at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
> at
> org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193)
> at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
> at
>
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:389)
> at
>
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:222)
> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
> at
>
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
> at
>
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
> at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
> at
>
> gov.nih.nlm.ncbi.www.soap.eutils.EFetchPubmedServiceStub.run_eFetch(EFetchPubmedServiceStub.java:183)
>
> Where can be the problem, proxy-server or on the server ?
> Thanks in advance for any help.
>

See the response message you get from the proxy service using tcpmon[1]

thanks,
Amila.
[1] http://ws.apache.org/commons/tcpmon/index.html

>
> Pierre
> --
> View this message in context:
> http://old.nabble.com/The-server-failed-to-respond--Proxy-server-tp26776673p26776673.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Newbie needs help/resources crafting AXIS2 services.xml

2009-12-11 Thread Amila Suriarachchi
On Mon, Dec 7, 2009 at 9:44 PM,  wrote:

> Good morning,
>
> It appears my lack of being immersed in AXIS2 means nothing works quite
> how I expect it to.  From a recent email on a different topic it sounds
> like I need to set useOriginalwsdl in a services.xml file in my META-INF
> directory for AXIS2 (1.3) to actually use the WSDL I was given.
>
> Or perhaps part of the problem is that the WSDL is in META-INF/wsdl/ and
> isn't where AXIS2 expects it to be?
>
> Anyways, MyEclipse never generated a services.xml file.  In fact I'm just
> deploying a WAR (what's an AAR?) which seems to be working but may be
> confusing matters, what with combining JAX-WS and AXIS2.
>
> The couple of brief examples of services.xml files I've found look to
> recreate the basic definitions in the WSDL file, so I'm here in part to
> ask for any good references to hand-crafting services.xml files -
> primarily about what I need to include so the whole thing still works.
> Or... with my setup will it even try to read the services.xml file since
> the basic web services have worked so far (just not successfully with
> complex types)?
>
> So is the XML at the end of this a complete services.xml file where the
> WSDL has a line:
>
> and that service has types defined for the input and output?  Or do I need
> to bring more of the WSDL into it?
>

generate the code to your wsdl with the wsdl2java tool. with -ss -sd
parameters.
you will see a sample services.xml file under resource folder.

thanks,
Amila.

>
>
> Thanks,
>
> -Chris
>
>
> --- services.xml? ---
> 
>   
> 
> 
>  
>true
>  
> 
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: How to forward a soap envelope between webservices in axis2

2009-12-10 Thread Amila Suriarachchi
On Tue, Dec 8, 2009 at 8:17 AM, Hasini Gunasinghe wrote:

> Hi,
>
> I am using axis2 stand alone server to deploy the web services. And I need
> to forward the same soap envelope between several web services by only
> changing the header of the soap envelope.
> When I searched for a way to achieve that I found that detaching the
> existing header and adding a new header would do. But it didn't work. I use
> OperationClient API to invoke web services along the communication path.
>  When I set the action in the options of service client in a intermediate
> web service and forward the soap envelope, axis2 throws an exception saying
> that soap action and wsa:action mismatch. That is because the original
> header contains a different action put by the WS-addressing.
>

try removing the Addressing headers.

thanks,
Amila.

>
> Can you please tell me the correct way to forward a soap envelope through
> several web services deployed in one or more axis2 servers?
> Thank you very much.
>
> regards,
> Hasini.
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: HI :How to add Empty soap header element to SOAP envelope using AXIS2 client API

2009-12-10 Thread Amila Suriarachchi
use operational client to send a soap envelop.

have a look at here[1].

thanks,
Amila.

[1]
http://amilachinthaka.blogspot.com/2009/09/sending-arbitrary-soap-message-with.html

On Tue, Dec 8, 2009 at 3:22 PM, Vishnu Vardhan Reddy  wrote:

>  HI all
>
> How to add empty SOAP Header element to SOAP request , using AXIS2 API.
>
> Soap Request should be  like this
>
>
>
> http://schemas.xmlsoap.org/soap/envelope/";
> standalone="no"?>
>
> http://schemas.xmlsoap.org/soap/envelope/
> ">
>
> 
>
> 
>
> 
>
> 
>
> 
>
>
>
> How to add empty SOAP header element to SOAP envelope ..?
>
>
>
> Thanks in advance for kind support.
>
>
>
> Thanks regards,
>
> Vishnu.
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: WSDL4J help

2009-12-10 Thread Amila Suriarachchi
On Wed, Dec 9, 2009 at 7:22 PM, Stefano Tranquillini <
stefano.tranquill...@gmail.com> wrote:

> Hi.
> i think maybe someone here can help me.
> there's someone that has experience in WSDL4J?
> i needo to insert element, not only to read, but it seems to ignore my
> classes.
> Better:
> i'm not able to add any type of element in my wsdl.
> any idea how to insert operation or porttype?
>

have a look here[1].

thanks,
Amila.

[1]
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/wsdl/WSDL11DefinitionBuilder.java?revision=637447&view=markup

>
> PS: there's a mailing list (or similar) for wsdl4j
>
> thanks
> --
> Stefano
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: axis2 1.5.1 wsdl2java --all-ports

2009-12-10 Thread Amila Suriarachchi
On Thu, Dec 10, 2009 at 12:34 PM, Alex  wrote:

> hi all,
>
> as I read on the web, there is no posibility to generate server skeleton
> from an wsdl which has multiple ports defined, is this correct?
>

yes.

>
> Is there an other possibility to combine all ports in one webService, or is
> it better to generate one service for each port.


please try using one portType per service.

thanks,
Amila.

>
>
> here is my ant-task
>
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>
>   
>   
>   
>   
>   
>   
>   
>
>   
>
> as you can see i use the -ap or --all-ports option but only one port is
> generatet.
>
> I am using axis2 1.5.1 and tomcat 6.0.20
>
>
> thank you, so long alex
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Axis2] Abstract types and ADB

2009-12-10 Thread Amila Suriarachchi
use -g option to generate inherited classes.

to other problem it seems to be a bug with Axis2. so either
1. try without -uw option
2. try with a build from the current trunk.

thanks,
Amila.


On Thu, Dec 10, 2009 at 8:21 PM, Jens Rutschmann
wrote:

> Hi all,
>
> currently I'm trying to generate a client stub for this WSDL:
>
> https://hosted.datascopeapi.reuters.com/datascopeapi/v1/extractionservice.asmx?wsdl
>
> The SOAP 1.2 Binding in this WSDL seems to contain a few errors, so I
> removed it and the respective port before calling wsdl2java. The WSDL still
> contains a valid SOAP 1.1 binding as well as a port using it.
>
> I'm using axis2 1.5.1 and use the following command line:
>
> jens:~/tmpfs> /home/jens/tools/axis2-1.5.1/bin/wsdl2java.sh -uw -u -uri
> extractionservice.wsdl
>  Using AXIS2_HOME:   /home/jens/tools/axis2-1.5.1
>  Using JAVA_HOME:   /home/jens/.gentoo/java-config-2/current-user-vm
> Retrieving document at 'extractionservice.wsdl'.
> [WARN] Type {
> http://reuters.com/datascopeselect/ExtractionService/v1/}anyType<http://reuters.com/datascopeselect/ExtractionService/v1/%7DanyType>missing!
> jens:~/tmpfs>
>
>
> After that there are only classes for the abstract types, but not for the
> complex types inheriting from the abstract types.
>
> Example (from the WSDL, lines 680-695):
>  
>
>   name="PreferredIdentifierType" type="s:string" />
>
>  
>  
>
>  
>
>   name="IdentifierSearchValue" type="s:string" />
>   type="s:string" />
>   type="tns:ArrayOfString" />
>
>  
>
>  
>
> wsdl2java only generated a class for InstrumentSearchRequest but not for
> InstrumentSearchRequestAll.
>
> Furthermore the generated stub interface contains errors:
> (ExtractionService.java, lines 29-32)
>
> public
> com.reuters.datascopeselect.extractionservice.v1.ArrayOfValueInfo
> getInstrumentTypes(
>
>
> ,com.reuters.datascopeselect.extractionservice.v1.CredentialsHeaderE
> credentialsHeader44)
>throws java.rmi.RemoteException
>
> Obviously that won't compile.
>
>
> Is there anything i can do to create a functional client stub for that
> service using axis2 ?
>
> Thanks a lot in advance,
> Jens
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: AXIS2 WebServices: Processing Response which does not contain SOAP Headers

2009-11-25 Thread Amila Suriarachchi
On Wed, Nov 25, 2009 at 4:59 PM, Vishnu Vardhan Reddy <
vre...@radiantinfo.com> wrote:

>  AIXS2 version using in application is  axis2-1.4.1
>
> I am sending and receiving plain/XMl (SOAP 1.1 Request and Response)
>
>
>
> Problem is response from server is plain xml it does not contain any SOAP
> headers. but operation client is expecting SOAP headers to process the
> response XML .
>
I mean the value of the http contentype header. for soap messages it should
be application+soap/xml

thanks,
Amila.

>
>
> Thanks,
>
>  VIshnu
>
>
>
>
>  --
>
> *From:* Amila Suriarachchi [mailto:amilasuriarach...@gmail.com]
> *Sent:* Wednesday, November 25, 2009 4:38 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: AXIS2 WebServices: Processing Response which does not
> contain SOAP Headers
>
>
>
>
>
> On Wed, Nov 25, 2009 at 4:22 PM, Vishnu Vardhan Reddy <
> vre...@radiantinfo.com> wrote:
>
> HI ,
>
>
>
> I am using AXIS2 client API to invoke third party web services. Response we
> are getting from  the web service is XML but it doe contain any SOAP headers
> its just plain xml file as response, but while sending request it includes
> SOAP Headers .I cheeked the response though TC/IP monitor, receiving plain
> XML file .Client API is giving following error while processing the response
> XML *SOAPProcessingException*: First Element must contain the local name,
> Envelope .
>
>
> What is the Axis2 version you use?
> What is the content type of the response? if it is application/xml the it
> should process as a plain xml file.
>
> thanks,
> Amila.
>
>
>
> How can we force Operation client to by pass soap header processing and
> getting XML file and process by AXIOM.
>
>
>
> Thanks in advance for your kind support.
>
>
>
> Thanks & regards,
>
> Vishnu.
>
>
>
>
>
>
>
>
> --
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: AXIS2 WebServices: Processing Response which does not contain SOAP Headers

2009-11-25 Thread Amila Suriarachchi
On Wed, Nov 25, 2009 at 4:22 PM, Vishnu Vardhan Reddy <
vre...@radiantinfo.com> wrote:

>  HI ,
>
>
>
> I am using AXIS2 client API to invoke third party web services. Response we
> are getting from  the web service is XML but it doe contain any SOAP headers
> its just plain xml file as response, but while sending request it includes
> SOAP Headers .I cheeked the response though TC/IP monitor, receiving plain
> XML file .Client API is giving following error while processing the response
> XML *SOAPProcessingException*: First Element must contain the local name,
> Envelope .
>

What is the Axis2 version you use?
What is the content type of the response? if it is application/xml the it
should process as a plain xml file.

thanks,
Amila.

>
>
> How can we force Operation client to by pass soap header processing and
> getting XML file and process by AXIOM.
>
>
>
> Thanks in advance for your kind support.
>
>
>
> Thanks & regards,
>
> Vishnu.
>
>
>
>
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: WS works in Axis 2 1.3 and 1.4.1 but has timeout in Axis 1.5.1?

2009-11-23 Thread Amila Suriarachchi
On Mon, Nov 23, 2009 at 8:46 PM, pwillemann  wrote:

>
> Thank you for your answer, however it does not seem to work..  I get the
> same
> error as before:
> Here is a code snippet which implemented the suggested solution.
>
> public GetAOIResponse getAOI(GetAOI request) throws SSBException {
>GetAOIResponse response = new GetAOIResponse();
>try {
>response = cistub.getAOI(request);
>cistub._getServiceClient().cleanupTransport();   //
> Axis 2 V1.5.1
>} catch (AxisFault af) {
>logger.error("Error with the local webservice", af);
>af.printStackTrace();
>} catch (RemoteException re) {
>logger.error("Cannot connect to local webservice",
> re);
>re.printStackTrace();
>} catch (SSBException e) {
>e.printStackTrace();
>}
>return response;
>}
>
> This method will be called many times during its lifetime and I reuse
> cistub.  Is that a problem?   I would like to avoid instantiating a new
> stub
> everytime if possible.
>

Can you check with Axis2 1.5?

thanks,
Amila.

>
> Thanks for any help or suggestions
>
> Phil Willemann
>
>
> Amila Suriarachchi wrote:
> >
> > On Fri, Nov 13, 2009 at 11:02 PM, pwillemann
> > wrote:
> >
> >>
> >> I used WSDL2Java to create all my Web service classes.  I do not have
> any
> >> custom code.  Everything in my project is autogenerated.  My web service
> >> works fine in Axis 2 version 1.3 and Axis 2 version 1.4.1.  When I
> >> migrated
> >> to 1.5.1 I get timeouts.  Specifically the error says:
> >>
> >> HTTPSender.sendViaPost INFO - Unable to sendViaPost to
> >> url[http://127.0.0.1:8080/mywebservice/]
> >> org.apache.commons.httpclient.ConnectionPoolTimeoutException:  Timeout
> >> waiting for connection.
> >>
> >> I looked to see if there was a migration guide from 1.3/1.4 to 1.5 that
> >> addresses this issue, however I have been unable to find one.  This web
> >> service has worked for almost a year, but I am curious if the new
> version
> >> of
> >> Axis has revealed some sort of flaw or if there is an actual problem in
> >> 1.5.1.
> >>
> >> Has anyone had a similar problem or has anyone solved this problem? Any
> >> help
> >> would be appreciated very much.  Thanks!
> >>
> >
> > call stub._getServiceClient().cleanupTransport();
> > after service invocation.
> >
> > thanks,
> > Amila.
> >
> >>
> >> Sincerely yours
> >> Phil Willemann
> >>
> >> --
> >> View this message in context:
> >>
> http://old.nabble.com/WS-works-in-Axis-2-1.3-and-1.4.1-but-has-timeout-in-Axis-1.5.1--tp26340326p26340326.html
> >> Sent from the Axis - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Amila Suriarachchi
> > WSO2 Inc.
> > blog: http://amilachinthaka.blogspot.com/
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/WS-works-in-Axis-2-1.3-and-1.4.1-but-has-timeout-in-Axis-1.5.1--tp26340326p26479852.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Future of JMS in Axis2?

2009-11-23 Thread Amila Suriarachchi
On Tue, Nov 24, 2009 at 12:24 AM,  wrote:

>
> Could somebody please clarify future plans for JMS support in Axis2?


Now JMS transport is in the new commons/transport project of which 1.0 will
be released soon.

thanks,
Amila.

> My
> understanding is that Sandesha is the future direction for this function,
> but I'm unclear if this refers only to the Axis2 server, or both server and
> client. I'm particularly interested in using the Axis2 client standard to
> invoke both JMS and HTTP services in  our SOA infrastructure.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: WS works in Axis 2 1.3 and 1.4.1 but has timeout in Axis 1.5.1?

2009-11-20 Thread Amila Suriarachchi
On Fri, Nov 13, 2009 at 11:02 PM, pwillemann wrote:

>
> I used WSDL2Java to create all my Web service classes.  I do not have any
> custom code.  Everything in my project is autogenerated.  My web service
> works fine in Axis 2 version 1.3 and Axis 2 version 1.4.1.  When I migrated
> to 1.5.1 I get timeouts.  Specifically the error says:
>
> HTTPSender.sendViaPost INFO - Unable to sendViaPost to
> url[http://127.0.0.1:8080/mywebservice/]
> org.apache.commons.httpclient.ConnectionPoolTimeoutException:  Timeout
> waiting for connection.
>
> I looked to see if there was a migration guide from 1.3/1.4 to 1.5 that
> addresses this issue, however I have been unable to find one.  This web
> service has worked for almost a year, but I am curious if the new version
> of
> Axis has revealed some sort of flaw or if there is an actual problem in
> 1.5.1.
>
> Has anyone had a similar problem or has anyone solved this problem? Any
> help
> would be appreciated very much.  Thanks!
>

call stub._getServiceClient().cleanupTransport();
after service invocation.

thanks,
Amila.

>
> Sincerely yours
> Phil Willemann
>
> --
> View this message in context:
> http://old.nabble.com/WS-works-in-Axis-2-1.3-and-1.4.1-but-has-timeout-in-Axis-1.5.1--tp26340326p26340326.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Apache Axis2 ECCN

2009-11-20 Thread Amila Suriarachchi
2009/11/17 

> Dear Apache Axis2 Users
>
> Hi, my name is Takayuki Hirano, and I work at Hitachijoho, Japan.
> I am writing to ask you what is the export control classification number
> for the Apache Axis2. (ECCN) I need to know this in order to obtain the
> legal clearance to embedded Apache Axis2 in our test framework.
>

Any apache project is under the Apache licence which does not require any
legal clearance to use for any purpose.

thanks,
Amila.


> We appreciate your prompt attention to this matter.
>
> Sincerely yours.
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: use abstract in complextype

2009-11-20 Thread Amila Suriarachchi
Please create a jira with wsdl if you have this problem with Axis2 1.5.

thanks,
Amila.

On Wed, Nov 18, 2009 at 4:09 PM, Kang, YongLiang  wrote:

> Hi guys,
>
>
> I use axis2 v1.4
>
> I claim a complex type as abstract in xsd and derived some subclass from
> it. Then I use soapUi for testing.
> In soapUI when I set the subtype and request, everything works fine.
> However I found I can set the field as the 'abstract' type and do the
> request.
> I suppose to received some warning in soapUI. However it reaches my
> axis2 server directly.
> I use wsdl2java to generate code. I checked the generated code and found
> this:
>
>   public static FieldBase parse(javax.xml.stream.XMLStreamReader
> reader) throws java.lang.Exception{
>FieldBase object =
>null;
>...
>...
>// handle attribute "id"
>java.lang.String tempAttribId =
>
>reader.getAttributeValue(null,"id");
>
>   if (tempAttribId!=null){
> java.lang.String content = tempAttribId;
>
> object.setId(
>
> org.apache.axis2.databinding.utils.ConverterUtil.convertToLong(tempAttri
> bId));
>
> Seems the auto generated code declare a null object and set value for it
> directly. No matter how soapUI works. I think it is a bug in axis2
> code-gen part.
> Please correct me if I am wrong about some parts.
>
> soap with normal subtype:soap with abstract subtype:  
> xsd sample:
>  
>
>
>
>...
>
>    
>    
>...
>
> Best wishes!
>
> Peter Y.L.Kang
> msn: peter_ylk...@hotmail.com
> Software Engineer, Sever Dept.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Where are the locator and the service?

2009-11-20 Thread Amila Suriarachchi
On Tue, Nov 17, 2009 at 9:36 PM, P.N.  wrote:

>
> Hello!
>
> I want to create a WS client from wsdl using:
> WSDL2Java -uri file:///C:/Dokumente%20und%20Einstellungen/.../xxx.wsdl -d
> xmlbeans -s -o "C:\my-sources"
>
> Though there's a service defined, no locator or service file are created.
>
> Here's a snippet from my wsdl (guessing this should be the needed part,
> i.e. schemas, service with name):
>
> 
> http://schemas.xmlsoap.org/wsdl/";
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:xsd="
> http://www.w3.org/2001/XMLSchema";
> ... >
>
>
>...
>
>...
>
>...
>
> 
>
>
> I've tested with one wsdl file resulting in a very big (some MB!) java
> source, when using ADB, so I'd prefer using XmlBeans.
>

try -u option.

thanks,
Amila.

>
> Kind regards
>
> Peter Nabbefeld
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: WSDL2Axis generation of stub for enumeration type

2009-11-20 Thread Amila Suriarachchi
Please log a jira with your wsdl or a sample wsdl to reproduce the issue.

thanks,
Amila.

On Thu, Nov 19, 2009 at 4:28 AM, techycee  wrote:

>
> I have WSDL which has some enumeration types e.g.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> The stub which is generated using Axis2 is having problems. It is trying to
> use
>
> org.apache.axis2.databinding.utils.ConverterUtil.convertToEngineIntensityType
> which is not a valid method at all.
> How do i eliminate this problem without changing WSDL or the stub? Is there
> a specific way enumeration types should be handled during stub generation?
> Also i am generating it using ADB binding.
>
>
> --
> View this message in context:
> http://old.nabble.com/WSDL2Axis-generation-of-stub-for-enumeration-type-tp26417347p26417347.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: client side handler

2009-11-20 Thread Amila Suriarachchi
On Thu, Nov 19, 2009 at 4:10 PM, Valerio Synclab wrote:

>  Hi all,
>
>
>
> I am trying to add an handler in my axis2 client and in order to do this I
> followed the “Writing Your Own Axis2 Module” tutorial adapting it for the
> client side.
>
>
>
> The problem is that the handler is not called at all during the web service
> invocation.
>
>
>
> Here is what I have done:
>
>
>
> This is the handler code
>
> **
>
> public class Handler extends AbstractHandler implements
> org.apache.axis2.engine.Handler{
>
> private String name;
>
> public InvocationResponse invoke(MessageContext arg0)
> throws AxisFault {
>
>
> System.out.println(arg0.getEnvelope().toString());
>
>return InvocationResponse.CONTINUE;
>
> }
>
> public void revoke(MessageContext msgContext) {
>
>
> System.out.println(msgContext.getEnvelope().toString());
>
> }
>
> public String getName() {
>
> return name;
>
> }
>
> public void setName(String name) {
>
> this.name = name;
>
> }
>
> }
>
>
>
> This is the module.xml
>
>
>
>
>
> ***
>
> 
>
>
>
> 
>
> 
>
> 
>
>
>
>
>
>
>
> 
>
> 
>
> 
>
>
>
>
>
>
>
>  class="obg.test.client.Handler">
>
> 
>
> 
>
>
>
>
>
>
>
>  class="obg.test.client.Handler">
>
> 
>
> 
>
>
>
> 
>
>
>
>
>
> This is what I added into axis.xml for each phaseOrder
>
>
>
> I tried both
>
>
>
> 
>
>  class="obg.test.client.Handler">
>
>   
>
>   
>
> 
>
>
>
> and
>
>
>
>  
>
>
>
> Finally I create my stub in this way:
>
>
>
> ConfigurationContext ctx = null;
>
>try {
>
>ctx =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem("……/axis2.xml");
>
>} catch (AxisFault e1) {
>
>    // TODO Auto-generated catch
> block
>
>e1.printStackTrace();
>
>}
>
>// TODO Auto-generated method stub
>
>try{
>
>SMSServiceStub stub = new
> SMSServiceStub(ctx, "……?wsdl");
>
do
stub._getServiceClient().engangeModule("test");

Amila.

>
>
> * *
>
> What else Do I have to do?
>
>
>
> Any suggestions?
>
> Best regards
>
>
>
> Valerio
>
>
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Please help for deploying Axis2 on SunOne Server

2009-11-20 Thread Amila Suriarachchi
tInOutMessageReceiver.java:41)
> at
> org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
> at
> org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:136)
> at
> org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:130)
> at
> org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processURLRequest(AxisServlet.java:829)
> at
> org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:255)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:787)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
> at
> org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
> at
> com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
> at com.iplanet.ias.web.WebContainer.service(WebContainer.java:579)
>
>
> I really appreciate any helps and comments on this.
>
> thank you.
>
> -- fatih
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Invoke with token

2009-11-20 Thread Amila Suriarachchi
On Thu, Nov 19, 2009 at 9:29 PM, wrote:

>  Hi
>
> I think I have tried with CXF and not with Axis2. Looks like both are from
> Apache.
> Being a newbie to Java as well as web service, can anyone guide with
> creating java class from the wsdl and the xsd files please?
>

this may help

Amila.

[1]
http://wso2.org/library/tutorials/reference-guide-axis2-code-generation-parameters-part-1
[2] http://wso2.org/library/2873

>
> Also is it possible to invoke the web service by adding dynamic token?
>
> Thanks,
> Suma
>
>
>
>
>
> This email was sent to you by Thomson Reuters, the global news and
> information company.
> Any views expressed in this message are those of the individual sender,
> except where the sender specifically states them to be the views of Thomson
> Reuters.
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Axis 2: Transport error: 404 Error: Not Found

2009-11-20 Thread Amila Suriarachchi
On Fri, Nov 20, 2009 at 4:30 PM, gonso75  wrote:

>
> Hello
>
> Im trying to use AXIS's 2 wsdl2Java tool to build the client that will
> consume a web service.
>
> I've run the tool and it has generated the required classes (a singel .java
> file).
> I've added that to a project and many of the jar files under AXIS_HOME/lib
> (until the code started building and then running).
>
> Looks like it ready to work, but when I invoke any web service I get this
> error:
>
> INFO  [Nov 19 2009 20:55:04]: Unable to sendViaPost to
> url[http:///]
> org.apache.axis2.AxisFault: Transport error: 404 Error: Not Found
>
> (where / have the right values).
>
> The URL is ok, and I can invoke it without problems. Im using SOAPUI with
> that same URL and it's working fine.
>
> Where could be the problem?
>

check the request and response messages using tcpmon[1]

[1] http://ws.apache.org/commons/tcpmon/download.cgi

thanks,
Amila.

>
> Any hint will be much appreciated.
>
>
> Thanks
> Gonso
> --
> View this message in context:
> http://old.nabble.com/Axis-2%3A-Transport-error%3A-404-Error%3A-Not-Found-tp26438327p26438327.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Resuse of configurationcontext ends in out of memory error

2009-11-20 Thread Amila Suriarachchi
Can you try with Axis2 1.5? There was a memory leak in 1.4 and fixed for
1.5.

thanks,
Amila.

On Fri, Nov 20, 2009 at 5:20 PM, Jens Goldhammer <
goldhammer...@googlemail.com> wrote:

>
> Hello together,
>
> We are using Axis2 1.4 as ws-client framework in a web application
> (deployed
> in JBOSS) and have encountered a problem after making the
> Axis2ConfigurationContext a singleton.
>
> This approach was necessary because creating the configurationcontext needs
> a lot of time and we don´t want to do it again and again... This was the
> suggestion in a discussion on the mailing list of Axis2
> (
> http://markmail.org/message/57afv4yi3t76b7nk#query:+page:1+mid:57afv4yi3t76b7nk+state:results
> )
>
> So Iimplemented a static method which provides the configurationContext to
> the caller. If the configurationcontext is created one time, we save it in
> a
> static variable and use this in later calls.
>
>/**
> * reuse the configuration context of AXIS2 because it is expensive to
> create a new one every time you create a
> * client stub. For more information look at url:
> *
>
> http://markmail.org/message/57afv4yi3t76b7nk#query:+page:1+mid:57afv4yi3t76b7nk+state:results
> *
> * @return a valid configuration context for the axis2 stubs
> * @throws AxisFault if creating the configuration context fails.
> */
>static synchronized ConfigurationContext getConfigurationContext()
> throws AxisFault {
>if (configCtx == null) {
>
>ClassLoader tccl =
> Thread.currentThread().getContextClassLoader();
>try {
>// set local ClassLoader
>ClassLoader bofModuleClassLoader =
> RPlanWebServiceHelper.class.getClassLoader();
>
> Thread.currentThread().setContextClassLoader(bofModuleClassLoader);
>
>configCtx =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,
> null);
>
>} finally {
>// restore thread context ClassLoader
>Thread.currentThread().setContextClassLoader(tccl);
>}
>}
>
>return configCtx;
>}
>
> The client stubs are created the following way:
>
>ProjectServiceStub projectServiceStub = new
> ProjectServiceStub(getConfigurationContext(), projectServiceUrl);
>projectServiceStub.UpdateSchedule(updateScheduleType);
>
> After some days we realized that there are very often out of memory errors
> in that application. The application is a so called method server which
> runs
> several jobs which are doing a lot of work with the axis2 client.
>
> We analyzed the headdump of the java process and determine that the
> axis2configuration instance needs a lot of memory at the time of the out of
> memory error. See the attached file for more information. The hashtable
> instance of allEndpoints is about 200 Megabyte.
>
> Please help me to find the problem? Is there a problem how we use the
> configuration context or is this a bug in Axis2?
>
> Thanks,
> Jens
>
> http://old.nabble.com/file/p26440452/headdump_analysis.html
> headdump_analysis.html
>
> --
> View this message in context:
> http://old.nabble.com/Resuse-of-configurationcontext-ends-in-out-of-memory-error-tp26440452p26440452.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Cannot run axis2 client (error 501)

2009-11-20 Thread Amila Suriarachchi
On Fri, Nov 20, 2009 at 4:17 PM, P.N.  wrote:

>
> Hello!
>
> When trying to connect to an axis-service (old axis version!) from an
> axis2-client I'm always getting the following error:
>
>
> org.apache.axis2.AxisFault: Transport error: 501 Error: Not Implemented
>at
> org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:295)
>at
> org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:190)
>at
> org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
>at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:389)
>at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:222)
>at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
>at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
>at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
>at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
>
>
> What might be the cause for this?
> Is it possible to get the full http messages?
>

use[1] to compare the request/response messages with new/old axis versions.

thanks,
Amila.

[1] http://ws.apache.org/commons/tcpmon/download.cgi

>
> Kind regards
>
> Peter
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Error while trying to deploy in weblogic 10.3

2009-11-20 Thread Amila Suriarachchi
nal.TailFilter.doFilter(TailFilter.java:26)
> at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
>  at
> labware.web.control.CustomCharacterEncodingFilter.doFilter(CustomCharacterEncodingFilter.java:31)
> at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
>  at
> weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
> at
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
>  at weblogic.security.service.SecurityManager.runAs(Unknown Source)
> at
> weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
>  at
> weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
> at
> weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
>  at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
> at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
> Caused by: javax.xml.stream.XMLStreamException: Error at Line:12,
> token:[OPENTAGBEGIN]Unbalanced ELEMENT got:args expected:return
> at
> weblogic.xml.stax.XMLStreamReaderBase.advance(XMLStreamReaderBase.java:206)
>  at
> weblogic.xml.stax.XMLStreamReaderBase.next(XMLStreamReaderBase.java:237)
> at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:506)
>  at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:161)
> ... 56 more
> Caused by: Error at Line:12, token:[OPENTAGBEGIN]Unbalanced ELEMENT
> got:args expected:return
> at weblogic.xml.babel.baseparser.BaseParser.parseSome(BaseParser.java:374)
>  at
> weblogic.xml.stax.XMLStreamReaderBase.advance(XMLStreamReaderBase.java:195)
> ... 59 more
>
>
> Chinmoy
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Problems when calling getOMElement

2009-11-20 Thread Amila Suriarachchi
here is a sample code

InDict inDict = new InDict();
ArrayOfKeyValueOfstringstring arrayOfKeyValueOfstringstring = new
ArrayOfKeyValueOfstringstring();
inDict.setInDict(arrayOfKeyValueOfstringstring);

KeyValueOfstringstring_type0[] keyValueOfstringstring_type0 = new
KeyValueOfstringstring_type0[1];
keyValueOfstringstring_type0[0] = new
KeyValueOfstringstring_type0();
keyValueOfstringstring_type0[0].setKey("One Element Array");
keyValueOfstringstring_type0[0].setValue("One Element Array");


arrayOfKeyValueOfstringstring.setKeyValueOfstringstring(keyValueOfstringstring_type0);

try {
OMElement omElement = inDict.getOMElement(InDict.MY_QNAME,
OMAbstractFactory.getOMFactory());
System.out.println("OMElement ==> " + omElement.toString());
} catch (ADBException e) {
e.printStackTrace();
}

thanks,
Amila.

On Fri, Nov 20, 2009 at 3:14 AM, Andreas Veithen
wrote:

> Håkon,
>
> I think you need to give a bit more context. What version of Axis2?
> What version of Axiom? Code snippet showing what you are trying to do,
> etc.
>
> Andreas
>
> 2009/11/19 Håkon Sagehaug :
> > Hi
> >
> > Anybody did this, go from adb object through a xslt transfomation?
> >
> > Or having problem getting values out from a XML message when the tyep
> > attribute is used for the data type of the element.
> >
> > cheers, Håkon
> >
> > 2009/11/18 Håkon Sagehaug 
> >>
> >> Hi
> >>
> >> To provide more information, we want to do xslt transformation to our
> >> generated client side object. And  as far as I know we need the
> OmElement of
> >> the generated type to do so, but when this don't give back the values
> just
> >> the XML with no values, there is not much to transform. So we need a
> hint on
> >> how this can be done.
> >>
> >>
> >>
> >> cheers, håkon
> >>
> >> 2009/11/18 Håkon Sagehaug 
> >>>
> >>> Hi all,
> >>>
> >>> Any tips on this. stange if it won't work?
> >>>
> >>> 2009/11/17 Håkon Sagehaug 
> >>>>
> >>>> Hi all,
> >>>>
> >>>> I've got a client that calls a ws and using adb as the
> >>>> databinding(client side), then we want to get a string representation
> of the
> >>>> obejct.  We execute object.getOMElement(), the method returns only the
> xml
> >>>> element and not the actual value inside the element. So this element
> here
> >>>>
> >>>>blastp
> >>>>
> >>>> Would returns this string
> >>>>
> >>>> 
> >>>>
> >>>> We where wondering if it had anything to to with the xsi:type
> attribute?
> >>>> Any tips on how to solve this, or another way of getting a string
> >>>> representatioon of the object using adb as the databinding?
> >>>>
> >>>> cheers, Håkon
> >>>>
> >>>> --
> >>>> Håkon Sagehaug, Scientific Programmer
> >>>> Parallab, Bergen Center for Computational Science (BCCS)
> >>>> UNIFOB AS (University of Bergen Research Company)
> >>>> hakon.sageh...@bccs.uib.no, phone +47 55584125
> >>>
> >>>
> >>>
> >>> --
> >>> Håkon Sagehaug, Scientific Programmer
> >>> Parallab, Bergen Center for Computational Science (BCCS)
> >>> UNIFOB AS (University of Bergen Research Company)
> >>> hakon.sageh...@bccs.uib.no, phone +47 55584125
> >>
> >>
> >>
> >> --
> >> Håkon Sagehaug, Scientific Programmer
> >> Parallab, Bergen Center for Computational Science (BCCS)
> >> UNIFOB AS (University of Bergen Research Company)
> >> hakon.sageh...@bccs.uib.no, phone +47 55584125
> >
> >
> >
> > --
> > Håkon Sagehaug, Scientific Programmer
> > Parallab, Bergen Center for Computational Science (BCCS)
> > UNIFOB AS (University of Bergen Research Company)
> > hakon.sageh...@bccs.uib.no, phone +47 55584125
> >
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [axis2] Need help with HTTPS

2009-11-19 Thread Amila Suriarachchi
15:31:39 +0200
> > From: tomaz.majerh...@arnes.si
> > To: axis-user@ws.apache.org
> > Subject: error sending S/MIME
> >
> > Env:
> > OS: Win XP
> > Tomcat: 6.0.18
> > java: 1.6.0_10-b33
> > axis2: 1.4.1
> >
> >
> > I have tomcat web application which use crypto and bouncy castle for
> signing the mail and it work well.
> >
> > But when I'm using same class in my soap service(axis2) I get
> >
> > error:
> > javax.mail.MessagingException: IOException while sending message;
> > nested exception is:
> > javax.activation.UnsupportedDataTypeException: no object DCH for MIME
> type application/pkcs7-signature; name=smime.p7s; smime-type=signed-data
> >
> >
> >
> > Do any body know what is problem.
> >
> >
> > Regards
> >
>
> --
> Windows Live™: Keep your life in sync. Check it 
> out.<http://windowslive.com/explore?ocid=PID23384::T:WLMTAGL:ON:WL:en-US:NF_BR_sync:082009>
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Axis 1.x to Axis2 - intercepting all messages?

2009-11-13 Thread Amila Suriarachchi
OutputFactory map =1
>
> ,805 axiom.om.util.StAXUtils  - XMLStreamWriter is
> com.ctc.wstx.sw.SimpleNsStreamWriter
>
> ,837 axiom.soap.impl.builder.StAXSOAPModelBuilder  - Build the OMElement
> multipleParameters by the StaxSOAPModelBuilder
>
> ,837 axiom.soap.impl.builder.StAXSOAPModelBuilder  - Build the OMElement
> price by the StaxSOAPModelBuilder
>
> ,837 axiom.soap.impl.builder.StAXSOAPModelBuilder  - Build the OMElement
> itemId by the StaxSOAPModelBuilder
>
> ,837 axiom.soap.impl.builder.StAXSOAPModelBuilder  - Build the OMElement
> description by the StaxSOAPModelBuilder
>
> ,837 axiom.soap.impl.builder.StAXSOAPModelBuilder  - Build the OMElement
> itemName by the StaxSOAPModelBuilder
>
> ,837 axiom.om.impl.MTOMXMLStreamWriter  - Calling MTOMXMLStreamWriter.flush
>
> ,852 axis2.context.ConfigurationContext  - messageID is null.
>
> ,852 axis2.rpc.receivers.RPCMessageReceiver  - In
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(MessageContext,
> MessageContext) for  class sample.service.SampleService - SampleService
>
> ,915 ice.SampleService  - In SampleService.multipleParameters price=20.2
> itemId=999 description=blah blah, woof woof itemName=nothing
>
> ,930 axiom.om.util.StAXUtils  - XMLStreamWriter is
> com.ctc.wstx.sw.SimpleNsStreamWriter
>
> ,930 axiom.om.impl.MTOMXMLStreamWriter  - Calling MTOMXMLStreamWriter.flush
>
> ,930 axis2.engine.Phase  - [MessageContext:
> logID=urn:uuid:23202C4F3879831BA71257461489961] Checking pre-condition for
> Phase "OperationOutPhase"
>
> ,930 axis2.engine.Phase  - [MessageContext:
> logID=urn:uuid:23202C4F3879831BA71257461489961] Invoking phase
> "OperationOutPhase"
>
> ,930 axis2.engine.Phase  - [MessageContext:
> logID=urn:uuid:23202C4F3879831BA71257461489961] Invoking Handler
> 'DispatchOperationHandler' in Phase 'OperationOutPhase'
>
> ,930 axis2.engine.Phase  - [MessageContext:
> logID=urn:uuid:23202C4F3879831BA71257461489961] Checking post-conditions for
> phase "OperationOutPhase"
>
> ,930 axis2.engine.Phase  - [MessageContext:
> logID=urn:uuid:23202C4F3879831BA71257461489961] Checking pre-condition for
> Phase "RMPhase"
>
> ,930 axis2.engine.Phase  - [MessageContext:
> logID=urn:uuid:23202C4F3879831BA71257461489961] Invoking phase "RMPhase"
>
> ,930 axis2.engine.Phase  - [MessageContext:
> logID=urn:uuid:23202C4F3879831BA71257461489961] Checking post-conditions for
> phase "RMPhase"
>
> ,930 axis2.engine.Phase  - [MessageContext:
> logID=urn:uuid:23202C4F3879831BA71257461489961] Checking pre-condition for
> Phase "PolicyDetermination"
>
> ,930 axis2.engine.Phase  - [MessageContext:
> logID=urn:uuid:23202C4F3879831BA71257461489961] Invoking phase
> "PolicyDetermination"
>
> ,930 axis2.engine.Phase  - [MessageContext:
> logID=urn:uuid:23202C4F3879831BA71257461489961] Checking post-conditions for
> phase "PolicyDetermination"
>
> ,930 axis2.engine.Phase  - [MessageContext:
> logID=urn:uuid:23202C4F3879831BA71257461489961] Checking pre-condition for
> Phase "MessageOut"
>
> ,930 axis2.engine.Phase  - [MessageContext:
> logID=urn:uuid:23202C4F3879831BA71257461489961] Invoking phase "MessageOut"
>
> ,930 axis2.engine.Phase  - [MessageContext:
> logID=urn:uuid:23202C4F3879831BA71257461489961] Invoking Handler
> 'AddressingOutHandler' in Phase 'MessageOut'
>
> ,930 axis2.engine.Phase  - [MessageContext:
> logID=urn:uuid:23202C4F3879831BA71257461489961] Checking post-conditions for
> phase "MessageOut"
>
> ,930 axis2.engine.Phase  - [MessageContext:
> logID=urn:uuid:23202C4F3879831BA71257461489961] Checking pre-condition for
> Phase "Security"
>
> ,930 axis2.engine.Phase  - [MessageContext:
> logID=urn:uuid:23202C4F3879831BA71257461489961] Invoking phase "Security"
>
> ,930 axis2.engine.Phase  - [MessageContext:
> logID=urn:uuid:23202C4F3879831BA71257461489961] Checking post-conditions for
> phase "Security"
>
> ,930 axiom.om.OMOutputFormat  - Start getContentType: OMOutputFormat [
> mimeBoundary =null rootContentId=null doOptimize=false doingSWA=false
> isSOAP11=false charSetEncoding=UTF-8 xmlVersion=null contentType=null
> ignoreXmlDeclaration=false autoCloseWriter=true actionProperty=null
> optimizedThreshold=0]
>
> ,930 axiom.om.OMOutputFormat  - getContentType= {application/soap+xml}
> OMOutputFormat [ mimeBoundary =null rootContentId=null doOptimize=false
> doingSWA=false isSOAP11=false charSetEncoding=UTF-8 xmlVersion=null
> contentType=application/soap+xml ignoreXmlDeclaration=false
> autoCloseWriter=true actionPro

Re: Axis2: NoSuchMethodError addAnonymousOperations()V

2009-11-04 Thread Amila Suriarachchi
I think you use an older version to generate code. use the same version and
see.

thanks,
Amila.

On Tue, Nov 3, 2009 at 2:27 AM, laredotornado wrote:

>
> Hi,
>
> I'm trying to upgrade our Axis2 client to 1.5.1 (we are using Java 1.5),
> but
> am getting an error when running the generated client against our web
> service.  The stack trace is below.  I'm using Maven 1.1 to generate the
> client.  Basically, do any of you know what jar file is generating the call
> to "addAnonymousOperations()V"?
>
> Thanks, - Dave
>
>
> Here is the maven.xml file ...
>
> 
>  
> />
> src="
> http://localhost:8080//apps/dor/dmv/driver/matching//services/MatchingService?wsdl
> "
> dest="${downloadedWSDL}"
> username="dalvarado"
> password="password" />
>
> classpathref="maven.dependency.classpath">
>  
>  
>  
>  
>
>  debug="true"
>  debuglevel="vars,lines,source"
>  destdir="${maven.build.dest}"
>  excludes="**/package.html"
>  srcdir="${basedir}/target/src" >
> 
>  
> 
>
>  
> 
>
> Here is the stack trace ...
>
>
> myco.dor.dmv.driver.matching.soap.MatchingServiceStub.addAnonymousOperations()V
> java.lang.NoSuchMethodError:
>
> myco.dor.dmv.driver.matching.soap.MatchingServiceStub.addAnonymousOperations()V
>at
>
> myco.dor.dmv.driver.matching.soap.MatchingServiceStub.populateAxisService(MatchingServiceStub.java:42)
>at
>
> myco.dor.dmv.driver.matching.soap.MatchingServiceStub.(MatchingServiceStub.java:116)
>at
>
> myco.dor.dmv.driver.matching.soap.MatchingServiceStub.(MatchingServiceStub.java:105)
>at
>
> myco.dor.dmv.driver.matching.soap.MatchingServiceStub.(MatchingServiceStub.java:154)
>at
> myco.dor.dmv.driver.matching.test.Base.createClientStub(Base.java:57)
>at myco.dor.dmv.driver.matching.test.Base.setUp(Base.java:48)
>at
>
> myco.dor.dmv.driver.matching.test.MatchingServiceTestBase.setUp(MatchingServiceTestBase.java:28)
>at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:195)
>at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:250)
>at
> org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
>at
> org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
>at
> org.apache.commons.jelly.tags.core.OtherwiseTag.doTag(OtherwiseTag.java:41)
>at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:250)
>at
> org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
>at
> org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
>at
> org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
>at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:250)
>at
> org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
>at
> org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
>at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:42)
>at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:250)
>at
> org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
>at
>
> org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.java:83)
>at
>
> org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAction(MavenGoalTag.java:116)
>at org.apache.maven.werkz.Goal.fire(Goal.java:691)
>at org.apache.maven.werkz.Goal.attain(Goal.java:623)
>at
> org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:712)
>at org.apache.maven.MavenSession.attainGoals(MavenSession.java:265)
>at org.apache.maven.cli.App.doMain(App.java:307)
>at org.apache.maven.cli.App.main(App.java:217)
>at com.werken.forehead.Forehead.run(Forehead.java:551)
>at com.werken.forehead.Forehead.main(Forehead.java:581)
> --
> View this message in context:
> http://old.nabble.com/Axis2%3A-NoSuchMethodError-addAnonymousOperations%28%29V-tp26157828p26157828.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Axis 1.x to Axis2 - intercepting all messages?

2009-11-04 Thread Amila Suriarachchi
On Wed, Nov 4, 2009 at 4:43 AM, William Walsh wrote:

>  Currently we use Axis 1.4 for our application and via the
> server_config.wsdd file (provider="java:”) and extending
> org.apache.axis.providers.java.MsgProvider and
> org.apache.axis.providers.java.RPCProvider we intercept all messages and do
> our own routing.
>
>
>
> Obviously things are different in Axis2; but, from all the reading I've
> done it's not clear if we can do equivalent processing via a messageReceiver
> or via a Handler? We don't do any processing on the SOAP messages now, but
> get the method name, etc. from the MessageContext to invoke our method via
> reflection.  If it's done via a Handler in Axis2 how do we specify the phase
> settings in axis2.xml to specify the last Handler and does this have to be
> done via a Module?  (Part of my confusion comes from not finding an
> explanation of what RMPhase is.)  Again, if it's via a Handler (as this
> thread suggests: http://marc.info/?t=12198814691&r=1&w=2), I'm
> confused by what we would return from the Handler invoke method; that is,
> SUSPEND, ABORT, or CONTINUE don't seem to specify what we need to achieve,
> which would be more along the lines of DONE.
>

for your case better to use a message receiver rather than a handler.
this[1] may help as well.

thanks,
Amila.

[1] http://wso2.org/library/articles/extending-axis2

>
>
> Thanks for any help available,
>
> William
>
>
>
> The information in this email is confidential and may be legally privileged.
> It is intended solely for the addressee. Access to this email by anyone else
> is unauthorized. If you are not the intended recipient, any disclosure,
> copying, distribution or any action taken or omitted to be taken in reliance
> on it, is prohibited and may be unlawful. If you are not the intended
> addressee please contact the sender and dispose of this e-mail. Thank you.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Problem upgrading from Axis2/Java 1.4.1 to 1.5.1

2009-11-02 Thread Amila Suriarachchi
set following properties in services.xml

true
false

thanks,
Amila.

On Mon, Nov 2, 2009 at 10:29 PM, SGE0  wrote:

>
> Hi,
>
> we encounter following problem:
>
> In version 1.4.1 we needed to generate the wsdl file  and put it in the
> services/ folder so a customer asking the wsdl content got back the wsdl
> file content (and not a wsdl generated based on the services.xml file).
>  The
> reason is that if the Axis2 context is behind  a proxy (there is a
> difference between the internal and external address the customer calls) it
> should be possible to put the external address in the wsdl.
>
> In version 1.5.1 we see a behavioral change. We have the impression that
> the
> wsdl is again generated from the services.xml file (as the soapaddress in
> the wsdl the customer gets back is not the address defined in the wsdl file
> we generated).
>
>
> Is this correct ? If so, how can we have the same behavior as in v1.4.1 ?
>
> This is blocking for us to upgrade. We must be able to pass the customer
> the
> external 'proxy' address and not the internal ip-address (which is behind
> the proxy and has no value for the customer).
>
>
> --
> View this message in context:
> http://old.nabble.com/Problem-upgrading-from-Axis2-Java-1.4.1-to-1.5.1-tp26157742p26157742.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: [Axis2] with Rampart -- XMLStreamException "the prefix ==> Already exists for namespace

2009-10-29 Thread Amila Suriarachchi
I removed this check please have a look at with a nightly build.

thanks,
Amila.

On Thu, Oct 29, 2009 at 6:47 PM, srini.maran  wrote:

>
> Hi Amila.
>
>   Thanks for your response.
>
>   I don't get it "Can you check this by using a response get without
> rampart? ". Do you mean to say run
>   the client without Rampart enabled? or you are talking different.
>
>   My client and server code is working fine without Rampart. It's failing
> when i enable Rampart. Basically,
>   it's failing in the client code when stub generates SOAP header with auth
> info(using policy file). It could be same issue in
>   server side too.
>
>   Below is my client code:
>
>   HubServiceStub stub = new
> HubServiceStub("http://localhost:8180/";);
>   ServiceClient client = stub._getServiceClient();
>
>   Options options = client.getOptions();
>   options.setProperty(RampartMessageData.KEY_RAMPART_POLICY,
>loadPolicy("plain-policy-client.xml"));
>   options.setUserName("libuser");
>   options.setPassword("books");
>   client.engageModule("rampart");
>
>   Channel2 chl1 = new Channel2();
>   // popultes the inpuit object
>   chl1.setAdmin("")
>   
>   .
>   MessageE resp = stub.hubFeed(chl1);  --> throws exception.
>
>I am getting the exception when i invoke the service hubFeed.
>
>I am able to successfully test the Rampart & IBM article WS-security
> sample apps with no issue. It's a
>    simple service with no complex schema.
>
>Please let me know if you need any further details.
>
>I will really appreciate you on helping me to solve this issue.
>
> Thanks
> Srini
>
>
>
> Amila Suriarachchi wrote:
> >
> > On Wed, Oct 28, 2009 at 1:31 AM, Andreas Veithen
> > wrote:
> >
> >> Srini,
> >>
> >> Here is the explanation of this issue, as I see it:
> >>
> >> - When WS-Security is disabled, ADB streams the XML data directly to
> >> the wire, using an XMLStreamWriter from Woodstox (which is indeed
> >> wrapped to handle MTOM, but this is not important). No problem here
> >> because the XMLStreamWriter from Woodstox conforms to StAX and ADB in
> >> Axis2 1.5 uses the XMLStreamWriter correctly (up to a minor issue
> >> fixed in trunk).
> >>
> >> - When WS-Security is enabled, the XML can't be streamed to the wire
> >> directly because Rampart needs to post-process the response. ADB
> >> handles this by using an XMLStreamWriter implementation that will
> >> build an Axiom (see AXIS2-4413). This is the MTOMAwareOMBuilder that
> >> you see.
> >>
> >> The problem is that MTOMAwareOMBuilder is not a correct implementation
> >> of XMLStreamWriter. While the sequence of events produced by ADB is
> >> correct (otherwise it would have failed with Woodstox),
> >> MTOMAwareOMBuilder thinks that there is a collision between two
> >> namespace bindings. The code in this class at least has two issues:
> >>
> >> - writeStartElement, writeAttribute, writeNamespace and
> >> writeDefaultNamespace may all modify the namespace context (by calling
> >> getOMNamespace). This is incorrect: according to the specs, only
> >> setPrefix and setDefaultNamespace modify the namespace context of the
> >> XMLStreamWriter.
> >>
> >
> > ADB write element method looks like this.
> >
> > xmlWriter.writeStartElement(prefix, localPart, namespace);
> > xmlWriter.writeNamespace(prefix, namespace);
> > xmlWriter.setPrefix(prefix, namespace);
> >
> > does the spec specify any order?
> >
> >
> >
> >>
> >> - The namespace context is not scoped. Normally, the namespace
> >> bindings declared by setPrefix and setDefaultNamespace only remain
> >> visible in the current element. This is not the case (see the usage of
> >> a simple HashMap in MTOMAwareOMBuilder and OMStreamNamespaceContext.
> >>
> >> In your case, the problem is probably caused by the second issue:
> >> MTOMAwareOMBuilder probably believes that there is a collision between
> >> a newly declared namespace binding and an existing one that actually
> >> should be out of scope.
> >>
> >
> > can you check this by using a response get without rampart? if so we can
> > remove this check.
> >
> > thanks,
> > Amila.
> >
> >>
> >> Regards,
> >>
> >> Andreas
> >>
>

Re: [Axis2] with Rampart -- XMLStreamException "the prefix ==> Already exists for namespace

2009-10-29 Thread Amila Suriarachchi
y WSDL2JAVA), the "MTOMAwareXMLStreamWriter
> > xmlWriter" parameter gets an
> > instance of MTOMAwareOMBuilder if WS-Security is enabled.
> > Whereas, without WS-Security it gets an instance of
> >
> > org.apache.axis2.databinding.utils.writer.MTOMAwareXMLSerializer which
> uses
> > MTOMXMLStreamWriter which in turn uses
> > com.ctc.wstx.sw.SimpleNsStreamWriter to
> > serialize the response.
> > I also tried using AXIS 1.4 without any success. Any idea how
> > can this problem can be solved?
> > Is there a way to let Rampart know which serializer should be
> > used? Am I missing any
> > configuration details of Rampart? "
> >
> > Thanks
> > Srini Maran
> >
> > http://www.nabble.com/file/p26083056/Error1.rtf Error1.rtf
> > http://www.nabble.com/file/p26083056/Client.rtf Client.rtf
> > --
> > View this message in context:
> http://www.nabble.com/-Axis2--with-RampartXMLStreamException-%22the-prefix-%3D%3D%3E-Already-exists-for-namespace-tp26083056p26083056.html
> > Sent from the Axis - User mailing list archive at Nabble.com.
> >
> >
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: wsdl2java and Two Similar Elements

2009-10-29 Thread Amila Suriarachchi
On Thu, Oct 29, 2009 at 12:28 PM, Matthew McKenna wrote:

> Hello-
>
> I have a WSDL file that imports several XML schemas.  One of those schemas
> has the following:
>
> 
>  
> 
> 
> 
>   
> 
>
> followed very closely by:
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> In order to generate the appropriate Java code, I am using the following in
> my build.xml file:
>
> classname="org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask">
>
>
>
>
>
>output="generated/src"
>serverSide="false"
>all="true"
> wraparrays="true"
>verbose="true">
>  package="${A-package-name}"/>
> package="${services-package-name}"/>
> package="${exchange-package-name}"/>
> package="${types-package-name}"/>
>
>
>
>
> The problem I am running in to is that wsdl2java generates a ITEMID.java
> file, but the class declaration
> and constructor are ItemId.  All references to the ITEMID object in other
> generated code 'cannot be resolved'.
>
> My question - Is there some way I can generate the two item id objects?
>
> Thanks very much for any assistance.
>

this seems to be a problem with ADB. please log a jira with your wsdl file.

try with another databinding framework eg -d xmlbeans, -d jaxbri

thanks,
Amila.

>
> Matthew McKenna
> mtmckenna...@mac.com
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: use supplied WSDL instead of generated WSDL: ...ADBException: Unexpected subelement

2009-10-29 Thread Amila Suriarachchi
nl>>
> Ws_Users
> 
>  xmlns:ax22="http://webservices.organization.nl/xsd";<http://webservices.organization.nl/xsd>attributeFormDefault="qualified"
>  elementFormDefault="qualified"
> targetNamespace="http://webservices.organization.nl";<http://webservices.organization.nl>
> >
>  namespace="http://webservices.organization.nl/xsd";<http://webservices.organization.nl/xsd>
> />
> 
> 
> 
>  nillable="true" type="xs:string"/>
>  nillable="true" type="xs:string"/>
> 
> 
> 
> 
> 
> 
>  nillable="true" type="ax22:WsResponse"/>
> 
> 
> 
> 
> 
>  elementFormDefault="qualified" targetNamespace=
> "http://webservices.organization.nl/xsd";<http://webservices.organization.nl/xsd>
> >
> 
> 
>  nillable="true" type="xs:string"/>
>  type="xs:int"/>
>  nillable="true" type="xs:string"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> *** EXCEPTION WHEN RUNNING WS CLIENT:*
> (I've generated the stub classes with wsdl2java)
> Exception in thread "main" org.apache.axis2.AxisFault:
> org.apache.axis2.databinding.ADBException: Unexpected subelement
> debugMessage
> at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
> at
> nl.organization.webservices.Ws_UsersStub.fromOM(Ws_UsersStub.java:19397)
> at
> nl.organization.webservices.Ws_UsersStub.removeUser(Ws_UsersStub.java:1384)
> at test.Client.reqRemoveUser(Client.java:65)
> at test.Client.main(Client.java:14)
> 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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
>
> Any help will be welcome!
> Thanks!
>
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Exception when execute client to invoke axis2 webservice

2009-10-24 Thread Amila Suriarachchi
what is the axis2 version you use? make sure you use all jar files from one
distribution.

thanks,
Amila.

On Sun, Oct 25, 2009 at 1:10 AM, Rajend  wrote:

>
> Getting following exception when executing my client java file.
>
> Exception in thread "main" java.lang.NoSuchMethodError:
>
> org.apache.axis2.description.HandlerDescription.(Ljavax/xml/namespace/QName;)V
>at
>
> org.apache.axis2.transport.AbstractTransportSender.(AbstractTransportSender.java:55)
>at
>
> org.apache.axis2.transport.local.LocalTransportSender.(LocalTransportSender.java:37)
>at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
> Source)
>at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> Source)
>at java.lang.reflect.Constructor.newInstance(Unknown Source)
>at java.lang.Class.newInstance0(Unknown Source)
>at java.lang.Class.newInstance(Unknown Source)
>at
>
> org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:671)
>at
>
> org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:121)
>at
>
> org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:707)
>at
>
> org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:116)
>at
>
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
>at
>
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:206)
>at
>
> org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.java:146)
>at
> org.apache.axis2.client.ServiceClient.(ServiceClient.java:139)
>at
> org.apache.axis2.client.ServiceClient.(ServiceClient.java:245)
>at
>
> org.apache.axis2.rpc.client.RPCServiceClient.(RPCServiceClient.java:48)
>at my.client.TestClient.main(TestClient.java:20)
> My java file:
> public class TestClient {
> public static void main(String args[])
>{
> RPCServiceClient serviceClient = null;
>try {
>serviceClient = new RPCServiceClient();
>Options options = serviceClient.getOptions();
>EndpointReference targetEPR = new
>   EndpointReference("
> http://localhost:8080/axis2/services/EJBService";);
>options.setTo(targetEPR);
>QName hello = new QName("http://ejb.my/xsd";,
> "check");
>Object[] helloArgs = new Object[] {"John"};
>
>  System.out.println(serviceClient.invokeBlocking(hello,
>   helloArgs).getFirstElement().getText());
>} catch (AxisFault e) {
>// TODO Auto-generated catch block
>e.printStackTrace();
>    }
>    }
> }
>
> Regards
> Raj
> --
> View this message in context:
> http://www.nabble.com/Exception-when-execute-client-to-invoke-axis2-webservice-tp26042319p26042319.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Axis 2 (1.5) - Unable to find service for POJO

2009-10-22 Thread Amila Suriarachchi
WeatherServiceHttpSoap11Endpoint" />
>   wsaw:Action="urn:getWeatherServiceHttpSoap11EndpointResponse" />
>   wsaw:Action="urn:getWeatherServiceHttpSoap11EndpointServiceException" />
>  
>  
>   wsaw:Action="urn:getWeatherServiceHttpSoap11EndpointAddress" />
>   message="ns:getWeatherServiceHttpSoap11EndpointAddressResponse"
> wsaw:Action="urn:getWeatherServiceHttpSoap11EndpointAddressResponse" />
>  
>  
>   wsaw:Action="urn:getWeatherServiceHttpSoap12Endpoint" />
>   wsaw:Action="urn:getWeatherServiceHttpSoap12EndpointResponse" />
>   wsaw:Action="urn:getWeatherServiceHttpSoap12EndpointServiceException" />
>  
>  
>   wsaw:Action="urn:getWeatherServiceHttpSoap12EndpointAddress" />
>   message="ns:getWeatherServiceHttpSoap12EndpointAddressResponse"
> wsaw:Action="urn:getWeatherServiceHttpSoap12EndpointAddressResponse" />
>  
>  
>   type="ns:WeatherServicePortType">
>  http://schemas.xmlsoap.org/soap/http";
> style="document" />
>  
>   style="document" />
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>   soapAction="urn:getWeatherServiceHttpSoap11EndpointAddress"
> style="document"
> />
>  
>  
>  
>  
>  
>  
>  
>  
>   style="document" />
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>   soapAction="urn:getWeatherServiceHttpSoap12EndpointAddress"
> style="document"
> />
>  
>  
>  
>  
>  
>  
>  
>  
>   type="ns:WeatherServicePortType">
>  http://schemas.xmlsoap.org/soap/http";
> style="document" />
>  
>   style="document" />
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>   soapAction="urn:getWeatherServiceHttpSoap11EndpointAddress"
> style="document"
> />
>  
>  
>  
>  
>  
>  
>  
>  
>   style="document" />
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>   soapAction="urn:getWeatherServiceHttpSoap12EndpointAddress"
> style="document"
> />
>  
>  
>  
>  
>  
>  
>  
>  
>   type="ns:WeatherServicePortType">
>  
>  
>   location="WeatherService/getWeatherServiceHttpSoap11Endpoint" />
>  
>   />
>  
>  
>   />
>  
>  
>  
>   location="WeatherService/getWeatherServiceHttpSoap11EndpointAddress" />
>  
>   part="getWeatherServiceHttpSoap11EndpointAddress" />
>  
>  
>   part="getWeatherServiceHttpSoap11EndpointAddress" />
>  
>  
>  
>   location="WeatherService/getWeatherServiceHttpSoap12Endpoint" />
>  
>   />
>  
>  
>   />
>  
>  
>  
>   location="WeatherService/getWeatherServiceHttpSoap12EndpointAddress" />
>  
>   part="getWeatherServiceHttpSoap12EndpointAddress" />
>  
>  
>   part="getWeatherServiceHttpSoap12EndpointAddress" />
>  
>  
>  
>  
>   binding="ns:WeatherServiceSoap11Binding">
>   location="
> http://localhost:9081/Axis2Weather/services/WeatherService.WeatherServiceHttpSoap11Endpoint/
> "
> />
>  
>   binding="ns:WeatherServiceSoap12Binding">
>   location="
> http://localhost:9081/Axis2Weather/services/WeatherService.WeatherServiceHttpSoap12Endpoint/
> "
> />
>  
>   binding="ns:WeatherServiceHttpBinding">
>   location="
> http://localhost:9081/Axis2Weather/services/WeatherService.WeatherServiceHttpEndpoint/
> "
> />
>  
>  
>  
>
> Any advice on why I cannot see the WeatherService (when the application is
> successfully deployed as EAR and app started successfully) will be
> appreciated.
>
>
>
>
>
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Axis-2-%281.5%29---Unable-to-find-service-for-POJO-tp26012836p26012836.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Endpoint in wsdl using wrong ip address

2009-10-21 Thread Amila Suriarachchi
On Wed, Oct 21, 2009 at 6:15 PM, Krystian Szczesny <
krystian.szcze...@intecbilling.com> wrote:

>  Hi,
>
>
>
> I’ve changed my service.xml file to have:
>
> true
>
> true
>
you can keep the correct host name in wsdl file and set above parameter to
false.

thanks,
Amila.

>
>
> I expected to get a WSDL with the same endpoint address I can see using
> List Services page.
>
> On the List Services page I get endpoint address with hostname but when I
> load the WSDL I can see IP address.
>
> Unfortunately this IP address points to a network interface which is not
> accessible for me as the client.
>
>
>
> Could you please help me & point me where I could find more information
> about how to make it use hostname rather than IP address or how to choose
> the correct network interface?
>
>
>
> My setup:
>
> Axis2 1.5
>
> Deployed war file on Jetty 6.1.11
>
> HP-UX 11
>
>
>
> Thanks,
>
> Krystian
>
>
>
>
>
> *-- *
>
> *KRYSTIAN SZCZESNY*
>  This e-mail and any attachments are confidential and may also be legally
> privileged and/or copyright material of Intec Telecom Systems PLC (or its
> affiliated companies). If you are not an intended or authorised recipient
> of this e-mail or have received it in error, please delete it immediately
> and notify the sender by e-mail. In such a case, reading, reproducing,
> printing or further dissemination of this e-mail or its contents is
> strictly
> prohibited and may be unlawful.
> Intec Telecom Systems PLC does not represent or warrant that an attachment
> hereto is free from computer viruses or other defects. The opinions
> expressed in this e-mail and any attachments may be those of the author and
>
> are not necessarily those of Intec Telecom Systems PLC.
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Axis 2 - Unable to see my new service from Axis2 Admin console

2009-10-20 Thread Amila Suriarachchi
On Tue, Oct 20, 2009 at 3:02 AM, mule_user  wrote:

>
> I am using the link for learning:
>
> https://www.wso2.org/library/90
>
> Ax2
> |
> ---src
>|
> ---samples.demo
>  |
>   ---Book.java
>   BookService.java
> WebContent
>   |
>WEB-INF
>  |
>  ---lib (has all jars from Axis 2)
>  |
>   services
> |
>  BookService
>|
> META-INF
>   |
>---services.xml
>
> ///
> package samples.demo;
>
> public class Book {
>private String title;
>private String isbn;
>private String author;
>
>public String getIsbn() {
>return isbn;
>}
>
>public void setIsbn(String isbn) {
>this.isbn = isbn;
>}
>
>public String getTitle() {
>return title;
>}
>
>public void setTitle(String title) {
>this.title = title;
>}
>
>public String getAuthor() {
>return author;
>}
>
>public void setAuthor(String author) {
>this.author = author;
>}
> }
> ///
> package samples.demo;
>
> public class BookService {
>private Book onlyBook;
>
>public BookService() {
>onlyBook = new Book();
>onlyBook.setAuthor("Dan Diephouse");
>onlyBook.setTitle("Using Axis2");
>onlyBook.setIsbn("0123456789");
>}
>
>public Book[] getBooks() {
>return new Book[]{onlyBook};
>}
>
>public Book findBook(String isbn) {
>if (isbn.equals(onlyBook.getIsbn()))
>return onlyBook;
>
>return null;
>}
> }
> 
> services.xml
>
> 
>
>
>Book sample service
>
> locked="false">samples.demo.BookService
>
> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>
>
> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>
>
> 
>



try something like this,



http://www.w3.org/2004/08/wsdl/in-only";

class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
http://www.w3.org/2004/08/wsdl/in-out";

class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>

test.lockhead.service.TestService


thanks,
Amila.



> /
> web.xml
>
> 
>  xmlns="http://java.sun.com/xml/ns/j2ee";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
>
>Axis2WebWs
>
>Apache-Axis Servlet
>AxisServlet
>
>  org.apache.axis2.transport.http.AxisServlet
>1
>
>
>
>AxisServlet
>/servlet/AxisServlet
>
>
>AxisServlet
>*.jws
>
>
>AxisServlet
>/services/*
>
> 
>
> /
>
> I have successfully deployed axis2.war. I can successfully see:
>
> http://localhost:9081/axis2/services/listServices
>
> which only shows getVersion
>
> My question:
>
> Why can I not see getBooks and findBooks method of my new service
> (BookService) in the url above?
>
> I can successfully see WSDL under:
>
> http://localhost:9081/Ax2/services/BookService?wsdl
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Axis-2---Unable-to-see-my-new-service-from-Axis2-Admin-console-tp25966041p25966041.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Axis2 - How to write client without using AXIOM API, similar to Axis1

2009-10-20 Thread Amila Suriarachchi
hi,
please read the user guide[1].

thanks,
Amila.

[1]http://ws.apache.org/axis2/1_5/toc.html

On Wed, Oct 21, 2009 at 2:16 AM, mule_user  wrote:

>
> I am using the post below for learning purses:
>
> https://www.wso2.org/library/90
>
> I would like to know how to write client code using the stubs etc. that get
> created WITHOUT using AXIOM API. I am familiar with Axis1.
>
> My questions:
>
> 1. Can I write client code similar to Axis1 that does not require using
> AXIOM API?
>
> 2. Could anyone provide some example of doing so?
>
> 3. In Axis1, I can write client without importing any Axis1 specific class.
> An example of client code in Axis1 is similar to the following:
>
>MyService service = new MyServiceLocator();
>MyObject obj = service.getMyObj();
>int ret = obj.add(1, 2);
>
> In the client code above for Axis1, I only need to call the corresponding
> Service and ServiceLocator class. I do not need to know any other class
> specific to Axis1.
>
> Could you please provide similar example of doing so without using the
> AXIOM
> API?
>
> I tried coding something similar to the following for Axis2 client:
>
>CalculatorService service = new CalculatorServiceLocator();
>Call call= (Call) service.createCall();
>String
> endpoint="http://localhost:9081/Axis2WebWs/services/CalculatorService"; ;
>call.setTargetEndpointAddress( new java.net.URL(endpoint) );
>QName operationName = new QName("add");
>call.setOperationName(operationName);
>Integer ret = (Integer) call.invoke( new Object[] { 1, 2} );
>
> It threw exception in invoke method as:
>
> The ServiceClass object does not implement the required method in the
> following form: OMElement add(OMElement e)
>at
>
> org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLogic(RawXMLINOutMessageReceiver.java:93)
>at
>
> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusinessLogic(AbstractInOutSyncMessageReceiver.java:42)
>
> My services.xml is:
>
> 
>
>Simple Calculator Service
>
>
>org.server.Calculator
>
>
> class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
>
>
> 
>
> The method add is:
>
> Integer add(int i, int j)
>
> Is there any way to write client code (similar to Axis1) that does not
> involve AXIOM API? Please provide an example.
>
> 4. In the generated wsdl, I see soapbinding11 and soapbing12. Where are
> there two different bindings generated?
>
> The generated wsdl is:
>
>  
>  
>  
>  
>  
>   />
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>   type="ns:CalculatorServicePortType">
>  http://schemas.xmlsoap.org/soap/http";
> style="document" />
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>   type="ns:CalculatorServicePortType">
>  http://schemas.xmlsoap.org/soap/http";
> style="document" />
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>   type="ns:CalculatorServicePortType">
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>   binding="ns:CalculatorServiceSoap11Binding">
>   location="
> http://localhost:9081/Axis2WebWs/services/CalculatorService.CalculatorServiceHttpSoap11Endpoint/
> "
> />
>  
>   binding="ns:CalculatorServiceSoap12Binding">
>   location="
> http://localhost:9081/Axis2WebWs/services/CalculatorService.CalculatorServiceHttpSoap12Endpoint/
> "
> />
>  
>   binding="ns:CalculatorServiceHttpBinding">
>   location="
> http://localhost:9081/Axis2WebWs/services/CalculatorService.CalculatorServiceHttpEndpoint/
> "
> />
>  
>  
>  
>
> --
> View this message in context:
> http://www.nabble.com/Axis2---How-to-write-client-without-using-AXIOM-API%2C-similar-to-Axis1-tp25982259p25982259.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Problems with Date objects on Axis2

2009-10-20 Thread Amila Suriarachchi
this[1] may help you.

Amila

[1]
http://amilachinthaka.blogspot.com/2009/09/handling-date-and-datetime-with-axis2.html

2009/10/19 Guilherme Fré 

>  Hi guys,
>
>
>
> I’ve developed a WS using Axis2 and I’m trying to consume it using a C#.Net
> client.
>
>
>
> I have one method that require data parameters and I’m populating them with
> DateTime objects from .Net.
>
>
>
> Also I have noticed that the parameter I have to set has the type
> “DateTime?”. But it accepts the DateTime object as I’ve seen on debug mode.
>
>
>
> So, when the request is done, the WS receives the date parameters as null.
> I’ve tried to use java.util.Date and Java.sql.Timestamp and both have not
> worked.
>
>
>
> Does anyone can help me???
>
>
>
> Thanks in regards.
>
> --
>
> Guilherme A. N. Fré
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Possible to get more information from an AxisFault?

2009-10-16 Thread Amila Suriarachchi
> > Se
> >> rviceStub.java:522)
> >> at
> >>
> > myco.dor.dmv.driver.matching.test.AgeVerifyTests.testVerifyAgeWithNullId
> > en
> >> tityParams(AgeVerifyTests.java:62)
> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> at
> >>
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> > a:
> >> 39)
> >> at
> >>
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> > Im
> >> pl.java:25)
> >> at java.lang.reflect.Method.invoke(Method.java:585)
> >> at junit.framework.TestCase.runTest(TestCase.java:164)
> >> at junit.framework.TestCase.runBare(TestCase.java:130)
> >> 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:120)
> >> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> >> at junit.framework.TestSuite.run(TestSuite.java:225)
> >> at
> >>
> > org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTe
> > st
> >> Runner.java:297)
> >> at
> >>
> > org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JUnit
> > Ta
> >> sk.java:1072)
> >> at
> >>
> > org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask
> > .j
> >> ava:682)
> >> at
> >>
> > org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeOrQueue(JU
> > ni
> >> tTask.java:1434)
> >> at
> >>
> > org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask
> > .j
> >> ava:632)
> >> at org.apache.tools.ant.Task.perform(Task.java:364)
> >> at
> > org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:195)
> >> at
> > org.apache.commons.jelly.impl.TagScript.run(TagScript.java:250)
> >> at
> >> org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
> >> at
> >> org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
> >>
> >> Thanks, - Dave
> >>
> >> --
> >> View this message in context:
> > http://www.nabble.com/Possible-to-get-more-
> >> information-from-an-AxisFault--tp25873509p25873509.html
> >> Sent from the Axis - User mailing list archive at Nabble.com.
> >>
> >>
> >> !DSPAM:4ad48905326661091618644!
> >>
> >>
> >
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Possible-to-get-more-information-from-an-AxisFault--tp25873509p25874063.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: ClassNotFoundException: org.hibernate.hql.ast.HqlToken

2009-10-16 Thread Amila Suriarachchi
where you have put your hibernate jars? in aar/lib?

try setting the ServiceTCCL to composite.

see here[1] to understand how axis2 handles class loading.

thanks,

Amila.

On Fri, Jun 20, 2008 at 12:55 PM, DOMINGUEZ Felipe <
felipe.doming...@eurocontrol.int> wrote:

>
> Hello
>
> I am having problem to run hibernate (3.2.6 ga) on axis2 (1.4)   and use
> HQL queries.
>
> I get the following exception  ClassNotFoundException:
> org.hibernate.hql.ast.HqlToken.
>
> When I run the application as a stand alone, it works fine, but when I
> run it as web service on axis2 it does not.
>
>
> It seems that some more people have had the same problem, and the
> solution they suggest is to copy file antlr-XX.jar into
> axis2/WEB-INF/lib.
> I have done so but it does not stop the problem. Anyway, it think this
> would not really be a solution since the axis administrator may refuse
> to do it, claiming that it may have an effect on other web services
> running on the same engine.
>
> Does any body knows a solution or a work around?  Or can suggest a way
> to trouble suit it. I have been looking on Google for the enter day but
> did not find any (except to copy the file)
>
>
>
> Thanks in advance.
>
> Felipe
> 
>
> This message and any files transmitted with it are legally privileged and
> intended for the sole use of the individual(s) or entity to whom they are
> addressed. If you are not the intended recipient, please notify the sender
> by reply and delete the message and any attachments from your system. Any
> unauthorised use or disclosure of the content of this message is strictly
> prohibited and may be unlawful.
>
> Nothing in this e-mail message amounts to a contractual or legal commitment
> on the part of EUROCONTROL, unless it is confirmed by appropriately signed
> hard copy.
>
> Any views expressed in this message are those of the sender.
>
>
> -----
> To unsubscribe, e-mail: axis-user-unsubscr...@ws.apache.org
> For additional commands, e-mail: axis-user-h...@ws.apache.org
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: temporary generated wsdl's use

2009-10-16 Thread Amila Suriarachchi
On Sun, Oct 11, 2009 at 9:31 PM, Asma MAALEJ  wrote:

> Hello
>
> I time ago, using axis1 environment, I have established a java class which
> allows to recover operations's parameters of a service web by parsing its
> wsdl file already generated.
>

it is not clear about your requirement. with axis2 wsdl is generated
according to the method parameters.
 thanks,
Amila.

Now, by trying to upgrade it under axis2-1.4.1 version, I noticed that the
> wsdl file becomes temporary and I have anymore a copy on the hard disk. So
> that I can't use it any more in my class just by specifying its path.
> I just wondered if I should made this wsdl file manually in order to obtain
> a copy on the disk which I will use later, or is there an other solution
> proposed for the wsdl file use with the arrival of axis2.
>
> I would appreciate help.
> Thanks,
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Regarding XMLBeans generation Of files

2009-10-15 Thread Amila Suriarachchi
can you try another data binding frame work like adb or jaxbri.

thanks,
Amila.

On Thu, Oct 15, 2009 at 2:51 PM, sri ram wrote:

> Attaching the files
>
> --- On *Thu, 15/10/09, sri ram * wrote:
>
>
> From: sri ram 
> Subject: Regarding XMLBeans generation Of files
> To: axis-user@ws.apache.org
> Date: Thursday, 15 October, 2009, 2:50 PM
>
>
> Hi all,
>
> As we know that XMLbeans generates a lot of file reading the schema.
> I have tried my best to modify the schema to best known format to reduce
> the number of files.
> And I have been succesfull in doing that .
>
> What I see is that  there are a lot of unused methods that are getting
> generated in  files that  are generated .Unused in my code of
> implementation.
> For example there are a lot of overloaded parse methods that are generated
> ,which are
>  public and static  and hence need to be loaded in the memory even if they
> are used or not.
> So my concern is can we suppress the generation of these methods
> by using some options in the command line (while compiling the schema).
> Else can we change the source code of the XMLBeans generator to get the
> required methods. If yes what are jars that   we can modify without
> violating any of the rules of open source code .
>
> I have attached two files to show the  number of methods that are actually
> in use.
> And  what we want to achieve.
>
> The number of files that are generated are 4029  .
> The number of line we want to reduce is 50 line in each file .
> ie approx 50 * 4000= 200,000
>
> Our schema is ever increasing  with every version.
> It will allow my application to work better and faster.
>
> Can someone quickly respond to it.
>
> Thanks in advance
>
>
> -Sriram
>
> --
> Now, send attachments up to 25MB with Yahoo! India Mail. Learn 
> how<http://in.rd.yahoo.com/tagline_galaxy_2/*http://in.overview.mail.yahoo.com/photos>
> .
>
>
> --
> Connect more, do more and share more with Yahoo! India Mail. Learn 
> more<http://in.rd.yahoo.com/tagline_galaxy_3/*http://in.overview.mail.yahoo.com/>
> .
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: What is "Must Understand check failed for headers" error?

2009-10-15 Thread Amila Suriarachchi
On Thu, Oct 15, 2009 at 7:55 PM, farfar wrote:

>
> Hi
>
> I have the same problem. I'm running an axis2 1.5 client against a
> WCF-service over https using UsernameToken to authenticate. This is the
> reply I get from the service.
>
> Did you solve this problem and do you know any way to handle this?
>

you can use WSO2 wsas[1]. You can use the admin console to engage security.

thanks,
Amila.

[1] http://wso2.org/downloads/wsas



>
> Regards
>
> Johannes
>
>
>
> Tezcan.Dilshener.extern wrote:
> >
> > Hi #
> > my service is issuing the following error that I do not understand why.
> > Can someone assist me regarding why and how to resolve this please?
> >
> > cheers
> > Tezcan
> > [ERROR] Must Understand check failed for headers:
> > {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-sece
> > xt-1.0.xsd}Security
> > org.apache.axis2.AxisFault: Must Understand check failed for headers:
> > {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-sece
> > xt-1.0.xsd}Security
> >   at
> > org.apache.axis2.jaxws.handler.HandlerUtils.checkMustUnderstand(HandlerU
> > tils.java:157)
> >   at
> > org.apache.axis2.jaxws.server.EndpointController.handleRequest(EndpointC
> > ontroller.java:256)
> >   at
> > org.apache.axis2.jaxws.server.EndpointController.invoke(EndpointControll
> > er.java:97)
> >   at
> > org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageR
> > eceiver.java:171)
> >   at
> > org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
> >   at
> > org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques
> > t(HTTPTransportUtils.java:275)
> >   at
> > org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131)
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >   at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> > tionFilterChain.java:252)
> >   at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> > erChain.java:173)
> >   at
> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> > e.java:214)
> >   at
> > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> > e.java:178)
> >   at
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> > :126)
> >   at
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> > :105)
> >   at
> > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> > java:107)
> >   at
> > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
> > 48)
> >   at
> > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:82
> > 5)
> >   at
> > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
> > onnection(Http11Protocol.java:738)
> >   at
> > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
> > .java:526)
> >   at
> > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
> > erWorkerThread.java:80)
> >   at
> > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
> > .java:684)
> >   at java.lang.Thread.run(Thread.java:595)
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/What-is-%22Must-Understand-check-failed-for-headers%22-error--tp17125334p25909590.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Disable wsdl url

2009-10-07 Thread Amila Suriarachchi
hi,

if you have deployed axis2 as a web app, try to put a servlet filter or
define some url pattern in the web.xml

thanks,
Amila


On Wed, Oct 7, 2009 at 3:50 PM, Darshana ®  wrote:

> Hello,
>
> I want to disable people accessing the wsdl. Currently any one can access
> wsdl of the my axis2 project through
> ":9002/web/services/Axis2WS?wsdl".
>
> I just want to restrict people accessing the wsdl, simply I want to disable
> the wsdl url.
>
> But I couldnt find a way to do this, it'll be a great help if any body can
> give me a solution for this.
>
> Thanks
>
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Consume XML using Axis2 without creating Java objects

2009-10-07 Thread Amila Suriarachchi
On Tue, Oct 6, 2009 at 7:27 PM, mule_user  wrote:

>
> Please advise what are my choices for the situation below:
>
> I receive XML as the input. I have no need (nor, have any intention) of
> creating any Java object out of the incoming XML. Could you please explain
> how can the incoming XML be consumed using using Axis 2? I may want to
> apply
> XSLT on the XML. But I have no need (nor have any desire) to create any
> Java
> object.
>
> Following are my questions:
> 1. What do I have to do to just consume the incoming XML? Please explain
> the
> steps needed for doing so using Axis2. In other words, I have no need (nor
> any desire) to convert the XML into a corresponding Java object. I just
> want
> to process the XML object as it comes. I may run XSLT on the incoming XML.
> I
> just want to consume that XML without going through the overhead of
> creating
> additional Java objects.
>
> 2. Or, do I still have to execute wsdl2Java and use the generated
> client/stub Java classes for processing the XML?
>

Have a look at here to  understand how you can write a custom message
receiver[1]. At your message
receiver you can get the xmlstream without building the message using this
method

inMessage.getEnvelope().getBody().getFirstElement().getXMLStreamReaderWithoutCaching()

thanks,
Amila.


[1] http://wso2.org/library/articles/extending-axis2

>
>
> --
> View this message in context:
> http://www.nabble.com/Consume-XML-using-Axis2-without-creating-Java-objects-tp25769238p25769238.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Does Order of attributes in SOAP message have to match WSDL .

2009-10-05 Thread Amila Suriarachchi
On Mon, Oct 5, 2009 at 1:08 PM, Julianne Hansen wrote:

>
>
> Hi All.
>
>
>
> Just after some info on whether the order of attributes in a Webservice
> Request / Response has to match the order of attributes defined in the WSDL.
>
>
>
> I am using Apache Axis 2, but am currently having some issues with a
> Webservice that I am connecting to.
>
>
>
> The WSDL states that the definition of an attribute is as follows:
>
>
>
>  
>
>
> *-*<http://msdwin50.dev.mincom.com:9083/eai-composite-ejb/services/WRComp/wsdl/WRComp.wsdl>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
>
>   
>
>   
>
>
>
> Yet the SOAP Response is returning the above attributes in the following
> order :
>
>
>
> 
> CUSTOMER DOES NOT EXIST IN THIS
> DISTRICT
> 1896
> CustomerNo
> -1
> 0
> 
>
>
>
> When trying to unpack the Webservice Response, Apache Axis is throwing the
> following error :
>
>
>
>
>
> org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
> Unexpected subelement message
>
>
>
>
>
> Should Apache Axis be able to handle the attributes being in a different
> order, or is the webservice incorrect because its not conforming to the
> WSDL.
>

this web service does not send the correct response. since the order has
given as the sequence the attributes should follow that order.

thanks,
Amila.

>
>
> If the later is true – is it stated in a wc3 spec anywhere that webservices
> should return attributes in the correct order?
>
>
>
> Thanks
>
> Julie
>
> --
> This transmission is for the intended addressee only and is confidential
> information. If you have received this transmission in error, please notify
> the sender and delete the transmission. The contents of this e-mail are the
> opinion of the writer only and are not endorsed by the Mincom Group of
> companies unless expressly stated otherwise.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Axis2 - Can I deploy EAR, WAR, JAR using my app server's admin console, Message service support in Axis2

2009-10-01 Thread Amila Suriarachchi
On Thu, Oct 1, 2009 at 11:59 PM, mule_user  wrote:

>
> I am using Axis2 version 1.5. I am new to this. I have successfully created
> a
> JAR file, renamed it as AAR, deployed it using Axis2 Admin console and
> successfully called the web service from a client. The enpoint is like:
> http://localhost:9081/axis2/services/CalculatorService  where services is
> the name of the project and CalculatorService is the name of the web
> service.
>
> I would like to know what I need to do if I want to deploy the application
> using my application server's admin console (WebSphere 6.1 Admin console)
> instead of using Axis2 admin console. Also, can I have a web project (WAR,
> or EAR file) that will get deployed using WebSphere Admin console, instead
> of using Axis2 admin console? If I used WebSphere's admin console to deploy
> the JAR file for the services project, it may not be under axis2 context.
> As
> I understand, it is important to have axis2 in the context. If I deploy
> using Admin console of WebSphere for example, what am I required to do?
>
> With that being the reference, following are my questions:
>
> 1.  What do I need to do to deploy an application (JAR, WAR, EAR) using my
> application server's Admin console (e.g. WebSphere) ? Please provide any
> guidence, or any link/documentation.
>
> 2.  Or, is Axis2 admin console the only choice to deploy an application?
>
> 3.  Is there any special step needed for deploying WAR and EAR (as opposed
> to JAR) using application server's admin console (e.g., WebSphere)? Please
> provide any guidence, or any link/documentation.
>
> 4. Can Axis2 admin console be used to deploy WAR and EAR along with JAR
> (need to rename it as aar)?
>
> 5. Does Axis2 provide support for Message service similar to Axis 1? Please
> provide any guidence, or any link/documentation.
>

I think it is not possible to use application servers Admin console to
deploy .aar files. Because they can
deploy files meaning full to that particular application server.

If you are searching for an better admin console you can use wso2 wsas[1]
which use Axis2 to provide
web service capabilities but have a better admin and monitoring tools.


> In other words, does Axis2 provide API similar to the following from Axis1?
> public Element [] method(Element [] bodies);
> public SOAPBodyElement [] method (SOAPBodyElement [] bodies);
> public Document method(Document body);
> public void method(SOAPEnvelope req, SOAPEnvelope resp);
>

There is no such API. but you can use either RawXMLMessageReceiver or you
can write your own
Message receiver for this.

thanks,
Amila.

[1] http://wso2.org/projects/wsas/java

>
> --
> View this message in context:
> http://www.nabble.com/Axis2---Can-I-deploy-EAR%2C-WAR%2C-JAR-using-my-app-server%27s-admin-console%2C-Message-service-support-in-Axis2-tp25704267p25704267.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Trouble with wsdl2java.sh

2009-10-01 Thread Amila Suriarachchi
try this[1]. Seems like your wsdl does not have a targetnamespace

thanks,
Amila.

[1] http://wso2.org/library/95

On Fri, Oct 2, 2009 at 2:00 AM, Brian Riley  wrote:

> Hi all,
>
> I am new to Axis2 and am just getting back into Java (been away for 4 years
> working in an MS shop ... shudder). Anyway, I am trying to test out a simple
> hello world web service and am trying to generate the java classes from
> Axis' handy wsdl2java.sh script, but I keep getting a NullPointerException
> when executing.
>
> Here's the message after I run *$AXIS2_HOME/bin/wsdl2java.sh -uri
> ./helloworld_ws.wsdl -ss -sd* the wsdl is attached. Any help would be
> greatly appreciated, even if you could provide a basic hello world sample
> that I could then build off of would be fantastic (all the ones I found
> including the one on the Apache site did not work for me perhaps because
> they were targeted for ant 
> deploymenthelloworld_ws.wsdl<http://www.nabble.com/file/p25705957/helloworld_ws.wsdl>)
> as I'm just trying to put together a proof of concept at this point for my
> project.
>
>  Retrieving document at './helloworld_ws.wsdl'. [ERROR]
> java.lang.NullPointerException at
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.findBinding(WSDL11ToAxisServiceBuilder.java:958)
> at
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:330)
> at
> org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:107)
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngine.java:147)
> at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35) at
> org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24) Exception in thread
> "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing
> WSDL at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngine.java:153)
> at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35) at
> org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24) Caused by:
> org.apache.axis2.AxisFault at
> org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) at
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:396)
> at
> org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:107)
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngine.java:147)
> ... 2 more Caused by: java.lang.NullPointerException at
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.findBinding(WSDL11ToAxisServiceBuilder.java:958)
> at
> org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:330)
> ... 4 more
> --
> View this message in context: Trouble with 
> wsdl2java.sh<http://www.nabble.com/Trouble-with-wsdl2java.sh-tp25705957p25705957.html>
> Sent from the Axis - User mailing list 
> archive<http://www.nabble.com/Axis---User-f232.html>at Nabble.com.
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: Additional XML prefixes when client receives SOAP fault

2009-10-01 Thread Amila Suriarachchi
On Fri, Sep 25, 2009 at 3:23 PM, Christian Mielke  wrote:

> Hello,
> I have a problem with XML prefixes. When the SOAP message leaves the server
> with a fault the body looks like this:
>
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
> wsu:Id="Id-25568549">
>
>
>soapenv:Receiver
>
>
>ENFORCED ERROR THROWN
> CORRECTLY
>
>
>http://www.foo.net/test/xsd/sys/common";>
>0010
>ENFORCED ERROR THROWN
> CORRECTLY
>
>ENFORCED ERROR THROWN
> CORRECTLY
>
>  AC10014E0123F082FFAD0001
>
>  2009-09-25T11:23:32.156+02:00
>
>
>
> 
>
> But the client takes this body out of the stream:
>
> http://www.w3.org/2003/05/soap-envelope";
> xmlns:wsu="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
> wsu:Id="Id-25568549">
>
>
>soapenv:Receiver
>
>
>ENFORCED ERROR THROWN
> CORRECTLY
>
>
>http://www.foo.net/test/xsd/sys/common";>
>
>  0010
>ENFORCED ERROR THROWN
> CORRECTLY
>
>ENFORCED ERROR THROWN
> CORRECTLY
>
>  AC10014E0123F082FFAD0001
>
>  2009-09-25T11:23:32.156+02:00
>
>
>
> 
>
>
>
> You can see that there is no prefix in the serviceFault tag on the server
> side but the client puts the prefix "axis2ns1" into the body. For me this is
> a problem because the body is signed on the server side and the client
> calculates the hash with this prefix. That leads to signature verification
> failure. Would be great if you can help me.
>

do you sign the soap message using Rampart (ws-security implementation for
Axis2) or with your code?

thanks,
Amila.

> Greetings
> Christian
>
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: org.apache.axis2.databinding.ADBException WAS java.lang.ClassNotFoundException: org.apache.http.HttpResponseFactory

2009-10-01 Thread Amila Suriarachchi
On Thu, Oct 1, 2009 at 7:54 PM,  wrote:

>  Hi there,
>
>
>
> I have seen some information on the this new issue and it seems to be
> related to a bug. The httpcore jar solved my previous problem but now I am
> getting:
>

check the response message you get is valid according to the wsdl to which
you generated the code.
you may use tcpmon[1] to check the response.

thanks,
Amila.

[1] http://ws.apache.org/commons/tcpmon/download.cgi

>
>
> org.apache.axis2.AxisFault: *org.apache.axis2.databinding.ADBException*:
> Unexpected subelement Results
>
>   at org.apache.axis2.AxisFault.makeFault(*AxisFault.java:430*)
>
>
>
> --
>
> Kind Regards
>
> Schalk Neethling
>
>
>
> *From:* Amila Suriarachchi [mailto:amilasuriarach...@gmail.com]
> *Sent:* 01 October 2009 04:02 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: java.lang.ClassNotFoundException:
> org.apache.http.HttpResponseFactory
>
>
>
>
>
> On Thu, Oct 1, 2009 at 7:06 PM,  wrote:
>
> Hi there everyone,
>
> After struggling through some strange errors in the generated stubs I have
> finally built my Axis2 project, however, when I try to make use of the Stub
> everything goes perfect until it seems to want to make a connection to the
> end point or reading the response. Here is the exception I get:
>
> java.lang.ClassNotFoundException: org.apache.http.HttpResponseFactory
>at
>
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
> a:1387)
>at
>
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
> a:1233)
>at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>at
>
> org.apache.axis2.transport.http.SimpleHTTPServer.init(SimpleHTTPServer.java:
> 116)
>at
> org.apache.axis2.engine.ListenerManager.init(ListenerManager.java:74)
>at
>
> org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.j
> ava:161)
>at
> org.apache.axis2.client.ServiceClient.(ServiceClient.java:139)
>at
> za.co.afrigis.ws.stubs.SpatialSearchStub.(SpatialSearchStub.java:100)
>
> Any ideas? All help much appreciated.
>
>
> Have you put your stub in your web app?
>
> you need to have httpcore-4.0.jar on the class path.
>
> thanks,
> Amila.
>
>
> --
> Kind Regards
> Schalk Neethling
>
>
>
>
> --
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Re: java.lang.ClassNotFoundException: org.apache.http.HttpResponseFactory

2009-10-01 Thread Amila Suriarachchi
On Thu, Oct 1, 2009 at 7:06 PM,  wrote:

> Hi there everyone,
>
> After struggling through some strange errors in the generated stubs I have
> finally built my Axis2 project, however, when I try to make use of the Stub
> everything goes perfect until it seems to want to make a connection to the
> end point or reading the response. Here is the exception I get:
>
> java.lang.ClassNotFoundException: org.apache.http.HttpResponseFactory
>at
>
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
> a:1387)
>at
>
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
> a:1233)
>at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>at
>
> org.apache.axis2.transport.http.SimpleHTTPServer.init(SimpleHTTPServer.java:
> 116)
>at
> org.apache.axis2.engine.ListenerManager.init(ListenerManager.java:74)
>at
>
> org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.j
> ava:161)
>at
> org.apache.axis2.client.ServiceClient.(ServiceClient.java:139)
>at
> za.co.afrigis.ws.stubs.SpatialSearchStub.(SpatialSearchStub.java:100)
>
> Any ideas? All help much appreciated.
>

Have you put your stub in your web app?

you need to have httpcore-4.0.jar on the class path.

thanks,
Amila.

>
> --
> Kind Regards
> Schalk Neethling
>
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


  1   2   3   4   5   6   7   8   9   10   >