Why No Annotations?

2008-12-03 Thread Chandika Gunarathna
Hi,
Can someone pls tell me the need for service.xml descriptor?? Why not use
annotations??

I am coming from a .NET background into Java and I am finding the use of Web
Services on Java much less than attractive...Why is Axis2 so far behind??

Forgive me if I am overlooking extremely easy ways of getting a web service
up and running on Axis2...but I am following the Quick start guide...but it
is not starting to look any quicker...it keeps talking about a service.xml
which is really not needed with some nice little annotations...

Also...I am using eclipse and the plug-in that comes with it does no
good...I have Axis2 Jars in my project...but when I point to my POJO that I
want to expose as a web service...it says that the class is NOT found when
attempting to generate the WSDL file...I did a little research on this and
found many other users with the same problem but no concrete solution...

Can someone throw some light on these issues...because I am turning out to
be one very disappointed guy over
here..Just Kidding, but
I appreciate any help I can get...for FREE that is...

Regards,

Chandika


AW: Multiple services.xml, one serviceGroup

2008-12-03 Thread Gaiser, Matthias
Deepal,
Thank you for your answer.

Is Axis2 supporting me somehow if I want to maintain the session via the 
configuration context?
Do I then have to set a SOAP-Header with a session id myself?
Isn't there only one configuration context per webapplication?

I could think of possible solutions with the configuration context, but this 
would mean, that I have to implement the session handling all by myself. Am I 
missing something out?

Thanks,
Matthias.

> -Ursprüngliche Nachricht-
> Von: Deepal Jayasinghe [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 3. Dezember 2008 16:32
> An: axis-user@ws.apache.org
> Betreff: Re: Multiple services.xml, one serviceGroup
> 
> 
> > Hi,
> >
> >
> >
> > I am implementing session-based web services. We use the
> > servicegroup-based session.
> >
> >
> >
> > Since I have a lot of services, I want to have single services.xml
> > files for each service. But in order to have them share the same
> > session, I must have them in the same serviceGroup.
> >
> >
> >
> > Is it possible to have services in different services.xml but still
> in
> > the same servicegroup??
> >
> Unfortunately no, only the services in one service group can shares the
> sessions in a given session.However you can maintain the session using
> configuration context, then you can maintain session without even
> thinking about soap or transport session.
> 
> Deepal
> >
> >
> >
> > Thank you for your help,
> >
> > Matthias.
> >
> >
> >
> 
> --
> Thank you!
> 
> 
> http://blogs.deepal.org
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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



[Axis2] How to resolve the "...Must Understand check.." exception for Response SOAP message

2008-12-03 Thread Guo Tianchong
Dear Axis's master:

I'm a programer using Axis2 1.4.1 to develope a Web Service application.
Now, I have met a problem about the famous "Must Understand check".
But my case is a litter special.

The detail is that :

I used org.apache.axis2.client.OperationClient API to construct a custom
SOAP message and send it to my Web Service like this:

..
MessageContext outMsgCtx = new MessageContext();
outMsgCtx.setEnvelope(buildOutEnvelope());

Options opts = outMsgCtx.getOptions();
opts.setTo(TARGET_EPR);
opts.setAction("urn:download");

operationClient.addMessageContext(outMsgCtx);
operationClient.execute(true);
..

By the SOAP Monitor and server log, I could judged that the Web Service did work
and returned desired SOAP message.
One of my Response message header block included mustUnderstand
attributes, such as:

...
  
42
  
...

#
Please NOTE: It's in Response Message.


And then the following exception came out:
..
org.apache.axis2.AxisFault: Must Understand check failed for header ..
at 
org.apache.axis2.engine.AxisEngine.checkMustUnderstand(AxisEngine.java:102)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:166)
at 
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:363)
at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
at 
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
..


At the server side, I could create a custom Handler in a module
and engage it to the Service to resolve this problem.
But now, it's Client. So how can I resolve this problem using Client API or 
other method?

Could you have any ideas?
Thank you


Guo Tianchong

1rd Development Department
Network Software Research and Development Division
NEC Advanced Software Technology Co., Ltd.

20F, SHINING TOWER, No.35, XueYuan Road,
HaiDian District, Beijing 100191, P.R.China

E-MAIL:  [EMAIL PROTECTED]
TEL: 86-10-82334433-624
FAX:   86-10-82334434
TELNET:  8-0086-22-624
HP:  www.nec-as.com.cn



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



