Re: Best way to add a function to an existing Axis 2 service

2009-05-01 Thread Deepal jayasinghe
I do not understand what do you mean by you first create the service and
then generate the WSDL and from that you generate the service skeleton.
If you already have the service why do you want to generate the skeleton
?, which is not need.

If you have created the service from WSDL2Java then the best way is to
edit the WSDL and then code gen. Or you could add the method to
Skeleton, but you have to make sure you somehow reflect that to WSDL.

Deepal
>
> Hi everyone,
>
> This may be a silly question but what’s the best way to add a function
> to an existing Axis 2 service? I wrote an Axis 2 service from scratch
> that has over a 100 functions by first creating the WSDL and then
> running WSDL2Java and implementing the business logic in the Skeleton
> class. Now I want to add a function. If I add it to the WSDL and
> re-run WSDL2Java, then at best, I’ll have to copy and paste code from
> the old Skeleton class to the new one, which is unwieldy.
>
> What’s the best way of adding a function to an existing Axis 2 service
> that was written from scratch using WSDL2Java?
>
> Thanks,
>
> Richard
>


-- 
Thank you!


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



WS - Reliable Messaging

2009-05-01 Thread Suchitha Koneru (sukoneru)
Hello Axis Users , 
   Axis 1.4  and Axis 2.0 both the
implementations support WS - Reliable Messaging. I am trying to get an
idea as to what is improved/different in Axis 2.0 when compared to Axis
1.4 in regard to WS - Reliable Messaging. I tried looking up this
information online , but could not get any useful pointers.
 
Thank you,
suchitha.
 
 


Wally Dennis is out of the office.

2009-05-01 Thread Wally Dennis


Regarding your message: Re: How to turn off stdout messages when using WSDL
2.0 ?

I will be out of the office starting  01-May-2009 and will not return until
05-May-2009.





The information contained in this e-mail and any accompanying documents may 
contain information that is confidential or otherwise protected from 
disclosure. If you are not the intended recipient of this message, or if this 
message has been addressed to you in error, please immediately alert the sender 
by reply e-mail and then delete this message, including any attachments. Any 
dissemination, distribution or other use of the contents of this message by 
anyone other than the intended recipient is strictly prohibited. All messages 
sent to and from this e-mail address may be monitored as permitted by 
applicable law and regulations to ensure compliance with our internal policies 
and to protect our business. E-mails are not secure and cannot be guaranteed to 
be error free as they can be intercepted, amended, lost or destroyed, or 
contain viruses. You are deemed to have accepted these risks if you communicate 
with us by e-mail. 





Best way to add a function to an existing Axis 2 service

2009-05-01 Thread Richard Hu
Hi everyone,

 

This may be a silly question but what's the best way to add a function
to an existing Axis 2 service?  I wrote an Axis 2 service from scratch
that has over a 100 functions by first creating the WSDL and then
running WSDL2Java and implementing the business logic in the Skeleton
class.  Now I want to add a function.  If I add it to the WSDL and
re-run WSDL2Java, then at best, I'll have to copy and paste code from
the old Skeleton class to the new one, which is unwieldy.

 

What's the best way of adding a function to an existing Axis 2 service
that was written from scratch using WSDL2Java?

 

Thanks,

Richard



CommonsHTTPTransportSender - name cannot be null

2009-05-01 Thread Yoav Naveh
Hello,

I have a WS using axis2 and tomcat 6.
Sometimes, usually under high load of requests from clients, the web
service writes following log error messages:

org.apache.axis2.transport.http.CommonsHTTPTransportSender - name
cannot be null!!
org.apache.axis2.engine.AxisEngine - name cannot be null!!

Would appreciate any insight..

Thanks!
Yoav


Axis2 Java6