Compression and chunked problem

2008-12-03 Thread Happy
Dear All,
 
I have been trying to compress the SOAPRequest by setting the
HTTPConstantsorg.apache.axis2.transport.http.HTTPConstants.MC_GZIP_REQUE
ST property to true.  But the SOAPRequest does not get compressed when I
set the property of
org.apache.axis2.transport.http.HTTPConstants.CHUNKED to false.  Is
there a dependency between GZIP request and chunked?
 
Regards
Happy Somani
 


How to forward from Axis service to delegate axis services.

2008-12-03 Thread Trevor Campbell
I have a large distributed application that uses Axis2 web services to 
process user requests,   The requests all first come to a primary 
service that may be able to handle the request itself, but often needs 
to send the request on to 1 or more ( maybe up to 100) downstream 
servers.  The responses from the downstream servers are then combined 
(sorted) and returned to the user application.  This hierarchy may be 
more than 2 layers deep.


The format of the requests is the same at each level.

Currently I use the Skeleton and Client Stubs generated by the Eclipse 
Webservice Axis2 plugins.


My current process is:
Receive the request and examine it
Rebuild the client object graph.
Call the client stub for each delegate pasing the client object graph
Wait for all the replies to come in
Build the reply and return.

What I am concerned about is the resources needed to rebuild the ongoing 
message for each delegate, when I know that the format is exactly what I 
received in.  The messages could be quite long, having up to about 5,000 
data elements.


Is there a way that I could just pass the incoming message straight through?

Thanks



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



Re: Getting error as "The service cannot be found for the endpoint reference (EPR) /axis2/Calculator.jws"

2008-12-03 Thread Amila Suriarachchi
On Thu, Dec 4, 2008 at 7:30 AM, amar reddy <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> >
> > Today I have configured tomcat for Axis webservices. so, tomcat
> > configuration is fine..no issues this side.
> >
> > I started learning the webservices with the Calculator example given at "
> > http://ws.apache.org/axis/java/user-guide.html";
> >
> > Steps I followed.
> >
> > 1. Create a "Calculator.java" and copied to
> C:\apache-tomcat-5.5.27\webapps\axis2
> > 2. Renames the file to "Calculator.jws"
> > 3. Restart the Tomcat server.
> > 4. Now try to access the like "
> > http://localhost:8080/axis2/Calculator.jws";
>

I think you have mixed Axis1 and Axis2.  The way you have to deploy a POJO
in axis2 is different from axis1. Please read the user guide.

thanks,
Amila.

>
> >
> > In the UI I am getting the following error.
> >
> > 
> > 
> > 
> > *The service cannot be found for the endpoint reference (EPR)
> > /axis2/Calculator.jws*
> > 
> > 
> > 
> > Below I am giving the exception stack trace in the console.
> >
> > 
> > [ERROR] The service cannot be found for the endpoint reference (EPR)
> > /axis2/Calc
> > ulator.jws
> > org.apache.axis2.AxisFault: The service cannot be found for the endpoint
> > referen
> > ce (EPR) /axis2/Calculator.jws
> > at
> > org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPha
> > se.java:64)
> > at org.apache.axis2.engine.Phase.invoke(Phase.java:333)
> > at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
> > at
> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163)
> > at
> > org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUt
> > il.java:136)
> > at
> > org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTU
> > til.java:130)
> > at
> > org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.proc
> > essURLRequest(AxisServlet.java:824)
> > at
> > org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:25
> > 3)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
> > at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> > icationFilterChain.java:269)
> > at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> > ilterChain.java:188)
> > at
> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
> > alve.java:213)
> > at
> > org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
> > alve.java:172)
> > at
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
> > ava:127)
> > at
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
> > ava:117)
> > at
> > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
> > ve.java:108)
> > at
> > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
> > a:174)
> > at
> > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
> > :875)
> > at
> > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
> > rocessConnection(Http11BaseProtocol.java:665)
> > at
> > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
> > int.java:528)
> > at
> > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
> > lowerWorkerThread.java:81)
> > at
> > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
> > ool.java:689)
> > at java.lang.Thread.run(Thread.java:595)
> >
> > ***
> >
> > Can somebody please help me out what I am missing here?
> > I appreciate your help.
> >
> > Thanks,
> > Amarnath.
>
>


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


Getting error as "The service cannot be found for the endpoint reference (EPR) /axis2/Calculator.jws"

2008-12-03 Thread amar reddy
Hi,

>
> Today I have configured tomcat for Axis webservices. so, tomcat
> configuration is fine..no issues this side.
>
> I started learning the webservices with the Calculator example given at "
> http://ws.apache.org/axis/java/user-guide.html";
>
> Steps I followed.
>
> 1. Create a "Calculator.java" and copied to
C:\apache-tomcat-5.5.27\webapps\axis2
> 2. Renames the file to "Calculator.jws"
> 3. Restart the Tomcat server.
> 4. Now try to access the like "
> http://localhost:8080/axis2/Calculator.jws";
>
> In the UI I am getting the following error.
>
> 
> 
> 
> *The service cannot be found for the endpoint reference (EPR)
> /axis2/Calculator.jws*
> 
> 
> 
> Below I am giving the exception stack trace in the console.
>
> 
> [ERROR] The service cannot be found for the endpoint reference (EPR)
> /axis2/Calc
> ulator.jws
> org.apache.axis2.AxisFault: The service cannot be found for the endpoint
> referen
> ce (EPR) /axis2/Calculator.jws
> at
> org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPha
> se.java:64)
> at org.apache.axis2.engine.Phase.invoke(Phase.java:333)
> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163)
> at
> org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUt
> il.java:136)
> at
> org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTU
> til.java:130)
> at
> org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.proc
> essURLRequest(AxisServlet.java:824)
> at
> org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:25
> 3)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:269)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> ilterChain.java:188)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
> alve.java:213)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
> alve.java:172)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
> ava:127)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
> ava:117)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
> ve.java:108)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
> a:174)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
> :875)
> at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
> rocessConnection(Http11BaseProtocol.java:665)
> at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
> int.java:528)
> at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
> lowerWorkerThread.java:81)
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
> ool.java:689)
> at java.lang.Thread.run(Thread.java:595)
>
> ***
>
> Can somebody please help me out what I am missing here?
> I appreciate your help.
>
> Thanks,
> Amarnath.


XMLStreamException occuring intermittently

2008-12-03 Thread Deenadayalan J
Hi,

I am writing a Webservice client.

When axis builds the XML message, I get this error intermittently. Is this a
problem with Axis? or Weblogic?
The exception message is :javax.xml.stream.XMLStreamException: *end
reached!:

*I searched the net and found some info related to XMLStreamException, but
they message was different. I could not find anything related to end
reached.