2009-05-01 Thread David Urbansky
Hello,
I am using Axis2 1.4.1 (deployment in Tomcat) and a Java 6 application
and I get the BadVersion Error when starting Tomcat. I do not get this
error when I compile the application in Java 1.5. I know that the FAQ
(https://svn.wso2.com/~thilina/axis2fullsite/faq.html#a4) says
something about that issue but it does not work for me. First there is
no "stax-api.jar" in the axis2/lib dir but only
"geronimo-stax-api_1.0_spec-1.0.1.jar" so I added this jar to my jre's
lib directory but that did not help. Also Tomcat 6 has no
"common/endorsed" folder as suggested in the FAQ.

I would really appreciate if somebody has experienced a similar
problem and has a solution.
Thanks a lot,
   David


Re: How to turn off stdout messages when using WSDL 2.0 ?

2009-05-01 Thread Sagara Gunathunga
Hi Jeremy,

> Since Woden is a utility and is therefore always going to be used in
> the context of something else (like Axis2) then whatever the logging
> strategy we'll need to direct Woden logging / tracing to an arbitrary
> logging mechanism. SLF4J seems to be popular and doesn't suffer the
> classloader issues of JCL (apparently although I haven't gone into
> it).
>

+1 for this ,

My intention was to emphasize the usage of any logging framework for
this scenario , as you proposed with SLF4J users can plug there
convenient longing framework in their end and seems like SLF4J  is the
best way to handle this.

Thanks,

-- 
Sagara Gunathunga

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


Re: How to turn off stdout messages when using WSDL 2.0 ?

2009-05-01 Thread Jeremy Hughes
Hi Sagara,

2009/5/1 Sagara Gunathunga 
>
> Hi Jeremy ,
> BTW in Woden ErrorHandlerImpl we used S.O.P statements to handle
> warnings/errors/fatalErrors , but if we use a logging framework (such
> as log4j) to handle those stuff instead of S.O.P statements , users
> can control it using logging configuration and no need to implement
> custom error handlers.

Yes, my thoughts entirely.

>
> I think we have to think about such improvement in Woden side too. We
> already have a JIRA issue related to logging [1]  , Any way we can
> discuss this matter further in Woden -dev list .

Since Woden is a utility and is therefore always going to be used in
the context of something else (like Axis2) then whatever the logging
strategy we'll need to direct Woden logging / tracing to an arbitrary
logging mechanism. SLF4J seems to be popular and doesn't suffer the
classloader issues of JCL (apparently although I haven't gone into
it).

>
>
> [1] - http://issues.apache.org/jira/browse/WODEN-71


RE: How do I force axis2 to include a SOAPAction http header

2009-05-01 Thread Christopher . Gunn
I tried calling setSoapAction but the SOAPAction header was still not
sent.  Forcing it to soap 1.1 worked.

 
Thanks,
 
Chris Gunn
Senior Programmer
L-3 Communications
804-723-3078 (office)
804-647-0153 (cell)

-Original Message-
From: keith chapman [mailto:keithgchap...@gmail.com] 
Sent: Friday, May 01, 2009 12:56 AM
To: axis-user@ws.apache.org
Subject: Re: How do I force axis2 to include a SOAPAction http header

Even if you are using SOAP 1.2, if you set the soapAction Axis2 will
send it for you. In the event that soap action is not ser Axis2 will
send a empty SOAPAction header of SOAP 1.1 is used (cause thats
mandatory).

Thanks,
Keith.


On Wed, Apr 29, 2009 at 11:11 PM, Steve Hall
 wrote:



For soap 1.1:

serviceClient.getOptions().setSoapVersionURI(org.apache.axiom.soap.SOAP1
1Constants.SOAP_ENVELOPE_NAMESPACE_URI);

For soap 1.2:

serviceClient.getOptions().setSoapVersionURI(org.apache.axiom.soap.SOAP1
2Constants.SOAP_ENVELOPE_NAMESPACE_URI);


christopher.g...@l-3com.com wrote:


In that case, how do I force axis2 to choose SOAP 1.1 so
that it will
send the SOAPAction header?

 Thanks,
 Chris Gunn
Senior Programmer
L-3 Communications

-Original Message-
From: Salisbury, Mark [mailto:mark.salisb...@hp.com]
Sent: Wednesday, April 29, 2009 11:42 AM
To: axis-user@ws.apache.org
Subject: RE: How do I force axis2 to include a
SOAPAction http header

I'm sort of new myself to SOAP and web services, but
from what I've read
you may want to investigate the differences between SOAP
1.1 and SOAP
1.2 and double check the SOAP version that your .NET
services expects.
One change between 1.1 and 1.2 is how the action header
stuff is
handled.  Axis 2 is probably doing the right thing given
the SOAP
version you're using.

Mark
 -Original Message-
From: christopher.g...@l-3com.com
[mailto:christopher.g...@l-3com.com] Sent: Wednesday, April 29, 2009
9:33 AM
To: axis-user@ws.apache.org
Subject: How do I force axis2 to include a SOAPAction
http header

I'm using axis2 1.4.1 and adb to call a .Net web
service.  I keep
getting a response saying:

System.Web.Services.Protocols.SoapException: Unable to
handle request
without a valid action parameter. Please supply a valid
soap action.

I enabled the wire.header logs and it is sending action
in the
Content-Type header, but it is not sending the
SOAPAction header at all,
not even as an empty string "".

I have tried setting options.setAction and   
options.setProperty(

org.apache.axis2.Constants.Configuration.DISABLE_SOAP_ACTION,
 org.apache.axis2.Constants.VALUE_FALSE);
 but that hasn't helped.
 Any help would be greatly appreciated.
 Thanks,
 Chris Gunn
Senior Programmer
L-3 Communications

 






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

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



Re: How to turn off stdout messages when using WSDL 2.0 ?

2009-05-01 Thread Sagara Gunathunga
Hi Jeremy ,
BTW in Woden ErrorHandlerImpl we used S.O.P statements to handle
warnings/errors/fatalErrors , but if we use a logging framework (such
as log4j) to handle those stuff instead of S.O.P statements , users
can control it using logging configuration and no need to implement
custom error handlers.

I think we have to think about such improvement in Woden side too. We
already have a JIRA issue related to logging [1]  , Any way we can
discuss this matter further in Woden -dev list .


[1] - http://issues.apache.org/jira/browse/WODEN-71

Thanks ,

-- 
Sagara Gunathunga

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


Re: How to turn off stdout messages when using WSDL 2.0 ?

2009-05-01 Thread Jeremy Hughes
Deyan, I agree these leakages to stdout should stop. The way to set the
error handler is by doing:

WSDLReader.getErrorReporter().setErrorHandler(customErrorHandler)

but like you say, the WSDLReader is hidden inside the
WSDL20ToAxisServiceBuilder. Since this class uses the commons-logging Log
class to output warnings/errors etc already, then I feel it should provide a
custom error handler to Woden so its output goes to wherever commons-logging
is configured to send its output. Would this solve the problem for you?

So I think you have a genuine issue. Please would you open a JIRA:
https://issues.apache.org/jira/browse/AXIS2

btw: you need a JIRA ID in case you don't already have an ID.

Jeremy

2009/4/30 Deyan Popov 

> Axis2 writes to stdout when using WSDL 2.0 and I cannot find a way to turn
> it off. When some of the namespace URIs inside the WSDL 2.0 document are not
> accessible, I see warning messages like:
> Woden[Warning],0:0,Description-1001,The targetNamespace '
> http://www.example.org/simple_doc/' is not dereferencable.
>
> I am using Axis2 inside a larger application, which uses stdout for its own
> purposes. The messages from Axis2 look completely out of place on the
> console. Redirecting the stdout stream of the Java process is not an option.
> Also I have no control over the WSDL files that may be passed to the
> application, so I cannot "fix" all namespace URIs.
>
> These messages seem to come from the Apache Woden library and are not
> written via Log4j. According to the Woden User Guide there is a default
> ErrorHandler which writes to stdout and that ErrorHandler can be replaced.
> But I don't see how this can be done via the Axis2 API - in particular the
> org.apache.axis2.description.WSDL20ToAllAxisServicesBuilder class.
>
> Does anyone know how to silence these stdout messages ?
>
>
> Here are a simple Java program and a WSDL 2.0 file that demonstrate the
> problem:
>
> import java.io.File;
> import java.io.InputStream;
> import java.net.URI;
> import java.net.URL;
> import java.util.List;
> import org.apache.axis2.description.WSDL20ToAllAxisServicesBuilder;
>
>
> public class WSDL20Experiment {
>
> public static void main(String[] args) throws Exception {
> createAllAxisServicesFromWSDL20File("simple_doc_wsdl20.wsdl",
> false);
> }
>
> public static List createAllAxisServicesFromWSDL20File(String wsdl,
> boolean isServerSide) throws Exception {
>
> URL wsdlURL;
> File wsdlFile = new File(wsdl);
> if (wsdlFile.exists()) {
> wsdlURL = wsdlFile.toURL();
> } else {
> wsdlURL = new URL(wsdl);
> }
> URI wsdlURI = new URI(wsdlURL.getProtocol(), wsdlURL.getUserInfo(),
> wsdlURL.getHost(), wsdlURL.getPort(), wsdlURL.getPath(),
> wsdlURL.getQuery(), wsdlURL.getRef());
>
> InputStream inp = wsdlURL.openStream();
> List services;
> try {
> WSDL20ToAllAxisServicesBuilder wsdlToAxisServiceBuilder = new
> WSDL20ToAllAxisServicesBuilder(inp);
> wsdlToAxisServiceBuilder.setBaseUri(wsdlURI.toASCIIString());
> wsdlToAxisServiceBuilder.setServerSide(isServerSide);
> services = wsdlToAxisServiceBuilder.populateAllServices();
> } finally {
> if (inp != null) {
> inp.close();
> }
> }
>
> return services;
> }
>
> }
>
> 
> http://www.w3.org/ns/wsdl"; xmlns:tns="
> http://www.example.org/simple_doc/"; xmlns:wsdl="
> http://schemas.xmlsoap.org/wsdl/"; name="simple_doc_wsdl20"
> targetNamespace="http://www.example.org/simple_doc/"; xmlns:wsoap="
> http://www.w3.org/ns/wsdl/soap";>
>
>   
> http://www.w3.org/2001/XMLSchema";
> targetNamespace="http://www.example.org/simple_doc/";>
>   
>   
> 
>   
>
>   
> http://www.w3.org/ns/wsdl/in-out";>
>   
>   
> 
>   
>
>type="http://www.w3.org/ns/wsdl/soap"; wsoap:version="1.1" wsoap:protocol="
> http://www.w3.org/2003/05/soap/bindings/HTTP";>
> 
>   
>
>   
>binding="tns:simple_doc_wsdl20SOAP11"
>   address="http://localhost:9998"/>
>   
>
> 
>


Re: axis and UTF-8

2009-05-01 Thread Johannes Nicolai
Hi Fred,

 

I had a similar problem that went away after I upgraded axis 1.4, wss4j and 
xml-sec to the latest versions.

 

Best, Johannes

 

> -Original Message- 
> From: Frédéric Viollet [mailto:frederic.viol...@... 
>  ] 
> Sent: Thursday, 12 July 2007 2:04 AM 
> To: axis-u...@... 
>   
> Subject: axis and UTF-8 
> 
> 
> Hi everybody, 
> 
> here's my problem. Maybe someone will be able to help me. 
> I'm trying to send accents to my web service. But on the client side, 
> the generated XML contains a strange encoding of these characters. 
> Here's an example: 
> I try to send the 'é' character. 
> The generated XML looks like this: 
> 
> POST /apmadmws HTTP/1.0 
> Content-Type: text/xml; charset=utf-8 
> Accept: application/soap+xml, application/dime, multipart/related, text/* 
> User-Agent: Axis/1.4 
> Host: zembra: 
> Cache-Control: no-cache 
> Pragma: no-cache 
> SOAPAction: "" 
> Content-Length: 919 
> Cookie: apmsession=xaNwgUevQncs9ztbdypjrlE1eN+q2Ybr 
> 
>  
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> 
>
>  http://evidian.com/security/apmadmws";> 
>  
>d6a8d2b60475294b8a6221a47ad9507f 
>APMOBJTYPEunknown 
>  
>  
> ns1:type="APMATTTYPESTRING" 
> xmlns:ns1="http://evidian.com/security/apmadmws";> 
>   APMATTNAMEAPMDISPLAYNAME 
>
>  fvi 
>
> 
> ns2:type="APMATTTYPESTRING" 
> xmlns:ns2="http://evidian.com/security/apmadmws";> 
>   APMATTNAMEDESCRIPTION 
>
> > é 
> <--- Here's the problem 
>
> 
> 
>  
>   
>
> 
> 
> 
> The character is not UTF-8 encoded. It looks like the serialization is 
> not done using UTF-8 encoding. 
> Does anyone have an idea of what I could do? 
> 
> Thanks for your help. 
> 
> Fred