Is there any solution or work around for this?*
**
*I appreciate any help in this regard. Thanks
*
Stack Trace
*StAXOMBuilder.javaorg.apache.axiom.om.impl.builder.StAXOMBuilde.rnext
OMStAXWrapper.javaorg.apache.axiom.om.impl.llom.OMStAXWrapper.updateNextNode
OMStAXWrapper.javaorg.apache.axiom.om.impl.llom.OMStAXWrapper
OMElementImpl.javaorg.apache.axiom.om.impl.llom.OMElementImpl.getXMLStreamReader
OMElementImpl.javaorg.apache.axiom.om.impl.llom.OMElementImpl.getXMLStreamReaderWithoutCaching
OMSerializerUtil.javaorg.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream
OMElementImpl.javaorg.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize
OMElementImpl.javaorg.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume
SOAPEnvelopeImpl.javaorg.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally
SOAPEnvelopeImpl.javaorg.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize
OMElementImpl.javaorg.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume
OMNodeImpl.javaorg.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume
SOAPMessageFormatter.javaorg.apache.axis2.transport.http.SOAPMessageFormatter.writeTo
AxisRequestEntity.javaorg.apache.axis2.transport.http.AxisRequestEntity.writeRequest
EntityEnclosingMethod.javaorg.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody
HttpMethodBase.javaorg.apache.commons.httpclient.HttpMethodBasewriteRequest
HttpMethodBase.javaorg.apache.commons.httpclient.HttpMethodBaseexecute
HttpMethodDirector.javaorg.apache.commons.httpclient.HttpMethodDirectorexecuteWithRetry
HttpMethodDirector.javaorg.apache.commons.httpclient.HttpMethodDirectorexecuteMethod
HttpClient.javaorg.apache.commons.httpclient.HttpClientexecuteMethod
HttpClient.javaorg.apache.commons.httpclient.HttpClientexecuteMethod
AbstractHTTPSender.javaorg.apache.axis2.transport.http.AbstractHTTPSenderexecuteMethod
HTTPSender.javaorg.apache.axis2.transport.http.HTTPSendersendViaPost
HTTPSender.javaorg.apache.axis2.transport.http.HTTPSendersend
CommonsHTTPTransportSender.javaorg.apache.axis2.transport.http.CommonsHTTPTransportSenderwriteMessageWithCommons
CommonsHTTPTransportSender.javaorg.apache.axis2.transport.http.CommonsHTTPTransportSenderinvoke
AxisEngine.javaorg.apache.axis2.engine.AxisEnginesend
OutInAxisOperation.javaorg.apache.axis2.description.OutInAxisOperationClientsend
OutInAxisOperation.javaorg.apache.axis2.description.OutInAxisOperationClientexecuteImpl
OperationClient.javaorg.apache.axis2.client.OperationClientexecute
CSMVOUIServicesStub.javaau.com.qantas.csmvo.pmaui.services.CSMVOUIServicesStubupdateCustomerContact
SectorFunctionServiceClient.javaau.com.qantas.csmvo.pmaui.serviceclients.SectorFunctionServiceClientupdateCustomerContact
CustomerContactUpdateAction.javaau.com.qantas.csmvo.pmaui.actions.CustomerContactUpdateActionprocess
UIBaseAction.javaau.com.qantas.csmvo.pmaui.actions.UIBaseActionexecute
RequestProcessor.javaorg.apache.struts.action.RequestProcessorprocessActionPerform
RequestProcessor.javaorg.apache.struts.action.RequestProcessorprocess
ActionServlet.javaorg.apache.struts.action.ActionServletprocess
ActionServlet.javaorg.apache.struts.action.ActionServletdoPost
HttpServlet.javajavax.servlet.http.HttpServletservice
HttpServlet.javajavax.servlet.http.HttpServletservice
ServletStubImpl.javaweblogic.servlet.internal.ServletStubImpl$ServletInvocationActionrun
ServletStubImpl.javaweblogic.servlet.internal.ServletStubImplinvokeServlet
ServletStubImpl.javaweblogic.servlet.internal.ServletStubImplinvokeServlet
WebAppServletContext.javaweblogic.servlet.internal.WebAppServletContext$ServletInvocationActionrun
AuthenticatedSubject.javaweblogic.security.acl.internal.AuthenticatedSubjectdoAs
SecurityManager.javaweblogic.security.service.SecurityManagerrunAs
WebAppServletContext.javaweblogic.servlet.internal.WebAppServletContextinvokeServlet
ServletRequestImpl.javaweblogic.servlet.internal.ServletRequestImplexecute
ExecuteThread.javaweblogic.kernel.ExecuteThreadexecute
ExecuteThread.javaweblogic.kernel.ExecuteThreadrun


Subject: AxisFault: Read timed out error with Custom Socket Factory

2008-12-03 Thread Ramesh Vishwanatham
Hi All

I am getting "AxisFault: Read timed out error" when I override default 
socket factory mechanism 
mentined in one of Knowledge base article. 

1) Behaviour of the client is, it pauses for sometime after the 
handshakeCompleted is done and 
generates exception. Below is output and exception trace:

 [java] socket bound status=true
 [java] socket connection status=true
 [java] in handshakeCompleted method
 [java] Exception in thread "main" org.apache.axis2.AxisFault: Read 
timed out
 [java] at 
org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
 [java] at 
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193)
 [java] at 
org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
 [java] at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
 [java] at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
 [java] at 
org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
 [java] at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
 [java] at 
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
 [java] at 
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
 [java] at 
tc.MyQuoteService2Stub.getPrice(MyQuoteService2Stub.java:183)

 [java] at tc.MyNewClient.main(MyNewClient.java:59)


2) Below is the the client code:


public static void main(String [] args) throws Exception {

String url = "...";
String certFile = "...";
String password = "...";
 
SSLContext context = 
MyKeyStoreUtil.loadCertificate(certFile,password);
 
MySSLSocketFactory sslFactory = new 
MySSLSocketFactory(context);
Protocol myProtocolHandler = new Protocol("https", 
sslFactory, 443);
 
MyQuoteService2Stub service = new 
MyQuoteService2Stub(url);
Options opts = service._getServiceClient().getOptions();

opts.setProperty(HTTPConstants.CUSTOM_PROTOCOL_HANDLER, 
myProtocolHandler); 

MyQuoteService2Stub.GetPriceRequest request = new 
MyQuoteService2Stub.GetPriceRequest();
String symbol = "ABC";
request.setSymbol(symbol);

 
MyQuoteService2Stub.GetPriceResponse response = 
service.getPrice(request);

double value = response.getPrice();
System.out.println("price::" + value); 

}

3) I have also written a client using HttpClient api and this program 
works without any problems
and code is:

public static void main(String [] args) throws Exception {
String url = "...";
String certFile = "...";
String password = "...";

SSLContext context = 
MyKeyStoreUtil.loadCertificate(certFile,password);
 
MySSLSocketFactory sslFactory = new 
MySSLSocketFactory(context);
Protocol myProtocolHandler = new Protocol("https", 
sslFactory, 443);
Protocol.registerProtocol("https",myProtocolHandler); 
HttpClient httpclient = new HttpClient();
 
String soapFileName = "";
File input = new File(soapFileName);
PostMethod post = new PostMethod(url);
RequestEntity entity = new FileRequestEntity(input, 
"text/xml; charset=UTF-8");
post.setRequestEntity(entity);
post.setRequestHeader("SOAPAction", "getPrice");

int result = httpclient.executeMethod(post);
System.out.println("Response status code: " + result);
 
System.out.println("Response body: ");
 System.out.println(post.getResponseBodyAsString()); 
 

}

4) Here is the implementation for MySSLSocketFactory:

public class MySSLSocketFactory implements ProtocolSocketFactory, 
HandshakeCompletedListener {

public Socket
createSocket(String host, int port, InetAddress localAddress, int 
localPort,
HttpConnectionParams params) 
throws IOException, UnknownHostException, 
ConnectTimeoutException {


SSLSocketFactory factory = 
(SSLSocketFactory)context.getSocketFactory();
int timeout = params.getConnectionTimeout();

if(timeout == 0) {
return factory.createSocket(host, port,
localAddress,localPort);
}
else {
SSLSocket socket = (SSLSocket) 
factory.createSocket();
SocketAddress localaddr = new 
InetSocketAddress(localAddress,
localPort);
  

Java2wsdl gives [WARN] Unable to generate EPR for the transport : http

2008-12-03 Thread Paul French
Hello,
 
I have googled about without any luck!
 
When I run the following command to generate a WSDL from a java interface:
 
java2wsdl -cp . -cn com.kirona.webservices.MessageInterface -of
MessageService.wsdl
 
I get a warning.
 
[WARN] Unable to generate EPR for the transport : http
 
Could someone please tell me what this means and whether I need to worry
about it?
 
Thanks
Paul
 


Re: Message encryption works but fault messages are send in plain text

2008-12-03 Thread Maik Hassel


Since quite a few folks contacted me off list with the same issue,  
here a quick follow up: Turns out this is a solid bug in Rampart which  
- after some digging around in JIRA - has been known for quite a  
while. Thanks to Bob Jakobi for pointing me in the right direction on  
how to patch the Rampart code to fix it.


Please see https://issues.apache.org/jira/browse/RAMPART-193 for details

Quoting Maik Hassel <[EMAIL PROTECTED]>:


Hello everyone,

I have a web service using the security policy below (signed and
encrypted message body), which works fine, except that my fault
messages do not get encrypted. I get the "missing security header"
exception at the client - using TCPMon I can see that indeed the fault
message is send without any security related info and in plain text.

Am I missing something? Do I have to add additional configuration
parameters for the signing and encryption of fault messages?


Thanks for any hints,
Maik

 snip ---




http://www.w3.org/ns/wsdl/in-out";
class="ca.bc.xyz.SearchServicesMessageReceiverInOut"/>

ca.bc.xyz.SearchServiceImplementation
   
http://www.w3.org/ns/wsdl/in-out"; namespace="">
SyncSearch

...
urn:






http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";

xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";

xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
wsu:Id="mypolicy">




http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient";>









http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never";>






























http://ws.apache.org/rampart/policy";>
s1
useReqSigCert
   
ca.webservice.server.search.PasswordCallbackHandler




 JKS

  keystore.ks

 






JKS  

keystore.ks 















--
Simply Efficient - IT Services, Consulting, Training Inc.
"We Keep Our Promises"
Vancouver, BC
Phone: +1 604.315.8446
Fax  : +1 604.731.1147
http://www.simplyefficient.ca


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




--
Simply Efficient - IT Services, Consulting, Training Inc.
"We Keep Our Promises"
Vancouver, BC
Phone: +1 604.315.8446
Fax  : +1 604.731.1147
http://www.simplyefficie

SimpleHTTPServer service deployment location

2008-12-03 Thread Nowak Brad
Currently my implementation of the SimpleHTTPServer deploys my service
to http://localhost:8081/axis2/services/MyService.  How can I change the
deployment location to root, http://localhost:8081
 ?

 

I have tried modifying the contextRoot and servicePath to "/" but this
just seems to break it.

 

Any help or suggestions would be appreciated.

 

Thanks,

 

Brad



Axis2 rampart/MTOM

2008-12-03 Thread Erwin Reinhoud
 Hello,

I am using the rampart example 3 policy. I was wondering how to change
the policy so that only the client or service encripts/signs his
message.

I am also looking for info on how to utilize MTOM with an xs:anyuri so
metadata is send where the attachment can be downloaded through ftp for
example.

Any info is welcome.

Kind regards,

Erwin

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



Re: Multiple services.xml, one serviceGroup

2008-12-03 Thread Deepal Jayasinghe

> Hi,
>
>  
>
> I am implementing session-based web services. We use the
> servicegroup-based session.
>
>  
>
> Since I have a lot of services, I want to have single services.xml
> files for each service. But in order to have them share the same
> session, I must have them in the same serviceGroup.
>
>  
>
> Is it possible to have services in different services.xml but still in
> the same servicegroup??
>
Unfortunately no, only the services in one service group can shares the
sessions in a given session.However you can maintain the session using
configuration context, then you can maintain session without even
thinking about soap or transport session.

Deepal
>
>  
>
> Thank you for your help,
>
> Matthias.
>
>  
>

-- 
Thank you!


http://blogs.deepal.org


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



Multiple services.xml, one serviceGroup

2008-12-03 Thread Gaiser, Matthias
Hi,

 

I am implementing session-based web services. We use the
servicegroup-based session.

 

Since I have a lot of services, I want to have single services.xml files
for each service. But in order to have them share the same session, I
must have them in the same serviceGroup.

 

Is it possible to have services in different services.xml but still in
the same servicegroup??

 

Thank you for your help,

Matthias.

 



Re: Registering new handlers programmatically with Axis2

2008-12-03 Thread Amila Suriarachchi
On Wed, Dec 3, 2008 at 12:33 PM, Deepak Vishwakarma
<[EMAIL PROTECTED]>wrote:

> Hi,
>
>  Currently Axis2 registers the handlers specified in the axis2.xml
> configuration file.
>  Is there a way to programmatically register new custom handlers with Axis2
> runtime i.e. i don't want to use the axis2.xml approach? How can this be
> achieved?


see

addRequestBlockingHandlerToInFlows() method of this[1] class.

thanks,
Amila.

[1] 
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesClusterManager.java?view=markup


>
> Thanks,
> Deepak.
>
>
>  Add more friends to your messenger and enjoy! Go to
> http://messenger.yahoo.com/invite/
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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


Re: Registering new handlers programmatically with Axis2

2008-12-03 Thread Deepal Jayasinghe

> Hi,
>
>   Currently Axis2 registers the handlers specified in the axis2.xml 
> configuration file.
>   Is there a way to programmatically register new custom handlers with Axis2 
> runtime i.e. i don't want to use the axis2.xml approach? How can this be 
> achieved?
>   
Actually the correct way of adding handlers into Axis2 is not using
axis2.xml , we have done that just because ease of use for system
handlers. If you want to add a handler then the right approach would be
to write a module and engage that at the run time.

Deepal
> Thanks,
> Deepak.
>
>
>   Add more friends to your messenger and enjoy! Go to 
> http://messenger.yahoo.com/invite/
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>   

-- 
Thank you!


http://blogs.deepal.org


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



[Axis2] Invalid White space character (0x7)

2008-12-03 Thread Jan Verstuyft
Hi,

when a partner send us a SOAP message in UTF-8 with a BOM,  we receive
this kind of error.  Is there something we can do from our side to
prevent this from failing?
I'm afraid I already know the answer, but maybe I'm missing something.


For the record,  We are using Weblogic 8.1 on a Windows 2000 server
and Axis2 1.3

Here you find the errormessage we receive:
org.apache.axis2.AxisFault: Invalid white space character (0x7) in
text to output
 at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
 at 
org.apache.axis2.transport.http.ApplicationXMLFormatter.writeTo(ApplicationXMLFormatter.java:116)
 at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.sendUsingOutputStream(CommonsHTTPTransportSender.java:294)
 at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:211)
 at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
 at 
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:43)
 at 
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:96)
 at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
 at 
org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:125)
 at 
org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:119)
 at 
org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processURLRequest(AxisServlet.java:799)
 at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:242)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
 at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
 at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
 at 
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6452)
 at 
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
 at 
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
 at 
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
 at 
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
 at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
 at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Caused by: com.ctc.wstx.exc.WstxIOException: Invalid white space
character (0x7) in text to output
 at 
com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:511)
 at 
org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeCharacters(MTOMXMLStreamWriter.java:196)
 at 
org.apache.axiom.om.impl.llom.OMTextImpl.writeOutput(OMTextImpl.java:212)
 at 
org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeLocal(OMTextImpl.java:371)
 at 
org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeAndConsume(OMTextImpl.java:365)
 at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:785)
 at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:814)
 at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:785)
 at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:814)
 at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:785)
 at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:814)
 at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:785)
 at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:814)
 at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:785)
 at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:814)
 at 
org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:421)
 at 
org.apache.axis2.transport.http.ApplicationXMLFormatter.writeTo(ApplicationXMLFormatter.java:114)
 ... 22 more
Caused by: java.io.IOException: Invalid white space character
(0x7) in text to output
 at com.ctc.wstx.sw.XmlWriter.throwInvalidChar(XmlWriter.java:545)
 at 
com.ctc.wstx.sw.BufferingXmlWriter.writeCharacters(BufferingXmlWriter.java:531)
 at 
com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:509)
 ... 38 more


Kind regards

Jan

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



Re: Problem related to ADB when transferring a byte array [== AXIS2-3538]

2008-12-03 Thread Sven . Bloesl
The attached patch is sub-optimal. In AXIS2-3765 (wasn't aware that it is 
the same bug when i created the issue since we only have one byte[])  i 
proposed a patch which does not need the extra loop.
Nevertheless it works both ways..

I also patched it locally and we are going live with this patch, even 
though i am not really happy about this.






"Afkham Azeez" <[EMAIL PROTECTED]> 
03.12.2008 01:27
Bitte antworten an
axis-user@ws.apache.org


An
axis-user@ws.apache.org
Kopie

Thema
Re: Problem related to ADB when transferring a byte array [== AXIS2-3538]






Have you submitted this patch? Is this the same patch that is attached to 
JIRA issue AXIS2-3538? 

Thanks
Azeez

On Tue, Dec 2, 2008 at 2:07 PM, Andrea Spinelli <[EMAIL PROTECTED]
> wrote:

Marc F. wrote:
 
To demonstrate a possible bug in ADB Webservice I attached a zip file,
containing two aar files, and the source code as well.

 

Alas, I think this is a well-known issue:

 https://issues.apache.org/jira/browse/AXIS2-3538

I had an exchange of e-mails with Deepal, but it ended in nothing.

The issue was submitted on 24/Feb/08 09:13 AM and a suggestion for a patch 
is available from June 2008, but it is currently unassigned. It is marked 
as "critical".

In our organisation we wrote a patch, recompiled axis2, and we are using 
the patch (with success).  I can send the patch to anyone interested, but 
I think this is a REALLY BAD problem and should be fixed as soon as 
possible by the axis2 development team.

Is anyone in the axis2 team listening?

Hi
 Andrea

-- 
dott. Andrea Spinelli - IMTeam
e-mail: andrea dot spinelli at imteam dot it
phone: +39-035-636029
fax: +39-035-638129
www: http://www.imteam.it/
IANA enterprise number: 1.3.6.1.4.1.30916


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




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