axis 1.2 dime and mime attachments.

2008-09-01 Thread tinkywinky

Hello !

i got web service which receives an attachment from .NET service as DIME ,
adds this attachment to it's own response and sends back to client which
accepts only MIME attachments.
When client receives attachment some data seems to be lost, if original file
size were 356 000 bytes , client receives only 208 000 bytes.

would be glad to hear any solutions how to solve this! ^^,

Thanks in advance !

code looks something like that :

MyWebService service = new MyWebServiceLocator();

MyWebServiceSoap port = service.getenotarMyWebServiceSoap(new
URL(serviceurl)); // .NET setvice url

org.apache.axis.client.Stub stub = (Stub) port;
stub.setTimeout(1000 * 60);
stub.setUsername(login);
stub.setPassword(pwd);
stub._setProperty(AxisEngine.PROP_DOMULTIREFS, new Boolean("false"));
stub._setProperty(Call.ATTACHMENT_ENCAPSULATION_FORMAT,Call.ATTACHMENT_ENCAPSULATION_FORMAT_DIME);

DocumentInfo dinf = port.downloadDocument(dokument_id); // gets document
from .NET service

Object[] attachments = stub.getAttachments();

MessageContext.getCurrentContext().getResponseMessage().getAttachmentsImpl().setSendType(Attachments.SEND_TYPE_MIME);

try{
AttachmentPart ap = (AttachmentPart)attachments[0]; // always returns only 1
attachment .
MessageContext.getCurrentContext().getResponseMessage().addAttachmentPart(ap);

stub.clearAttachments();
} 
catch (AxisFault e){
throw e;
}
-- 
View this message in context: 
http://www.nabble.com/axis-1.2-dime-and-mime-attachments.-tp19250461p19250461.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Re: Axis2 REST client and server questions (Data bindings, Headers, Performance)

2008-09-01 Thread keith chapman
Hi Nick,

Sorry I couldn't get back to you sooner. Was held up with some travel
last week. So here goes, see my comments inline. (As a summary could
you try this with 1.4.1 as I did fix some REST bugs for this release)

On Thu, Aug 21, 2008 at 6:12 PM, Nick Steel
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I've recently started looking at using the REST support in Axis2 to invoke
> my web service instead of the currently used SOAP calls and I have a number
> of issues I can't work out for myself.  Any help with these would be great.
> I've been using Axis2 version 1.3 (and then also tried 1.4 in the hope my
> issues would be solved) and tcpmon to monitor the traffic between my test
> client and my service running locally on tomcat at
> http://localhost:8080/NicksGigs-war-Axis2/services/GigListingsService.  The
> WSDL is created using java2wsdl and is attached.
>
> I've read in another (old) post here that Axis2 is just a soap stack and any
> incoming rest style messages are converted into soap messages first so that
> they can then be processed. Is this still the case?

Yes. Axis2 is primarily a SOAP engine and hence once a message gets
into axis2 it has a SOAP message. So when Axis2 receives a REST
message we do create a SOAP message out of it.

Does this have a
> performance hit? Is there anything in the documentation about this?
>
>
> I'm using (unwrapped) ADB bindings generated by wsdl2java for my test
> client, to use the rest style web calls with the bindings is it simply a
> case of adding the line of code below into my client?
> options.setProperty(Constants.Configuration.ENABLE_REST,
> Constants.VALUE_TRUE);
> I want to clarify this since all the examples I have seen do not use
> bindings.
>
>
> Is it possible to use both POST and GET when my operation parameters are all
> simple types?  To change between the two transports is it simply a case of
> options.setProperty(Constants.Configuration.HTTP_METHOD, HTTP_METHOD_GET);
> Or
> options.setProperty(Constants.Configuration.HTTP_METHOD, HTTP_METHOD_POST);
> ?

Yes you could set the HTTP Method you need as explained above. Axis2
also supports PUT and DELETE.
>
>
> I've found that I can use POST with operations that have parameters but not
> on those without parameters.  For example, a call to getGigsIn("London")
> using HTTP_POST makes the following successful request:
> POST /NicksGigs-war-Axis2/services/GigListingsService HTTP/1.1
> Content-Type: application/xml; charset=UTF-8
> SOAPAction: urn:getGigsIn
> User-Agent: Axis2
> Content-Length: 115
>
>  xmlns:ns2="http://NicksGigs.nsteel.qis.qualcomm.com";>London
>
> But a call to getMostActiveArtist() makes the following unsuccessful
> request:
> POST /NicksGigs-war-Axis2/services/GigListingsService HTTP/1.1
> Content-Type: application/xml; charset=UTF-8
> SOAPAction: urn:getMostActiveArtist
> User-Agent: Axis2
> Content-Length: 0
>
> with received error:
> The endpoint reference (EPR) for the Operation not found is
> /NicksGigs-war-Axis2/services/GigListingsService and the WSA Action =
> null
>
> Why doesn't this work??
>
>
> After setting the HTTP_METHOD to HTTP_GET I am unable to make any successful
> calls to my service.  getGigsIn("London") gives:
> GET /NicksGigs-war-Axis2/services/GigListingsService?param0=London HTTP/1.1
> Content-Type: application/x-www-form-urlencoded;
> charset=UTF-8;action="urn:getGigsIn";
> SOAPAction: urn:getGigsIn
> User-Agent: Axis2
>
>  xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";> xml:lang="en-US">The endpoint reference (EPR) for the Operation not found is
> /NicksGigs-war-Axis2/services/GigListingsService and the WSA Action =
> null
>
> while getMostActiveArtist() gives:
> GET /NicksGigs-war-Axis2/services/GigListingsService HTTP/1.1
> Content-Type: application/x-www-form-urlencoded;
> charset=UTF-8;action="urn:getMostActiveArtist";
> SOAPAction: urn:getMostActiveArtist
> User-Agent: Axis2
>
> And the same error response.
>
> Shouldn't the bindings be appending the operation name onto the end of the
> endpoint for me?  If I explicitly set the endpoint to
> http://localhost:8080/NicksGigs-war-Axis2/services/GigListingsService/getGigsIn
> it makes the following request:
> GET /NicksGigs-war-Axis2/services/GigListingsService/getGigsIn?param0=London
> HTTP/1.1
> Content-Type: application/x-www-form-urlencoded;
> charset=UTF-8;action="urn:getGigsIn";
> SOAPAction: urn:getGigsIn
> User-Agent: Axis2
>
> Which still gives an error, but this time:
>  xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";> xml:lang="en-US">Exception occurred while trying to invoke service method
> getGigsIn
>
> If I simply go to
> http://localhost:8080/NicksGigs-war-Axis2/services/GigListingsService/getGigsIn?city=London
> in my browser I get the correct response.

The above should work for you correctly with codegenerated stubs. Can
you try this with Axis2 -1.4.1 please. I fixed some bugs on REST
invocation for this release and verified that these stuff work.
>
> For me, one of the

Re: [Axis2] Where to get JDK 1.4.2 compatible versions of Axis2 1.3 and 1.4 WAR distros

2008-09-01 Thread Amila Suriarachchi
On Tue, Aug 26, 2008 at 1:39 AM, Chris Miller <[EMAIL PROTECTED]>wrote:

> Hi everybody,
>
> we would like to run Axis2 in a pre Java 5 environment and are discovering
> problems with WebSphere 5.1 which runs on JDK 1.4.2.
>
> We get Unnsupported Major Minor version exceptions (49.0) using the WAR
> distribution of Axis2 1.3.

Can you find out the class to which you get this exception? The following
modules are
shift with jdk 1.5.

modules/jaxbri
modules/metadata
modules/saaj-api
modules/saaj
modules/jws-api
modules/jaxws-api
modules/jaxws
modules/jaxws-integration
modules/clustering
modules/corba


thanks,
Amila.

>
>
> Some of the jars have a "built using 1.5" tag in their manifests.
>
> Could somebody please confirm that the versions are fully (and the used
> jars) are fully compatible with 1.4.2 (as stated on the project page)?
>
> Or for the worst case: Can anybody tell me where to get a full 1.4.2
> compliant version of Axis2, either 1.3 oder 1.4 and the used libs?
>
> Again: Thanks for your work and your support!
>
> Kind regards,
>
> Chris
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.


Re: can not generate async server sode code

2008-09-01 Thread Amila Suriarachchi
On Fri, Aug 29, 2008 at 6:20 PM, Damin <[EMAIL PROTECTED]> wrote:

>
> I am trying to generate asynchronous server side code with the following
> ant
> script:
>
> ...
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ...
>
> I expect to get the generated class like:
>
>  public class KioskMessageReceiverInOut extends
> org.apache.axis2.receivers.AbstractInOutAsyncMessageReceiver {


this is an Depricated class. you can not generate a AsyncMessage receiver.
set the messageReceiver.invokeOnSeparateThread parameter in the services.xml
file.

thanks,
Amila.

>
>
> However, I still got the class like:
>
>  public class KioskMessageReceiverInOut extends
> org.apache.axis2.receivers.AbstractInOutMessageReceiver{
>
> That is, the -a option has no effect to the code gegeration result.
>
> Could any one give me a solution?
>
> Thanks a lot!
>
> -Damin
>
>
>
> --
> View this message in context:
> http://www.nabble.com/can-not-generate-async-server-sode-code-tp19219233p19219233.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.


Re: Client closing TCP connection

2008-09-01 Thread keith chapman
Hi Michael,

Can you try setting the property below.

stub._setServiceClient.getOptions.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION,
true);

Thanks,
Keith.

On Fri, Aug 29, 2008 at 7:47 PM, Michael Sutter
<[EMAIL PROTECTED]> wrote:
> Hello everybody,
>
> I have a problem with my Axis2 Java client polling a Axis2C server. The
> client
> is polling a status method of my server every ten seconds. After running
> some
> hours a always got a exception on client side, that to many files are
> opened.
>
> So I searched where the problem is coming from and I found out, that the TCP
> connections of my client are not closed after the operation is performed.
> With lsof I see a increasing number of opened TCP connections like this:
> java  11035 auger   12u  IPv62621843TCP
> ipecdas.fzk.de:45114->192.168.12.100:http (CLOSE_WAIT)
>
> with the close_wait state. Is there any solution how I can close the
> connection
> from the Axis api? I tried stub.cleanup() and I always instantiated my stub
> new
> for every query. Nevertheless, both solutions don't fixed my problem.
>
> Kind regard
> Michael
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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

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

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



Re: Axis Fault exception

2008-09-01 Thread keith chapman
Could you try this with Axis2 instead. If you are a newbie to axis
then I recommend you to use Axis2 instead of Axis2.

Thanks,
Keith.

On Sat, Aug 30, 2008 at 12:11 AM, unbeatable <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi,
>
> I was trying to play with Web Services and Apache Axis. What I did was I
> grabbed the WSDL file of a web service built using XFire and tried to
> generate client side stubs and interfaces. I was successful in that. Then, I
> developed a client class for this, a simple java app. Until this point,
> everything seems fine.
>
> Then started the hurdles. I ran the client and it threw me an Axis Fault
> exception. Its throwing the erro when I invoke the service.
>
> This is what I did in the client:
>
>StockSoapBindingStub stub = new StockSoapBindingStub(
>new URL("http://";),
>new Stock_ServiceLocator());
>String stock = stub.testStock();
>
>
>
> AxisFault
>  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
>  faultSubcode:
>  faultString: Parameter testStockAttributes does not exist!
>  faultActor:
>  faultNode:
>  faultDetail:
>{http://xml.apache.org/axis/}stackTrace:Parameter testStockAttributes 
> does
> not exist!
>at
> org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
>at
> org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
>at
> org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
>at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
>at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)
>at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
>at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
>at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
>at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
>at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
>at
> org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
>at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
>at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
>at
> org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796)
>at 
> org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
>at
> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
>at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
>at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
>at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
>at org.apache.axis.client.Call.invoke(Call.java:2767)
>at org.apache.axis.client.Call.invoke(Call.java:2443)
>at org.apache.axis.client.Call.invoke(Call.java:2366)
>at org.apache.axis.client.Call.invoke(Call.java:1812)
>
> Does anyone have an idea why this exception has to show up?
> Thanks in advance.
>
>
>
>
>
> --
> View this message in context: 
> http://www.nabble.com/Axis-Fault-exception-tp19225005p19225005.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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

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

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



Re: Want to use the same message receiver for all operations!!

2008-09-01 Thread Amila Suriarachchi
Resending this seems to be problem with my mail client. Please ignore if
already received.

try something like this



http://www.w3.org/ns/wsdl/in-out";
class="test.kp.service.POJOServiceMessageReceiverInOut"/>

true
http://www.w3.org/ns/wsdl/in-out";
namespace="http://service.kp.test";>
urn:echoPerson



Here when you set supportSingleOperation it dispatch it to any available
operation. regardless of the
soap action.

thanks,
Amila.


On Fri, Aug 29, 2008 at 8:50 PM, murugess <[EMAIL PROTECTED]> wrote:

>
> Thanks Chinthaka. I am so glad to see active participation from axis2 team
> in
> this forum.
>   I feel many folks might be having this requirement wherein they want to
> write a single gateway service that recieves all the requests and then
> dispatches it to the right handler dynamically. This gateway service need
> not be changed each time a new handler ( operation) is added. It should by
> default recieve all the requests directed to it.
> I am waiting to hear from dev team.
>
> Regards,
> Sanjay
>
>
>
> Eran Chinthaka-3 wrote:
> >
> > This is an interesting scenario.
> >
> > Axis2, by design, requires every message to be associated with a service
> > and
> > an operation. And this is checked in the dispatching phase. If you don't
> > have operations defined, then you might have to hack a little bit. IIRC,
> > you
> > can now add handlers before the dispatching phase.
> >
> > I'm forwarding this message to dev list also, so that people over there
> > knows better than I do about this.
> >
> > Thanks,
> > Chinthaka
> >
> > On Thu, Aug 28, 2008 at 7:25 PM, murugess <[EMAIL PROTECTED]> wrote:
> >
> >>
> >> Hi Chinthaka,
> >>Really appreciate your quick reply. yes, I am trying to tackle the
> >> second case where in all the requests directed to the service regardless
> >> of
> >> operation should go to the same reciever. Basically, I have a servlet
> >> which
> >> recieves all the soap requests sent through http. This servlet will
> >> receive
> >> all the requests sent to a given url ( say
> >> http://www.foo.com/abc/servlet)
> >> with any soap action header. Now, I am trying to replace this servlet
> >> with
> >> axis2. I want to deal directly with XML using axiom apis and avoid
> >> marshalling and de marshalling of xmls to java objects.
> >>As per my understanding, and by what you explained, axis2 dispatcher
> >> identifies the service and the operation name and then finds the
> >> corresponding entry in the services.xml.  Since, I don't have any
> >> operations
> >> specified in the services.xml, it throws up an error.
> >>What kind of handler should I write in order to avoid the above
> error?
> >>
> >> Thanks,
> >> Sanjay
> >>
> >>
> >> Eran Chinthaka-3 wrote:
> >> >
> >> > Do you want to get all the message related to a given service in to
> one
> >> > message receiver? Or is it that you want to get all the messages,
> >> > irrespective of the service to get to one message receiver?
> >> >
> >> > If it is the first case, then register one message receiver class name
> >> for
> >> > all the MEPs.
> >> >
> >> > IIRC, this is how Axis2 internals work. When you get a SOAP message,
> we
> >> > will
> >> > first identify the service and the operation this message is going to.
> >> > Every
> >> > operation is connected to a MEP (http://wso2.org/library/335), and a
> >> > message
> >> > receiver is also bound to a message receiver for a given service. One
> >> the
> >> > operation and the service is found, service.xml details are used to
> >> > retrieve
> >> > the message receiver connected to the MEP of that operation.
> >> >
> >> > If it is the second case, then you might have to write a handler to do
> >> > this.
> >> >
> >> >
> >> > HTH.
> >> > Chinthaka
> >> >
> >> > On Wed, Aug 27, 2008 at 7:56 PM, murugess <[EMAIL PROTECTED]> wrote:
> >> >
> >> >>
> >> >> I want the same message reciever to be invoked for a service
> >> regardless
> >> >> of
> >> >> whatever the soap action comes in the request. Basically I am trying
> >> to
> >> >> simulate a servlet which will get all the requests targeted to it. I
> >> dont
> >> >> have any service implementation class and no wsdl in the services
> >> folder.
> >> >>
> >> >> Here is what I have in services.xml:
> >> >>
> >> >>
> >> >>
> >> >>http://www.w3.org/ns/wsdl/in-out";
> >> >> class="com.xyz.GenericMessageReceiverInOut"/>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> I can't put any opertions name as I want the same
> >> >> GenericMessageReceiverInOut to be invoked for all operations  ( or
> >> >> requests
> >> >> with any soapaction or wsa action).
> >> >>
> >> >>
> >> >> When I send the request using a client, I get following exception:
> >> >>
> >> >> org.apache.axis2.AxisFault: The endpoint reference (EPR)
> >> for
> >> >> the
> >> >> Operation not found is
> >> >> http://localhost:8080/CRMGWServer/services/GenericFeedService and

Re: Axis2 and Tomcat 5.0.28 commons-logging-api

2008-09-01 Thread Marc F.


Anthony Bull wrote:
> 
> Its better to use commons-logging 1.1.1 as from memory 1.0.4 has a
> problem that causes Tomcat to not shutdown properly on some platforms. 
> 

Yes, I was expecting that version 1.1.1 would be better than 1.0.4.
Generally newer versions are better than older versions, unless the new one
introduces a new bug :)

But when I replace the version 1.0.4 of commons-loggins-api, located in the
[CATALINA_HOME]/bin/ directory of Tomcat 5.0.28, by the newer version 1.1.1,
without forgetting to rename the jar file to "commons-logging-api.jar", due
to this file name be hardcoded in Tomcat, the Axis2 context is not being
initialized, and I do not know why! Anything else is being correctly
initialized (the Tomcat itself and all the rest of the contexts), except the
axis2 context. For me that's a really strange, unexpected, and illogical
behavior. Axis2 is supposed to work with the version 1.1.1 of
commons-logging API, then why isn't its context being initialized?

I don't know, but I suspect Axis2 uses the "commons-logging-1.1.1.jar" file
located in the [CATALINA_HOME]/webapps/axis2/WEB-INF/lib/ directory, and
ignores the one located in the [CATALINA_HOME]/bin/. But, if that's true,
then how does Axis2 do such a thing? If my assumptions are correct, then how
is Axis2 capable of ignoring the classloading mechanism of Tomcat?

I've already tried to delete the "commons-logging-1.1.1.jar" jar file from
the [CATALINA_HOME]/webapps/axis2/WEB-INF/lib/ directory, so that the only
possible location of commons-loggin API is the one located in the
[CATALINA_HOME]/bin/, but this attempt was unsuccessful.

You can try all these things, and you can check for yourself that what I am
saying is unfortunately true.

Anyway, the most strange thing is that when I try to make the
commons-logging-api located in the [CATALINA_HOME]/bin/ equal to the one
located in the [CATALINA_HOME]/webapps/axis2/WEB-INF/lib/ (both equal to the
version 1.1.1) the axis2 context is not being initialized. For me, the
logical and expected behavior is exactly the opposite! There aren't logical
reasons that explain why axis2 context is not being initialized.


Thanks.
-- 
View this message in context: 
http://www.nabble.com/Axis2-and-Tomcat-5.0.28-commons-logging-api-tp19242773p19252397.html
Sent from the Axis - User mailing list archive at Nabble.com.


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



Re: Client closing TCP connection

2008-09-01 Thread Michael Sutter

Hello Keith,

I'm a little bit confused about your reply. Did you really mean that I 
should
set a new service client? Isn't the service client already set after 
initializing

my stub object?

What I have done is:
MyStub myStub = new MyStub();
myStub.._getServiceClient().getOptions().setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION, 
true);


Is this what you mean?
Nevertheless if I set the option I always got a AxisFault:
Attempted read on closed stream.

Maybe I have done something wrong?

Kind regards
Michael

keith chapman wrote:

Hi Michael,

Can you try setting the property below.

stub._setServiceClient.getOptions.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION,
true);

Thanks,
Keith.

On Fri, Aug 29, 2008 at 7:47 PM, Michael Sutter
<[EMAIL PROTECTED]> wrote:
  

Hello everybody,

I have a problem with my Axis2 Java client polling a Axis2C server. The
client
is polling a status method of my server every ten seconds. After running
some
hours a always got a exception on client side, that to many files are
opened.

So I searched where the problem is coming from and I found out, that the TCP
connections of my client are not closed after the operation is performed.
With lsof I see a increasing number of opened TCP connections like this:
java  11035 auger   12u  IPv62621843TCP
ipecdas.fzk.de:45114->192.168.12.100:http (CLOSE_WAIT)

with the close_wait state. Is there any solution how I can close the
connection
from the Axis api? I tried stub.cleanup() and I always instantiated my stub
new
for every query. Nevertheless, both solutions don't fixed my problem.

Kind regard
Michael

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







  


Re: Client closing TCP connection

2008-09-01 Thread Michael Sutter

Hello Keith,

I played a bit with the option and found out that I can use it
when
1. instantiate the stub
2. query the service
3. set the option
4. instantiate the stub new for every ten second

If it is working I can't say at the moment - the application
must run for some hours.

Was this with you meant in your mail?

Kind regards
Michael

Michael Sutter wrote:

Hello Keith,

I'm a little bit confused about your reply. Did you really mean that I 
should
set a new service client? Isn't the service client already set after 
initializing

my stub object?

What I have done is:
MyStub myStub = new MyStub();
myStub.._getServiceClient().getOptions().setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION, 
true);


Is this what you mean?
Nevertheless if I set the option I always got a AxisFault:
Attempted read on closed stream.

Maybe I have done something wrong?

Kind regards
Michael

keith chapman wrote:

Hi Michael,

Can you try setting the property below.

stub._setServiceClient.getOptions.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION,
true);

Thanks,
Keith.

On Fri, Aug 29, 2008 at 7:47 PM, Michael Sutter
<[EMAIL PROTECTED]> wrote:
  

Hello everybody,

I have a problem with my Axis2 Java client polling a Axis2C server. The
client
is polling a status method of my server every ten seconds. After running
some
hours a always got a exception on client side, that to many files are
opened.

So I searched where the problem is coming from and I found out, that the TCP
connections of my client are not closed after the operation is performed.
With lsof I see a increasing number of opened TCP connections like this:
java  11035 auger   12u  IPv62621843TCP
ipecdas.fzk.de:45114->192.168.12.100:http (CLOSE_WAIT)

with the close_wait state. Is there any solution how I can close the
connection
from the Axis api? I tried stub.cleanup() and I always instantiated my stub
new
for every query. Nevertheless, both solutions don't fixed my problem.

Kind regard
Michael

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







  


[ANN] Addressing 1.1 released at SourceForge.net

2008-09-01 Thread Rodrigo Ruiz

Hi everybody,

I am happy to announce that Addressing 1.1 is publicly available at:

http://addressing.sourceforge.net/


This library is a follow-up from the old Apache WS-FX Addressing 
project, which provided WS-Addressing support to Axis 1.x.


CHANGE LIST:
  - Build system moved to Maven2
  - Java 5 is now required
  - serialVersionUID fields added to all Serializable classes, to 
ensure compatibility with Addressing 1.0 (as long as possible)
  - Added MetaDataType bean, for API coherence (it extends from 
ArrayList, to keep compatibility)

  - Several bug fixes (detected by FindBugs)

A request for synchronizing to the Maven2 Central Repository is 
currently in progress. Once this is done, I will file a JIRA for 
uploading redirection POMs for the old artifacts (addressing:addressing 
and org.apache.ws:addressing). I will keep you informed :-)


Hope you enjoy it,
Rodrigo Ruiz


PS: Any comment or criticism (specially from the original authors, I 
would really like to hear from you) is more than welcome


--
---
GRID SYSTEMS, S.A. Rodrigo Ruiz
Parc Bit - Edificio 17 Research Coordinator
07121 Palma de Mallorcahttp://www.linkedin.com/in/rruiz
Baleares - Spain
http://www.gridsystems.com/
---

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



Re: Code Generator Wizard Plugin and Service Archive Wizard Plugin for Eclipse from Apache Axis2 Tools --> gives Http 404 error

2008-09-01 Thread Nandana Mihindukulasooriya
Hi,
  Download links are now fixed in the Axis2 site.

thanks,
nandana

On Mon, Sep 1, 2008 at 12:30 PM, Nandana Mihindukulasooriya <
[EMAIL PROTECTED]> wrote:

> Hi Saminda,
> There is some problem with the links in the web site and I will fix
> then ASAP. And yes, there was no change from 1.4 to 1.4.1 in either Eclipse
> Codegen Wizard or Eclipse Service Archive Wizard. The correct links for
> 1.4.1 are
>
>
> http://www.ibiblio.org/pub/mirrors/apache/ws/axis2/tools/1_4_1/axis2-eclipse-codegen-wizard.zip
>
> http://www.ibiblio.org/pub/mirrors/apache/ws/axis2/tools/1_4_1/axis2-eclipse-service-archiver-wizard.zip
>
> And yes, they are mirrored correctly in all the Apache download mirrors and
> will work once the links are fixed.
>
> thanks,
> nandana
>
>
>
> On Mon, Sep 1, 2008 at 11:44 AM, Saminda Wijeratne <[EMAIL PROTECTED]>wrote:
>
>> I dont know why It is as such, but the problem is that they haven't
>> updated the links/locations when the new version of axis 1.4.1 came out. You
>> can download the 1.4 version by using the same links with having 1.4 instead
>> of 1.4.1 in the link. As i know there is no difference between the 1.4 and
>> 1.4.1 for eclipse plugins.
>>
>> eg:
>>   current link =>
>> http://www.ibiblio.org/pub/mirrors/apache/ws/axis2/tools/1_4_1/axis2-eclipse-codegen-wizard-1.4.1.zip
>>   correct link =>
>> http://www.ibiblio.org/pub/mirrors/apache/ws/axis2/tools/1_4/axis2-eclipse-codegen-wizard-1.4.zip
>>
>> i pressume all the mirror links should work if the links or the locations
>> are updated.
>>
>> Regards
>> Saminda
>>
>>
>> MShah wrote:
>>
>>> I finally got this from the source on one of the mirrors.
>>>
>>> Thanks,
>>>
>>> Monisha
>>>
>>>
>>> Nadun Herath-2 wrote:
>>>
>>>
 Hi Monisha

 Try this.

 Choose "Help |
 Software Updates | Find and Install", choose "Search for new features to
 install", choose "Eclipse.org update site",  then search weather that
 file
 is available. WTP now has the web services support as well.


  Nadun Malaka Herath
 Faculty of Engineering Department of Computer Engineering
 University of Peradeniya



 - Original Message 
 From: MShah <[EMAIL PROTECTED]>
 To: axis-user@ws.apache.org
 Sent: Friday, August 29, 2008 4:47:19 AM
 Subject: Code Generator Wizard Plugin and Service Archive Wizard Plugin
 for Eclipse from Apache Axis2 Tools --> gives Http 404 error


 I am trying to get the Code Generator Wizard Plugin and Service Archive
 Wizard Plugin for Eclipse from Apache Axis2 Tools site at :
 http://ws.apache.org/axis2/tools/index.html

 When I try to clickn on any of the mirrors to download the two plugins I
 get
 HTTP 404 error.
 Is there any other location from where I can download the above
 mentioned
 plugins for eclipse.  Your input in this regards will be much
 appreciated.

 Best regards,

 Monisha
 --
 View this message in context:

 http://www.nabble.com/Code-Generator-Wizard-Plugin-and-Service-Archive-Wizard-Plugin-for-Eclipse-from-Apache-Axis2-Tools---%3E-gives-Http-404-error-tp19210984p19210984.html
 Sent from the Axis - User mailing list archive at Nabble.com.


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





>>>
>>>
>>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> --
> Nandana Mihindukulasooriya
> WSO2 inc.
>
> http://nandana83.blogspot.com/
> http://www.wso2.org
>


Re: Axis2 REST client and server questions (Data bindings, Headers, Performance)

2008-09-01 Thread Nick Steel

Thank you Jay and Keith for your replies.  I've upgraded to version 1.4.1 but
this had made no difference.  Below is a really simple version of my code
taking the options used by Jay in his working service but I can still only
get the correct response using getGigsIn() with POST, every other
combination else fails with: 
http://www.w3.org/2003/05/soap-envelope";>
The endpoint reference (EPR) for the
Operation not found is /NicksGigs-war-Axis2/services/GigListingsService and
the WSA Action = null"

SimpleREST.java:
String epr =
"http://localhost:8089/NicksGigs-war-Axis2/services/GigListingsService";;
NicksGigsServiceStub portal = new NicksGigsServiceStub(epr);
Options options = portal._getServiceClient().getOptions();
options.setProperty(Constants.Configuration.ENABLE_REST, Boolean.TRUE);
options.setProperty(Constants.Configuration.HTTP_METHOD,
Constants.Configuration.HTTP_METHOD_POST); 
options.setProperty(Constants.Configuration.MESSAGE_TYPE,
//org.apache.axis2.transport.http.HTTPConstants.MEDIA_TYPE_X_WWW_FORM);
//options.setProperty(Constants.Configuration.DISABLE_SOAP_ACTION,
Constants.VALUE_TRUE);
options.setCallTransportCleanup(true);
options.setTransportInProtocol(Constants.TRANSPORT_HTTP); 
portal._getServiceClient().setOptions(options);
Gig[] results = portal.getGigsIn("London");
for (int j = 0; j < results.length; j++) 
System.out.println(results[j].getToString());

Note that I had to comment out the MESSAGE_TYPE property for this to work. I
have also commented out the SOAP_ACTION property here since although it did
remove the action(s) in the header it didn't make any difference to the end
result. 

The thing which strikes me most about this is that whether using GET or POST
the bindings do not append the method names to the endpoint like I would
expect them to.  I wrongly assumed that at some point the axis generated
code would do something like endpoint+"/"+methodName but it doesn't seem
to...  Is this correct behaviour?

I took a look at the blog entry and after a closer look at my WSDL it seems
that the one generated at 
...NicksGigs-war-Axis2/services/GigListingsService?wsdl has the correct
parameter names, but the wsdl generated by the maven java2wsdl plugin and
then subsequently used by wsdl2java to create my stub has the param0, param1
names. Maven automatically compiles with debug on and I've made no changes
to this so I am a bit confused why I'm getting this. Even more so by the
fact that if I create unwrapped bindings then the correct parameter names
are used.

Thanks
Nick

 
   


keith chapman wrote:
> 
> Hi Nick,
> 
> Sorry I couldn't get back to you sooner. Was held up with some travel
> last week. So here goes, see my comments inline. (As a summary could
> you try this with 1.4.1 as I did fix some REST bugs for this release)
> 
> On Thu, Aug 21, 2008 at 6:12 PM, Nick Steel
> <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> I've recently started looking at using the REST support in Axis2 to
>> invoke
>> my web service instead of the currently used SOAP calls and I have a
>> number
>> of issues I can't work out for myself.  Any help with these would be
>> great.
>> I've been using Axis2 version 1.3 (and then also tried 1.4 in the hope my
>> issues would be solved) and tcpmon to monitor the traffic between my test
>> client and my service running locally on tomcat at
>> http://localhost:8080/NicksGigs-war-Axis2/services/GigListingsService. 
>> The
>> WSDL is created using java2wsdl and is attached.
>>
>> I've read in another (old) post here that Axis2 is just a soap stack and
>> any
>> incoming rest style messages are converted into soap messages first so
>> that
>> they can then be processed. Is this still the case?
> 
> Yes. Axis2 is primarily a SOAP engine and hence once a message gets
> into axis2 it has a SOAP message. So when Axis2 receives a REST
> message we do create a SOAP message out of it.
> 
> Does this have a
>> performance hit? Is there anything in the documentation about this?
>>
>>
>> I'm using (unwrapped) ADB bindings generated by wsdl2java for my test
>> client, to use the rest style web calls with the bindings is it simply a
>> case of adding the line of code below into my client?
>> options.setProperty(Constants.Configuration.ENABLE_REST,
>> Constants.VALUE_TRUE);
>> I want to clarify this since all the examples I have seen do not use
>> bindings.
>>
>>
>> Is it possible to use both POST and GET when my operation parameters are
>> all
>> simple types?  To change between the two transports is it simply a case
>> of
>> options.setProperty(Constants.Configuration.HTTP_METHOD,
>> HTTP_METHOD_GET);
>> Or
>> options.setProperty(Constants.Configuration.HTTP_METHOD,
>> HTTP_METHOD_POST);
>> ?
> 
> Yes you could set the HTTP Method you need as explained above. Axis2
> also supports PUT and DELETE.
>>
>>
>> I've found that I can use POST with operations that have parameters but
>> not
>> on those without parameters.  For example, a call to getGigsIn("London")
>

Re: Client closing TCP connection

2008-09-01 Thread keith chapman
Hi Michael,

Are you using the same instance of the service client over and over
again or instantiating it each time?

Thanks,
Keith.

On Mon, Sep 1, 2008 at 5:00 PM, Michael Sutter
<[EMAIL PROTECTED]> wrote:
> Hello Keith,
>
> I played a bit with the option and found out that I can use it
> when
> 1. instantiate the stub
> 2. query the service
> 3. set the option
> 4. instantiate the stub new for every ten second
>
> If it is working I can't say at the moment - the application
> must run for some hours.
>
> Was this with you meant in your mail?
>
> Kind regards
> Michael
>
> Michael Sutter wrote:
>
> Hello Keith,
>
> I'm a little bit confused about your reply. Did you really mean that I
> should
> set a new service client? Isn't the service client already set after
> initializing
> my stub object?
>
> What I have done is:
> MyStub myStub = new MyStub();
> myStub.._getServiceClient().getOptions().setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION,
> true);
>
> Is this what you mean?
> Nevertheless if I set the option I always got a AxisFault:
> Attempted read on closed stream.
>
> Maybe I have done something wrong?
>
> Kind regards
> Michael
>
> keith chapman wrote:
>
> Hi Michael,
>
> Can you try setting the property below.
>
> stub._setServiceClient.getOptions.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION,
> true);
>
> Thanks,
> Keith.
>
> On Fri, Aug 29, 2008 at 7:47 PM, Michael Sutter
> <[EMAIL PROTECTED]> wrote:
>
>
> Hello everybody,
>
> I have a problem with my Axis2 Java client polling a Axis2C server. The
> client
> is polling a status method of my server every ten seconds. After running
> some
> hours a always got a exception on client side, that to many files are
> opened.
>
> So I searched where the problem is coming from and I found out, that the TCP
> connections of my client are not closed after the operation is performed.
> With lsof I see a increasing number of opened TCP connections like this:
> java  11035 auger   12u  IPv62621843TCP
> ipecdas.fzk.de:45114->192.168.12.100:http (CLOSE_WAIT)
>
> with the close_wait state. Is there any solution how I can close the
> connection
> from the Axis api? I tried stub.cleanup() and I always instantiated my stub
> new
> for every query. Nevertheless, both solutions don't fixed my problem.
>
> Kind regard
> Michael
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>



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

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

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



Re: Axis2 REST client and server questions (Data bindings, Headers, Performance)

2008-09-01 Thread keith chapman
Hi Nick,

If you want to invoke a service using REST then its better to generate
the client stub for the httpBinding (and when doing so I recommend you
to use ?wsdl2 instead of ?wsdl). This is what describes the REST
interface of the service. This is where it will contain details of the
URL the operation is available at hence if this binding is used to
invoke the service it will automatically add the operation name to the
end of the EPR. This does not happen for the SOAP bindings though.
This is the reason for the behavior you observed below.

In the request you have sent below does not contain enough information
to dispatch it to the correct operation of the service. If you had the
operation name at the end of it it would have worked. And BTW when you
are using service client directly it will not append the operation
name to the EPR. Note that you have to configure the ServiceClient
your self when using this. (This is not the case for stubs generated
for the httpBinding though).

On Mon, Sep 1, 2008 at 9:07 PM, Nick Steel
<[EMAIL PROTECTED]> wrote:
>
> Thank you Jay and Keith for your replies.  I've upgraded to version 1.4.1 but
> this had made no difference.  Below is a really simple version of my code
> taking the options used by Jay in his working service but I can still only
> get the correct response using getGigsIn() with POST, every other
> combination else fails with:
> http://www.w3.org/2003/05/soap-envelope";>
>The endpoint reference (EPR) for the
> Operation not found is /NicksGigs-war-Axis2/services/GigListingsService and
> the WSA Action = null"
>
> SimpleREST.java:
> String epr =
> "http://localhost:8089/NicksGigs-war-Axis2/services/GigListingsService";;
> NicksGigsServiceStub portal = new NicksGigsServiceStub(epr);
> Options options = portal._getServiceClient().getOptions();
> options.setProperty(Constants.Configuration.ENABLE_REST, Boolean.TRUE);
> options.setProperty(Constants.Configuration.HTTP_METHOD,
> Constants.Configuration.HTTP_METHOD_POST);
> options.setProperty(Constants.Configuration.MESSAGE_TYPE,
> //org.apache.axis2.transport.http.HTTPConstants.MEDIA_TYPE_X_WWW_FORM);
> //options.setProperty(Constants.Configuration.DISABLE_SOAP_ACTION,
> Constants.VALUE_TRUE);
> options.setCallTransportCleanup(true);
> options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
> portal._getServiceClient().setOptions(options);
> Gig[] results = portal.getGigsIn("London");
> for (int j = 0; j < results.length; j++)
>System.out.println(results[j].getToString());
>
> Note that I had to comment out the MESSAGE_TYPE property for this to work. I
> have also commented out the SOAP_ACTION property here since although it did
> remove the action(s) in the header it didn't make any difference to the end
> result.
>
> The thing which strikes me most about this is that whether using GET or POST
> the bindings do not append the method names to the endpoint like I would
> expect them to.  I wrongly assumed that at some point the axis generated
> code would do something like endpoint+"/"+methodName but it doesn't seem
> to...  Is this correct behaviour?
>
> I took a look at the blog entry and after a closer look at my WSDL it seems
> that the one generated at
> ...NicksGigs-war-Axis2/services/GigListingsService?wsdl has the correct
> parameter names, but the wsdl generated by the maven java2wsdl plugin and
> then subsequently used by wsdl2java to create my stub has the param0, param1
> names. Maven automatically compiles with debug on and I've made no changes
> to this so I am a bit confused why I'm getting this. Even more so by the
> fact that if I create unwrapped bindings then the correct parameter names
> are used.

This is strange. I haven't tried this out though (wsdl2java maven
plugin). Would give it a try and let you know.

Thanks,
Keith.
>
> Thanks
> Nick
>
>
>
>
>
> keith chapman wrote:
>>
>> Hi Nick,
>>
>> Sorry I couldn't get back to you sooner. Was held up with some travel
>> last week. So here goes, see my comments inline. (As a summary could
>> you try this with 1.4.1 as I did fix some REST bugs for this release)
>>
>> On Thu, Aug 21, 2008 at 6:12 PM, Nick Steel
>> <[EMAIL PROTECTED]> wrote:
>>>
>>> Hi,
>>>
>>> I've recently started looking at using the REST support in Axis2 to
>>> invoke
>>> my web service instead of the currently used SOAP calls and I have a
>>> number
>>> of issues I can't work out for myself.  Any help with these would be
>>> great.
>>> I've been using Axis2 version 1.3 (and then also tried 1.4 in the hope my
>>> issues would be solved) and tcpmon to monitor the traffic between my test
>>> client and my service running locally on tomcat at
>>> http://localhost:8080/NicksGigs-war-Axis2/services/GigListingsService.
>>> The
>>> WSDL is created using java2wsdl and is attached.
>>>
>>> I've read in another (old) post here that Axis2 is just a soap stack and
>>> any
>>> incoming rest style messages are converted into soap messages first so
>>> that
>>> they can then 

Re: Axis2/Java and JSON

2008-09-01 Thread keith chapman
Hi Nick,

I gave this a try and it works for me. In my example scenario I access
a service which is deployed on a WSO2 Mashup Server [1] on mooshup.com
(The WSO2 Mashup Server runs on top of Axis2). the service I access is
the RESTSample [2]. My client is as follows,

ServiceClient serviceClient = new
ServiceClient(ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,
"/opt/repo/axis2_default.xml"), null);
Options options = new Options();
options.setTo(new
EndpointReference("http://mooshup.com/services/samples/RESTSample/getWeather";));
serviceClient.setOptions(options);
OMElement payload =
AXIOMUtil.stringToOM("col");

options.setProperty(Constants.Configuration.MESSAGE_TYPE,"application/json/badgerfish");
OMElement omElement = serviceClient.sendReceive(payload);
omElement.serialize(System.out);

The TCPMon traces of the messages are,
Input

POST /services/samples/RESTSample/getWeather HTTP/1.1

Content-Type: application/json/badgerfish; charset=UTF-8

User-Agent: Axis2

Host: 127.0.0.1

Transfer-Encoding: chunked



23

{"getWeather":{"city":{"$":"col"}}}

0


Output

HTTP/1.1 200 OK

Server: Apache-Coyote/1.1

Content-Type: application/json/badgerfish;charset=UTF-8

Transfer-Encoding: chunked

Date: Mon, 01 Sep 2008 14:40:35 GMT



73

{"ws:getWeatherResponse":{"@xmlns":{"ws":"http:\/\/services.mashup.wso2.org\/RESTSample?xsd"},"return":{"$":"10"}}}

0


BTW the JavaScript module on the WSO2 Mashup Server [1] up on
mooshup.com is the one shipped with the 1.4 release of Axis2. And as
you see it works fine. Can you give this a try please.

Thanks,
Keith.

[1] http://wso2.org/projects/mashup
[2] http://mooshup.com/mashup.jsp?author=samples&mashup=RESTSample

On Fri, Aug 29, 2008 at 9:13 PM, Nick Steel
<[EMAIL PROTECTED]> wrote:
>
> Following my unresolved problem with REST last week I tried using JSON and
> have had more problems!  I followed the guide at http://wso2.org/library/768
> and the sample yahoojsonsearch in the axis2 samples.  I set the message
> builders and formatters in the axis2.xml as instructed.  I then firstly
> tried to use my existing ADB bindings with the ContentType property set to
> "application/json" and when they failed to work I tried constructing the
> OMElement myself as in the sample but with no success.  Then I tried a
> mixture of the two which is the only way I can get a response!
>
> client = new ServiceClient(super.getConfigContext(),
> Options options = client.getOptions();
> options.setProperty(Constants.Configuration.MESSAGE_TYPE,
> "application/json");
> client.setTargetEPR(new EndpointReference(endpointUrl));
>
> GetGigsIn getGigsInObj = new GetGigsIn();
> getGigsInObj.setParam0(city);
> OMElement rootElement = getGigsInObj.getOMElement(GetGigsIn.MY_QNAME, fac);
> OMElement response = client.sendReceive(rootElement);
>
> However it throws an exception after during the last line and TCPmon shows
> the request and response as:
> POST /NicksGigs-war-Axis2/services/GigListingsService HTTP/1.1
> Content-Type: application/json; charset=UTF-8
> User-Agent: Axis2
> Host: 10.4.39.241:8089
> Transfer-Encoding: chunked
>
> 69
> {"ns2:getGigsIn":{"@xmlns":{"ns2":"http:\/\/NicksGigs.nsteel.qis.Nickcom.com"},"param0":{"$":"London"}}}
> 0
> --
> HTTP/1.1 500 Internal Server Error
> Server: Apache-Coyote/1.1
> Content-Type: application/json;charset=UTF-8
> Transfer-Encoding: chunked
> Date: Fri, 29 Aug 2008 12:22:43 GMT
> Connection: close
>
> 10c
> {"Fault":{"$":" xmlns:soapenv=\"http:\/\/schemas.xmlsoap.org\/soap\/envelope\/\">soapenv:Server<\/faultcode>namespace
> mismatch require http:\/\/NicksGigs.nsteel.qis.Nickcom.com found
> <\/faultstring><\/soapenv:Fault>"}}
> 0
>
>
> After tracing through the serverside code I found that the empty namespace
> object is created in JSONOMBuilder at Line 52:
> OMNamespace ns = new OMNamespaceImpl("", "")
>
> And then only used to create a new OMSourcedElementImpl object at line 111:
> return new OMSourcedElementImpl(localName, ns, factory, jsonDataSource);
>
> After which point I dont know what happens to it.  If I then set an
> expression in Eclipse while debugging to manually set this namespace object
> [ns = new OMNamespaceImpl("http://NicksGigs.nsteel.qis.Nickcom.com";, "");]
> then the server returns a full response but something on the client side
> throws this exception:
> Caused by: org.apache.axiom.om.OMException:
> javax.xml.stream.XMLStreamException: Invalid prefix ns on element ns:return
>at
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:249)
>at
> org.apache.axiom.om.impl.llom.OMElementImpl.buildNext(OMElementImpl.java:633)
>at
> org.apache.axiom.om.impl.llom.OMSourcedElementImpl.buildNext(OMSourcedElementImpl.java:847)
>at
> org.apache.axiom.om.impl.llom.OMElementImpl.getFirstOMChild(OMElementImpl.java:650)
>at
> org.apache.axiom.om.impl.llom.OMSourcedElementImpl.g

Re: Strong types in Axis2 wsdl

2008-09-01 Thread keith chapman
Hi Jai,

Could you elaborate on what you mean by "Array" and "Structure"? Do
you mean the string values "Array" and "Structure"? or the actual
structure of an Array and Structure?

Thanks,
Keith.

On Thu, Aug 28, 2008 at 6:31 PM, Pugalia, Jai P (JP) <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have an Axis2 wsdl which exposes an ObjectType as
>
>  type="xs:string"/>
>
> I want to restrict the valid values to say "Array" and "Structure". If I
> change the element to be an enumeration, it does not work as looks like
> Axis2 does not support enumerations yet. Is there any other way I can make
> this strongly typed in the wsdl.
>
> Thanks,
> Jai



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

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

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



Re: fault string: parameter xxxx doesn't exist

2008-09-01 Thread keith chapman
Hi,

This means that the service expects a parameter called  in the
message and it was not present in the request (Or you havent set it
when sending the request). If you used a generated stub it would do
validation on the schema before even sending the message. Could you
explain what you tried. and may be attach the WSDL that you tried to
use.

Thanks,
Keith.

On Fri, Aug 29, 2008 at 8:51 AM, Abhishek Kaukuntla
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm new to web services and as well as to Apache Axis. I tried to grab a
> WSDL from a web service provider and generate a client to access that web
> service. Everything seemed perfect until I ran the client to find Axis Fault
> exception.
>
> The only thing I found making sense in the stacktrace was:
>
> fault string: Paramter  dosen't exist!
>
> I don't understand why would this error pop up.
> I appreciate any help on this.
>
> Thanks.



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

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

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



Re: Runtime depenendencies for Axis2 Client/ADB

2008-09-01 Thread keith chapman
Hi Christopher,

These are the jars you will need.

axis2-kernel
axis2-adb
activation
woden-impl-dom
woden-api
wsdl4j
axiom-api
axiom-dom
axiom-impl
commons-httpclient

These are the ones that come to my mind at the moment. There may be
another jar or two that I missed.

Thanks,
Keith.

On Fri, Aug 29, 2008 at 12:12 AM, Christopher Wash <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Can someone point me in the right direction on the runtime dependencies for
> using Axis2 as a client with ADB?
>
> Thanks!
>
> Chris



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

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

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



Re: Runtime depenendencies for Axis2 Client/ADB

2008-09-01 Thread keith chapman
wstx-asl
stax

A couple of more obvious ones that I missed.

On Mon, Sep 1, 2008 at 10:23 PM, keith chapman <[EMAIL PROTECTED]> wrote:
> Hi Christopher,
>
> These are the jars you will need.
> axis2-kernel
> axis2-adb
> activation
> woden-impl-dom
> woden-api
> wsdl4j
> axiom-api
> axiom-dom
> axiom-impl
> commons-httpclient
>
> These are the ones that come to my mind at the moment. There may be
> another jar or two that I missed.
>
> Thanks,
> Keith.
>
> On Fri, Aug 29, 2008 at 12:12 AM, Christopher Wash <[EMAIL PROTECTED]> wrote:
>> Hello,
>>
>> Can someone point me in the right direction on the runtime dependencies for
>> using Axis2 as a client with ADB?
>>
>> Thanks!
>>
>> Chris
>
>
>
> --
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org
>



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

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

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



Re: Periodic query of client

2008-09-01 Thread keith chapman
Hi Michael,

I think I gave you a reply on a different thread. But as you have
specified your client code here its more clearer to me now. In this
scenario it might help if you set the following property [1],

stub._getServiceClient().getOptions.setProperty(org.apache.axis2.transport.http.HTTPConstants.REUSE_HTTP_CLIENT,
true);

Thanks,
Keith.

[1] http://wso2.org/library/230#REUSE_HTTP_CLIENT

On Thu, Aug 28, 2008 at 10:23 PM, Michael Sutter
<[EMAIL PROTECTED]> wrote:
> Hello list,
>
> I have a strange problem with a Axis2 service and the corresponding client
> and maybe somebody
> can help me understanding what I'm doing wrong.
>
> I have a status service implemented with Axis2C running under a tomcat and
> the corresponding Java
> client for accessing the service. The java client is called every ten
> seconds from a thread and I can
> access the service without any problems.
>
> The problem is when the thread is running for some hours - normally between
> two or four I got a AxisFault
> with the message: Too many open files. First I thought that the service is
> implemented wrong, but this isn't
> the problem. I monitored the client and there I saw that on the client side
> the number of open files increases.
>
> The thread is implemented as follows:
> //instantiate the stub for the service
> statusStub = new Stub(..);
>
> after that I query the service every ten seconds until a boolean is set to
> false from outside
> while (!bStopThread) {
>resp = statusStub.getStatus();
>staResp = resp.get_return();
>Thread.currentThread().sleep(lStatusQueryTime);
> }
>
> When I do this I can monitor that the number of open files increases and so
> I get the AxisFault
> after some hours of runtime.
>
> Have I done something wrong in my code? Have I to release some objects or to
> instantiate the stub
> for every request? I don't understand whats my error.
>
> Kind regards
> Michael
>



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

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

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



Re: Rampart Configuration

2008-09-01 Thread keith chapman
This can be done but I beleive rampart is moving towards policy now.
Previously configurating rampart via parameters was the way to go. For
e.g If you wanted to enforce UT on a service you could add the
follwoing to the services.xml


   
  UsernameToken
  MyPasswordCallbackHandler
   


Thanks,
Keith.

On Thu, Aug 28, 2008 at 7:42 PM, Shah, Sumit <[EMAIL PROTECTED]> wrote:
> Is there a way to configure Rampart in Axis2 using parameters rather than a
> Policy file?
>
>
>
> Thanks
>
> Sumit



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

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

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



Re: fault string: parameter xxxx doesn't exist

2008-09-01 Thread Abhishek Kaukuntla
Hi,

When I ran the class in the debug mode and traced I could see the parameter
with the right value when the service is invoked. I don't know where it went
wrong. I'm at home so I don't have the WSDL with me now.

This is what I did.

I grabbed the WSDL file of a web service built using XFire and tried to
generate client side stubs and interfaces. I was successful in that. Then, I
developed a client class for this, a simple java app. Until this point,
everything seems fine.

Then started the hurdles. I ran the client and it threw me an Axis Fault
exception. Its throwing the error when I invoke the service.

This is what I did in the client:

   StockSoapBindingStub stub = new StockSoapBindingStub(
   new URL("http://";),
   new Stock_ServiceLocator());
   String stock = stub.testStock();



AxisFault
 faultCode: 
{http://schemas.xmlsoap.org/soap/envelope/}Client
 faultSubcode:
 faultString: Parameter testStockAttributes does not exist!
 faultActor:
 faultNode:
 faultDetail:
   
{http://xml.apache.org/axis/}stackTrace:ParametertestStockAttributes
does
not exist!
   at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
   at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
   at
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
   at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
   at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)
   at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
   at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
   at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
   at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
   at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
   at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
   at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
   at
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
   at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
   at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
   at
org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796)
   at
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
   at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
   at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
   at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
   at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
   at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
   at org.apache.axis.client.Call.invoke(Call.java:2767)
   at org.apache.axis.client.Call.invoke(Call.java:2443)
   at org.apache.axis.client.Call.invoke(Call.java:2366)
   at org.apache.axis.client.Call.invoke(Call.java:1812)

Can you let me know what did I do wrong for the exception to show up?
Thanks.





On Mon, Sep 1, 2008 at 11:44 AM, keith chapman <[EMAIL PROTECTED]>wrote:

> Hi,
>
> This means that the service expects a parameter called  in the
> message and it was not present in the request (Or you havent set it
> when sending the request). If you used a generated stub it would do
> validation on the schema before even sending the message. Could you
> explain what you tried. and may be attach the WSDL that you tried to
> use.
>
> Thanks,
> Keith.
>
> On Fri, Aug 29, 2008 at 8:51 AM, Abhishek Kaukuntla
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I'm new to web services and as well as to Apache Axis. I tried to grab a
> > WSDL from a web service provider and generate a client to access that web
> > service. Everything seemed perfect until I ran the client to find Axis
> Fault
> > exception.
> >
> > The only thing I found making sense in the stacktrace was:
> >
> > fault string: Paramter  dosen't exist!
> >
> > I don't understand why would this error pop up.
> > I appreciate any help on this.
> >
> > Thanks.
>
>
>
> --
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional com

Re: Axis2 REST client and server questions (Data bindings, Headers, Performance)

2008-09-01 Thread Nick Steel

Keith,

I had no idea ?wsdl2 even existed, I've no idea how I managed to miss this
but I will hunt for it tomorrow and give it a go.  Thanks very much this
reply, what you say aout the EPR has definitely cleared some things up for
me and hopefully I can now go on to get this to work.

Just to be clear though, you say I should generate the client stub for the
httpbinding, how exactly do I do this? I thought the stub I already had
could handle all the bindings in my wsdl and that setting the portal
parameters was what controlled which binding was being used.  Is this wrong?

Cheers,
Nick
 

keith chapman wrote:
> 
> Hi Nick,
> 
> If you want to invoke a service using REST then its better to generate
> the client stub for the httpBinding (and when doing so I recommend you
> to use ?wsdl2 instead of ?wsdl). This is what describes the REST
> interface of the service. This is where it will contain details of the
> URL the operation is available at hence if this binding is used to
> invoke the service it will automatically add the operation name to the
> end of the EPR. This does not happen for the SOAP bindings though.
> This is the reason for the behavior you observed below.
> 
> In the request you have sent below does not contain enough information
> to dispatch it to the correct operation of the service. If you had the
> operation name at the end of it it would have worked. And BTW when you
> are using service client directly it will not append the operation
> name to the EPR. Note that you have to configure the ServiceClient
> your self when using this. (This is not the case for stubs generated
> for the httpBinding though).
> 
> On Mon, Sep 1, 2008 at 9:07 PM, Nick Steel
> <[EMAIL PROTECTED]> wrote:
>>
>> Thank you Jay and Keith for your replies.  I've upgraded to version 1.4.1
>> but
>> this had made no difference.  Below is a really simple version of my code
>> taking the options used by Jay in his working service but I can still
>> only
>> get the correct response using getGigsIn() with POST, every other
>> combination else fails with:
>> http://www.w3.org/2003/05/soap-envelope";>
>>The endpoint reference (EPR) for
>> the
>> Operation not found is /NicksGigs-war-Axis2/services/GigListingsService
>> and
>> the WSA Action = null"
>>
>> SimpleREST.java:
>> String epr =
>> "http://localhost:8089/NicksGigs-war-Axis2/services/GigListingsService";;
>> NicksGigsServiceStub portal = new NicksGigsServiceStub(epr);
>> Options options = portal._getServiceClient().getOptions();
>> options.setProperty(Constants.Configuration.ENABLE_REST, Boolean.TRUE);
>> options.setProperty(Constants.Configuration.HTTP_METHOD,
>> Constants.Configuration.HTTP_METHOD_POST);
>> options.setProperty(Constants.Configuration.MESSAGE_TYPE,
>> //org.apache.axis2.transport.http.HTTPConstants.MEDIA_TYPE_X_WWW_FORM);
>> //options.setProperty(Constants.Configuration.DISABLE_SOAP_ACTION,
>> Constants.VALUE_TRUE);
>> options.setCallTransportCleanup(true);
>> options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>> portal._getServiceClient().setOptions(options);
>> Gig[] results = portal.getGigsIn("London");
>> for (int j = 0; j < results.length; j++)
>>System.out.println(results[j].getToString());
>>
>> Note that I had to comment out the MESSAGE_TYPE property for this to
>> work. I
>> have also commented out the SOAP_ACTION property here since although it
>> did
>> remove the action(s) in the header it didn't make any difference to the
>> end
>> result.
>>
>> The thing which strikes me most about this is that whether using GET or
>> POST
>> the bindings do not append the method names to the endpoint like I would
>> expect them to.  I wrongly assumed that at some point the axis generated
>> code would do something like endpoint+"/"+methodName but it doesn't seem
>> to...  Is this correct behaviour?
>>
>> I took a look at the blog entry and after a closer look at my WSDL it
>> seems
>> that the one generated at
>> ...NicksGigs-war-Axis2/services/GigListingsService?wsdl has the correct
>> parameter names, but the wsdl generated by the maven java2wsdl plugin and
>> then subsequently used by wsdl2java to create my stub has the param0,
>> param1
>> names. Maven automatically compiles with debug on and I've made no
>> changes
>> to this so I am a bit confused why I'm getting this. Even more so by the
>> fact that if I create unwrapped bindings then the correct parameter names
>> are used.
> 
> This is strange. I haven't tried this out though (wsdl2java maven
> plugin). Would give it a try and let you know.
> 
> Thanks,
> Keith.
>>
>> Thanks
>> Nick
>>
>>
>>
>>
>>
>> keith chapman wrote:
>>>
>>> Hi Nick,
>>>
>>> Sorry I couldn't get back to you sooner. Was held up with some travel
>>> last week. So here goes, see my comments inline. (As a summary could
>>> you try this with 1.4.1 as I did fix some REST bugs for this release)
>>>
>>> On Thu, Aug 21, 2008 at 6:12 PM, Nick Steel
>>> <[EMAIL PROTECTED]> wrote:

 Hi,

 I've 

org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation not found

2008-09-01 Thread MShah

I deployed a web service on axis2 and when I write web service client to
invoke and test the web service, I get the following exception.  Any inputs
on resolving this will be much appreciated.

org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation
not f
ound is /axis2/services/wsInsertDB and the WSA Action = null
at
org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPha
se.java:89)
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:829)
at
org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:25
5)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:845)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
7)
at java.lang.Thread.run(Thread.java:619)
[ERROR] The endpoint reference (EPR) for the Operation not found is
/axis2/servi
ces/wsInsertDB/ and the WSA Action = null
org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation
not f
ound is /axis2/services/wsInsertDB/ and the WSA Action = null
at
org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPha
se.java:89)
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:829)
at
org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:25
5)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:845)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
7)
at java.lang.Thread.run(Thread.java:619)
[ERROR] The endpoint reference (EPR) for the Operation not found is
/axis2/servi
ces/wsInsertDB.wsInsertDBHttpEndpoint and the WSA Action = null
org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation
not f
ound is /axis2/services/wsInsertDB.wsInsertDBHttpEndpoint and the WSA Action
= n
ull
at
org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPha
se.java:89)
at org.apache.axis2.engine.Phase.invoke(Phase.java:333)
at org.apache.axis2.engine.AxisEngine.invoke(AxisE

RE: org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation not found

2008-09-01 Thread Martin Gainty

please supply wsdlMartin __ 
Disclaimer and confidentiality note Everything in this e-mail and any 
attachments relates to the official business of Sender. This transmission is of 
a confidential nature and Sender does not endorse distribution to any party 
other than intended recipient. Sender does not necessarily endorse content 
contained within this transmission. > > > I deployed a web service on axis2 and 
when I write web service client to> invoke and test the web service, I get the 
following exception. Any inputs> on resolving this will be much appreciated.> > 
org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation> not 
f> ound is /axis2/services/wsInsertDB and the WSA Action = null> at> 
org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPha> 
se.java:89)> 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:829)> at> 
org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:25> 5)> at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)> at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)> at> 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl> 
icationFilterChain.java:290)> at> 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF> 
ilterChain.java:206)> at> 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV> 
alve.java:233)> at> 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV> 
alve.java:191)> at> 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j> 
ava:128)> at> 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j> 
ava:102)> at> 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal> 
ve.java:109)> at> 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav> a:286)> 
at> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java> 
:845)> at> 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce> 
ss(Http11Protocol.java:583)> at> 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44> 7)> at 
java.lang.Thread.run(Thread.java:619)> [ERROR] The endpoint reference (EPR) for 
the Operation not found is> /axis2/servi> ces/wsInsertDB/ and the WSA Action = 
null> org.apache.axis2.AxisFault: The endpoint reference (EPR) for the 
Operation> not f> ound is /axis2/services/wsInsertDB/ and the WSA Action = 
null> at> 
org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPha> 
se.java:89)> 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:829)> at> 
org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:25> 5)> at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)> at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)> at> 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl> 
icationFilterChain.java:290)> at> 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF> 
ilterChain.java:206)> at> 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV> 
alve.java:233)> at> 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV> 
alve.java:191)> at> 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j> 
ava:128)> at> 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j> 
ava:102)> at> 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal> 
ve.java:109)> at> 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav> a:286)> 
at> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java> 
:845)> at> 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce> 
ss(Http11Protocol.java:583)> at> 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44> 7)> at 
java.lang.Thread.run(Thread.java:619)> [ERROR] The endpoint reference (EPR) for 
the Operation not found is> /axis2/servi> ces/wsInsertDB.wsInsertDBHttpEndpoint 
and the WSA Action = null> org.apache.axis2.AxisFault: The endpoint reference 
(EPR) for the Operation> not f> ound is 
/axis2/services/wsI

Re: Axis2 REST client and server questions (Data bindings, Headers, Performance)

2008-09-01 Thread keith chapman
On Tue, Sep 2, 2008 at 2:11 AM, Nick Steel
<[EMAIL PROTECTED]> wrote:
>
> Keith,
>
> I had no idea ?wsdl2 even existed,

Axis2 supports both WSDL 1.1 and WSDL 2.0. And the WSDL 2.0
HTTPBinding can describe a REST interface for your service in a nice
manner.

I've no idea how I managed to miss this
> but I will hunt for it tomorrow and give it a go.  Thanks very much this
> reply, what you say aout the EPR has definitely cleared some things up for
> me and hopefully I can now go on to get this to work.
>
> Just to be clear though, you say I should generate the client stub for the
> httpbinding, how exactly do I do this? I thought the stub I already had
> could handle all the bindings in my wsdl and that setting the portal
> parameters was what controlled which binding was being used.  Is this wrong?

When codegeneration is used to generate the server side code its only
the portType (or the interface if WSDL 2.0) that we care about when
generating code. But when its generating code for the client side we
generate it for a particular port and you can specify this by using
the -pn option. If a port if not provided it faults to use the first
SOAP 1.2 port it finds. You could generate code for all ports too this
can be done by using the -ap options. This will generate stubs for all
ports in the WSDL. So for example if I take the same RESTSample that I
used yesterday this is how I would generate code for its HTTPBinding.

wsdl2java.sh -uri http://mooshup.com/services/samples/RESTSample?wsdl2
-pn HTTPEndpoint -wv 2

I use "-wv 2" to specify that this is indeed a WSDL 2.0 file.

Thanks,
Keith.
>
> Cheers,
> Nick
>
>
> keith chapman wrote:
>>
>> Hi Nick,
>>
>> If you want to invoke a service using REST then its better to generate
>> the client stub for the httpBinding (and when doing so I recommend you
>> to use ?wsdl2 instead of ?wsdl). This is what describes the REST
>> interface of the service. This is where it will contain details of the
>> URL the operation is available at hence if this binding is used to
>> invoke the service it will automatically add the operation name to the
>> end of the EPR. This does not happen for the SOAP bindings though.
>> This is the reason for the behavior you observed below.
>>
>> In the request you have sent below does not contain enough information
>> to dispatch it to the correct operation of the service. If you had the
>> operation name at the end of it it would have worked. And BTW when you
>> are using service client directly it will not append the operation
>> name to the EPR. Note that you have to configure the ServiceClient
>> your self when using this. (This is not the case for stubs generated
>> for the httpBinding though).
>>
>> On Mon, Sep 1, 2008 at 9:07 PM, Nick Steel
>> <[EMAIL PROTECTED]> wrote:
>>>
>>> Thank you Jay and Keith for your replies.  I've upgraded to version 1.4.1
>>> but
>>> this had made no difference.  Below is a really simple version of my code
>>> taking the options used by Jay in his working service but I can still
>>> only
>>> get the correct response using getGigsIn() with POST, every other
>>> combination else fails with:
>>> http://www.w3.org/2003/05/soap-envelope";>
>>>The endpoint reference (EPR) for
>>> the
>>> Operation not found is /NicksGigs-war-Axis2/services/GigListingsService
>>> and
>>> the WSA Action = null"
>>>
>>> SimpleREST.java:
>>> String epr =
>>> "http://localhost:8089/NicksGigs-war-Axis2/services/GigListingsService";;
>>> NicksGigsServiceStub portal = new NicksGigsServiceStub(epr);
>>> Options options = portal._getServiceClient().getOptions();
>>> options.setProperty(Constants.Configuration.ENABLE_REST, Boolean.TRUE);
>>> options.setProperty(Constants.Configuration.HTTP_METHOD,
>>> Constants.Configuration.HTTP_METHOD_POST);
>>> options.setProperty(Constants.Configuration.MESSAGE_TYPE,
>>> //org.apache.axis2.transport.http.HTTPConstants.MEDIA_TYPE_X_WWW_FORM);
>>> //options.setProperty(Constants.Configuration.DISABLE_SOAP_ACTION,
>>> Constants.VALUE_TRUE);
>>> options.setCallTransportCleanup(true);
>>> options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>>> portal._getServiceClient().setOptions(options);
>>> Gig[] results = portal.getGigsIn("London");
>>> for (int j = 0; j < results.length; j++)
>>>System.out.println(results[j].getToString());
>>>
>>> Note that I had to comment out the MESSAGE_TYPE property for this to
>>> work. I
>>> have also commented out the SOAP_ACTION property here since although it
>>> did
>>> remove the action(s) in the header it didn't make any difference to the
>>> end
>>> result.
>>>
>>> The thing which strikes me most about this is that whether using GET or
>>> POST
>>> the bindings do not append the method names to the endpoint like I would
>>> expect them to.  I wrongly assumed that at some point the axis generated
>>> code would do something like endpoint+"/"+methodName but it doesn't seem
>>> to...  Is this correct behaviour?
>>>
>>> I took a look at the blog entry and af

Re: fault string: parameter xxxx doesn't exist

2008-09-01 Thread keith chapman
Hi,

Can you use TCPMonitor to capture the messages you sent to the service. You
may use this blog post which describes how you can set up TCPMonitor to
debug.

If you send the request and response together with the WSDL that will help
us point you to the exact issue. Looking at your stack trace it looks like
the error occurs when reading in the response and not sending the request.

BTW it also looks as though you are using Axis. If you are new to Axis land
then I recommend you use Axis2 instead of Axis. You can get Axis2 from
http://ws.apache.org/axis2/

Thanks,
Keith.

On Tue, Sep 2, 2008 at 1:15 AM, Abhishek Kaukuntla <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> When I ran the class in the debug mode and traced I could see the
parameter
> with the right value when the service is invoked. I don't know where it
went
> wrong. I'm at home so I don't have the WSDL with me now.
>
> This is what I did.
>
> I grabbed the WSDL file of a web service built using XFire and tried to
> generate client side stubs and interfaces. I was successful in that. Then,
I
> developed a client class for this, a simple java app. Until this point,
> everything seems fine.
>
> Then started the hurdles. I ran the client and it threw me an Axis Fault
> exception. Its throwing the error when I invoke the service.
>
> This is what I did in the client:
>
>StockSoapBindingStub stub = new StockSoapBindingStub(
>new URL("http://";),
>new Stock_ServiceLocator());
>String stock = stub.testStock();
>
>
>
> AxisFault
>  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
>  faultSubcode:
>  faultString: Parameter testStockAttributes does not exist!
>  faultActor:
>  faultNode:
>  faultDetail:
>{http://xml.apache.org/axis/}stackTrace:ParametertestStockAttributes
> does
> not exist!
>at
>
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
>at
>
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
>at
>
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
>at
>
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
>at
>
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)
>at
>
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
>at
>
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>at
>
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
>at
>
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>at
>
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
>at
>
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
>at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
>at
>
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
>at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
>at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
>at
>
org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796)
>at
> org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
>at
>
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
>at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
>at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
>at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
>at org.apache.axis.client.Call.invoke(Call.java:2767)
>at org.apache.axis.client.Call.invoke(Call.java:2443)
>at org.apache.axis.client.Call.invoke(Call.java:2366)
>at org.apache.axis.client.Call.invoke(Call.java:1812)
>
> Can you let me know what did I do wrong for the exception to show up?
> Thanks.
>
>
>
>
> On Mon, Sep 1, 2008 at 11:44 AM, keith chapman <[EMAIL PROTECTED]>
> wrote:
>>
>> Hi,
>>
>> This means that the service expects a parameter called  in the
>> message and it was not present in the request (Or you havent set it
>> when sending the request). If you used a generated stub it would do
>> validation on the schema before even sending the message. Could you
>> explain what you tried. and may be attach the WSDL that you tried to
>> use.
>>
>> Thanks,
>> Keith.
>>
>> On Fri, Aug 29, 2008 at 8:51 AM, Abhishek Kaukuntla
>> <[EMAIL PROTEC

Re: org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation not found

2008-09-01 Thread keith chapman
Hi,

The root cause of this problem is that the axis2 server could not find the
service and operation the request was destined to. Basically the request did
not contain enough information for it to get dispatched. This article
[1] describes
how axis2 dispatching works.  Reading though it
will point you in the right direction. You may also use TCPMonitor in order
to have a look at the
request[2]
to identify weather the request has any information for it to get
dispatched correctly.

[1] http://wso2.org/library/176
[2]
http://www.keith-chapman.org/2008/07/using-tcp-monitor-to-debug-web-service.html

Thanks,
Keith.

On Tue, Sep 2, 2008 at 6:42 AM, MShah <[EMAIL PROTECTED]> wrote:

>
> I deployed a web service on axis2 and when I write web service client to
> invoke and test the web service, I get the following exception.  Any inputs
> on resolving this will be much appreciated.
>
> org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation
> not f
> ound is /axis2/services/wsInsertDB and the WSA Action = null
>at
> org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPha
> se.java:89)
>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:829)
>at
> org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:25
> 5)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:290)
>at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> ilterChain.java:206)
>at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
> alve.java:233)
>at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
> alve.java:191)
>at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
> ava:128)
>at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
> ava:102)
>at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
> ve.java:109)
>at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
> a:286)
>at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
> :845)
>at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
> ss(Http11Protocol.java:583)
>at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
> 7)
>at java.lang.Thread.run(Thread.java:619)
> [ERROR] The endpoint reference (EPR) for the Operation not found is
> /axis2/servi
> ces/wsInsertDB/ and the WSA Action = null
> org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation
> not f
> ound is /axis2/services/wsInsertDB/ and the WSA Action = null
>at
> org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPha
> se.java:89)
>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:829)
>at
> org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:25
> 5)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:290)
>at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> ilterChain.java:206)
>at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
> alve.java:233)
>at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
> alve.java:191)
>at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
> ava:128)
>at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
> ava:102)
>at
> org.apache.catalina.core.StandardEngineValve.invoke(S

Re: Migrate from Axis 1.1 to Axis 1.4

2008-09-01 Thread keith chapman
Hi Shripad,

Did you try using the -b option during codegeneration which is supposed to
Generate Axis 1.x backword compatible code?

Thanks,
Keith.

On Thu, Aug 28, 2008 at 5:11 PM, Shripad Gokhale <[EMAIL PROTECTED]
> wrote:

>  Hi,
>
>
>
> We have migrated from Axis 1.1 to Axis 1.4 and I see for the code generated
> by WSDL2JAVA is quite different than that was generated by 1.1.
>
>
>
> Is there any way to preserve backward compacitibilty.
>
>
>
>
>
> Thanks
>
> Shripad
>
> This message and the information contained herein is proprietary and 
> confidential and subject to the Amdocs policy statement,
> you may review at http://www.amdocs.com/email_disclaimer.asp
>
>


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

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


Re: Axis generated WSDL not importing schema correctly

2008-09-01 Thread keith chapman
Hi Dave,

If you get the following WSDL at
http://foo.com/axis2/services/Example?wsdland if
http://foo.com/axis2/services/Example?xsd=example.xsd gets you the schema I
don't see an issue with what axis2 generates for you. May be I misread what
you meant. Could you elaborate more please.

Thanks,
Keith.

On Wed, Aug 27, 2008 at 8:34 PM, Davefeeder <[EMAIL PROTECTED]> wrote:

>
> I am writing an application which uses Axis2 and I'm having a problem with
> the WSDL that Axis generates using "?wsdl" at the webservice url.
> The imported schemas are referenced as relative to the hosting machine,
> rather than fully qualified with a complete url, eg:
> 
>   http://example.co.uk/namespace/1";
> schemaLocation="Example?xsd=example.xsd"/>
>  
>
> Instead of:
> 
>   http://example.co.uk/namespace/1";
> schemaLocation="Example?xsd=http://192.0.0.1/example.xsd"/>
>  
>
> I can't hard code the IP address and force Axis to return the WSDL I've
> written, as it's going to be run on different machines each time.
>
> I've found people that have had similar issues, but none which were
> resolved
> without hard coding the fully qualified schema location in the original
> WSDL.
>
> Can anyone help?
>
> Many thanks,
>
> Dave
> --
> View this message in context:
> http://www.nabble.com/Axis-generated-WSDL-not-importing-schema-correctly-tp19182932p19182932.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

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


Re: changing the Http request URI

2008-09-01 Thread keith chapman
Hi,

You could have something like the following easily though (with one instance
of Axis2 running),

 http://url:prot/somePrefix/Project1/services/ServicesNames
http://url:prot/somePrefix/Project2/services/ServicesNames

Thanks,
Keith.

On Wed, Aug 27, 2008 at 12:41 PM, pierre betz <[EMAIL PROTECTED]> wrote:

> The NameOfTheProject have to be changed too..
> so, if I rename axis2 folder, it will just work for 1 project, and not the
> others.
>
> I need something like :
>  http://url:prot/Project1/services/ServicesNames
>  http://url:prot/Project2/services/ServicesNames
> ...
>
>
>
>
> 2008/8/27 Shehan Simen <[EMAIL PROTECTED]>
>
>  You can put many aar files in to the WEB-INF\services folder. I am doing
>> this at the moment.
>>
>> So you can have something like this:
>>
>> *http://url:18080/NameOfTheProject/services/ServiceName1*
>>
>> *http://url:18080/NameOfTheProject/services/ServiceName2*
>>
>> *http://url:18080/NameOfTheProject/services/ServiceName3*
>>
>> * *
>>
>> I don't understand the problem you have.
>>
>>
>>
>>
>>
>> *From:* pierre betz [mailto:[EMAIL PROTECTED]
>> *Sent:* Wednesday, 27 August 2008 1:05 PM
>> *To:* axis-user@ws.apache.org
>> *Subject:* Re: changing the Http request URI
>>
>>
>>
>> Hi,
>> htank you for the answers.
>>
>> In fact, I have 3 projects, so 3 aar files, which need to be deployed in
>> some folders like :
>> http://url:18080/NameOfTheProject/services/ServiceName
>>
>> I think there is no possibility to do something in this case. Ok, I can
>> rename the axis2 directory, and use some parameters in the axis2
>> configuration to change the axis2 root folder name and the services name,
>> but it will do that for every aar file deployed.
>>
>> Anyway, thanks maybe it will help someone else :)
>>
>>
>


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

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


Re: Axis2 Web App on Geronimo?

2008-09-01 Thread keith chapman
Hi,

The axis2.war contains commons-fileupload-1.2.jar in its lib. Can you try
the 1.4.1 version please. Also do let us know how it goes ;)

Thanks,
Keith.

On Thu, Aug 28, 2008 at 1:46 AM, jcaristi <[EMAIL PROTECTED]> wrote:

>
> I understand that Axis2 is integrated into Geronimo, but I could not find
> the
> Axis2 web app.
>
> Is it possible to deploy the web app to Geronimo?  I noticed multiple web
> posts stating that this doesn't work (without any solutions).  It didn't
> work for me either.  When I attempt to deploy the Axis2.war file, it
> results
> in an out-of-memory error.  It seems to have the following exception as a
> root cause:
>
> java.lang.NoClassDefFoundError:
> org/apache/commons/fileupload/FileUploadException
>
> Is this a supported configuration, or must we do without the Axis2 web app
> on Geronimo?
> --
> View this message in context:
> http://www.nabble.com/Axis2-Web-App-on-Geronimo--tp19188874p19188874.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

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


RE: Strong types in Axis2 wsdl

2008-09-01 Thread Pugalia, Jai P (JP)
Hi Keith,

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

The WSDL generates this:



  




 

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

Thanks,
Jai

-Original Message-
From: keith chapman [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 01, 2008 9:41 AM
To: axis-user@ws.apache.org
Subject: Re: Strong types in Axis2 wsdl

Hi Jai,

Could you elaborate on what you mean by "Array" and "Structure"? Do you
mean the string values "Array" and "Structure"? or the actual structure
of an Array and Structure?

Thanks,
Keith.

On Thu, Aug 28, 2008 at 6:31 PM, Pugalia, Jai P (JP)
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have an Axis2 wsdl which exposes an ObjectType as
>
>  type="xs:string"/>
>
> I want to restrict the valid values to say "Array" and "Structure". If

> I change the element to be an enumeration, it does not work as looks 
> like
> Axis2 does not support enumerations yet. Is there any other way I can 
> make this strongly typed in the wsdl.
>
> Thanks,
> Jai



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

blog: http://www.keith-chapman.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]



Re: [Axis2] Proxy Authentication

2008-09-01 Thread keith chapman
Hi Sean,

You could have done this by adding the following parameter to your clients
axis2.xml



proxy.wso2.org
5678
EXAMPLE\keith
keithsPassword



Thanks,
Keith.

On Thu, Aug 28, 2008 at 1:40 AM, Sean Cote <[EMAIL PROTECTED]> wrote:

>  I get the following exception whenever I try to connect to my web-service
> via a proxy server:
>
>
>
> [INFO] HTTPSender - Unable to sendViaPost to url[http://mywebservice]
>
>  Authentication Required>org.apache.axis2.AxisFault: Transport error: 407
> Error: Proxy Authentication Required
>
> at
> org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:296)
>
> 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:371)
>
> at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
>
> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
>
> at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
>
> at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
>
> at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>
>
>
> I am using Axis2-1.4 with Java6u7. I just switched my client application
> from using Axis1 to Axis2. With Axis1, I was just using the system
> properties (http.proxyHost, http.proxyPort, http.proxyUser, and
> http.proxyPassword), but they don't seem to work anymore. So, I tried using
> ProxyProperties, like this, but to no avail:
>
>
>
> final HttpTransportProperties.ProxyProperties pp = new
> HttpTransportProperties.ProxyProperties();
>
> pp.setProxyName(System.getProperty("http.proxyHost"));
>
> pp.setProxyPort(Integer.parseInt(System.getProperty("http.proxyPort")));
>
> pp.setUserName(System.getProperty("http.proxyUser"));
>
> pp.setPassWord(System.getProperty("http.proxyPassword"));
>
> options.setProperty(HTTPConstants.PROXY, pp);
>
>
>
> I do have it working with a non-authenticating proxy server. I got it to
> work with Axis2 by adding this line:
>
>
>
> options.setProperty(HTTPConstants.HTTP_PROTOCOL_VERSION,
> HTTPConstants.HEADER_PROTOCOL_10);
>
>
>
> What is it that I don't understand about connecting to a web-service
> through an authenticating proxy server in Axis2?
>
>
>
> Thanks!
>
> Sean
>
>
>



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

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


Re: Axiss2 1.2 - Problem with client calling WS behind HTTPS

2008-09-01 Thread keith chapman
Hi Nick,

Did you manage to resolve the issue?

Thanks,
Keith.

On Sun, Aug 17, 2008 at 11:24 PM, Nick Popov <[EMAIL PROTECTED]> wrote:

>  Hi,
>
>
>
> I have Axis2 1.2 deployed as a part of web application on Tomcat 5.
>
> Tomcat configuration have HTTP and HTTPS ports configured.
>
> The web services are accessible via HTTP and HTTPS. For HTTPS I'm using
> self-signed cert in a store.
>
> I can see the WSDL for HTTPS/HTTP in IE/FF also by using  SOAPSonar.
>
> When I configure the client URL to point to the HTTP port everything is OK.
> But when I point to the HTTPS port I have the I get the following stack
> trace:
>
>
>
> .
>
> .
>
> .
>
>
>
> Caused by: org.apache.axis2.AxisFault: The server localhost failed to
> respond with a valid HTTP response
>
> at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:221)
>
> at
> org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:452)
>
> at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:330)
>
> at
> org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
>
> at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:520)
>
> at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:500)
>
> at
> com.prosrm.common.wsclient.axis2.RPCServiceClient.invokeBlocking(RPCServiceClient.java:114)
>
> at
> com.prosrm.common.wsclient.WSClient.invoke(WSClient.java:128)
>
> ... 19 more
>
> Caused by: org.apache.axis2.AxisFault: The server localhost failed to
> respond with a valid HTTP response
>
> at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:314)
>
> at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:201)
>
> ... 26 more
>
> Caused by: org.apache.axis2.AxisFault: The server localhost failed to
> respond with a valid HTTP response
>
> at
> org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:179)
>
> at
> org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:73)
>
> at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:305)
>
> ... 27 more
>
> Caused by: org.apache.commons.httpclient.ProtocolException: The server
> localhost failed to respond with a valid HTTP response
>
> at
> org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1846)
>
> at
> org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)
>
> at
> org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)
>
> at
> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
>
> at
> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
>
> at
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
>
> at
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
>
> at
> org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:558)
>
> at
> org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:176)
>
> ... 29 more
>
>
>
> I  have the javax.net.ssl.trustStore and javax.net.ssl.trustStorePassword
> set up and I know that the certs are OK.
>
> At this point, before start building/debugging AXIS2 code I would like to
> know if any of you had the same problem.
>
>
>
> Thanks in advance for any suggestion on how to resolve that.
>
>
>
> Nick Popov
>
>
>



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

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


Re: Strong types in Axis2 wsdl

2008-09-01 Thread keith chapman
Hi,

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

Thanks,
Keith.

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


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

> Hi Keith,
>
> I have written the Java class and then generating the WSDL from that.
>
> The WSDL generates this:
>
>
>
>nillable="true" type="xs:string"/>
>  nillable="true" type="xs:string"/>
>  nillable="true" type="xs:string"/>
>  nillable="true" type="xs:string"/>
> 
>
>
> I want to restrict the values of objectType to actual string values like
> "Array", "Structure" & "Table".
>
> Thanks,
> Jai
>
> -Original Message-
> From: keith chapman [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 01, 2008 9:41 AM
> To: axis-user@ws.apache.org
> Subject: Re: Strong types in Axis2 wsdl
>
> Hi Jai,
>
> Could you elaborate on what you mean by "Array" and "Structure"? Do you
> mean the string values "Array" and "Structure"? or the actual structure
> of an Array and Structure?
>
> Thanks,
> Keith.
>
> On Thu, Aug 28, 2008 at 6:31 PM, Pugalia, Jai P (JP)
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I have an Axis2 wsdl which exposes an ObjectType as
> >
> >  > type="xs:string"/>
> >
> > I want to restrict the valid values to say "Array" and "Structure". If
>
> > I change the element to be an enumeration, it does not work as looks
> > like
> > Axis2 does not support enumerations yet. Is there any other way I can
> > make this strongly typed in the wsdl.
> >
> > Thanks,
> > Jai
>
>
>
> --
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.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]
>
>


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

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


Re: How to use Rampart as Axis2 client from ejb (JBoss) ?

2008-09-01 Thread keith chapman
Hi,

You need to have the rampart.mar in the classpath. Perhaps renaming
rampart.mar to rampart.jar (in the lib directory) will do the trick .

Thanks,
Keith.

On Tue, Aug 26, 2008 at 6:43 PM, Rainer Montag <[EMAIL PROTECTED]> wrote:

> Hello,
>
> I like to implement an Axis2 client that is used from within an EJB calling
> an external web service that requires a UsernameToken.
>
> I have a problem how to setup my Axis2 client code to engage the rampart
> module resulting in a "Unable to engage module: rampart" exception.
>
> My ejb code looks something like this:
>
> ConfigurationContext ctx = ConfigurationContextFactory
>  .createConfigurationContextFromFileSystem(null, null);
>  service = new MyServiceStub(ctx, endpoint);
>
>  // engaging rampart and setting authentification information
>  Options options = service._getServiceClient().getOptions();
>  options.setUserName(authName);
>  options.setPassword(authPass);
>
>  service._getServiceClient().engageModule("rampart");
>
> As I'm within my ejb in an EAR, I cannot provide a "file path" to the
> client repository as the first argument of
> createConfigurationContextFromFileSystem(). I've tried to put the rampart
> module in a directory lib/ in my EAR archive and set the manifest classpath
> of my ejb-jar to the lib/ directory, but with no success. Anyone got an idea
> what is wrong ?
>
> I'm using Axis 1.4 and rampart-1.4. The applicationserver to host my EAR is
> JBoss 4.0.5.
>
> Thanks in advance,
>  Rainer
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

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


Re: Setting a default namespace for responses

2008-09-01 Thread keith chapman
Hi,

If your question was how do I set a default namespace to an OMElemnt, here
is the answer.

omElement.declareDefaultNamespace("http:wso2.com");

Thanks,
Keith.

On Tue, Aug 26, 2008 at 4:14 PM, Arnout Engelen <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I'm calling a webservice that returns XML elements without a namespace.
>
> Is there any way I can specify a default namespace to use when none is
> specified in the returned XML? Now I get a:
>
>  Caused by: org.apache.axis2.databinding.ADBException: Unexpected
> subelement lfm
>at gennedservice.GeoStub$Lfm$Factory.parse(GeoStub.java:1319)
>
> because the following check fails:
>
>  new javax.xml.namespace.QName("
> http://net/bzzt/lastfmlib/model/geo/getEvents
> ","lfm").equals(reader.getName())
>
> which is because the namespace of the element in the reader is 'null'.
>
>
> Kind regards,
>
> Arnout
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

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


Re: Axis1 to Axis2 server side code

2008-09-01 Thread keith chapman
Well, Axis2 supports both code first and Contract First. Using a generated
MessageReceiver could actually be more productive than using the RPC ones
(In terms of performance). The RPC message Receivers uses reflection to load
classes while the generated ones know which class to invoke beforehand and
does a better job of converstion XML -> JAVA and vice versa. So its a good
approach.

Thanks,
Keith.



On Tue, Aug 26, 2008 at 2:29 AM, Lee, Alan <[EMAIL PROTECTED]> wrote:

>  Hi All,
>
>
>
> We are in the process of upgrading our web services from Axis1 to Axis2 and
> we have some questions.
>
>
>
> Our current web services 1) throw custom exceptions and have 2)
> polymorphism (class hierarchy). Using Axis1, both just worked without an
> issue, we don't have/need any Axis1 custom codes on the server side which is
> good for us as we are using the code-first approach.
>
>
>
> However with Axis2, we cannot get 1) and 2) working with the default
> RPCMessageReceiver.  To make them work, we have to use the custom
> MessageReceiver and its referenced data binding classes generated by
> Wsdl2Java on the server side.
>
>
>
> Is that the standard approach in Axis2 web service development (using the
> generated MessageReceiver on the server side)?
>
>
>
> TIA,
>
> *Alan Lee
>
> *
>
>
>



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

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


Re: Problem Retuen Type Of WebService

2008-09-01 Thread keith chapman
What is the version of Axis2 that you used?

Thanks,
Keith.

On Sun, Aug 24, 2008 at 11:19 PM, shekher awasthi <[EMAIL PROTECTED]
> wrote:

> Hi All,
>
> I am new to webService i have develpoed a webservice in which i am trying
> to send the response but i am facing a problem in it.
>
> i have created ajavabean and have defined the return type as ArrayList of
> this BEan type..
> if i will just use this array list and add simple string values in to it
> the webserice is returning the arraylist accurately,but when i am filling
> the bean and putting it in the arraylist the webservice is unable to return
> the response it is returning null values..
>
> i have even serilised the beans can anybody give me any clue where i am
> doing wrong
>
>
> Thanks in advance
>
> Shekher
>



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

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


Re: Connecting to a SOAP service through Proxy

2008-09-01 Thread keith chapman
Yes.

You could configure your proxy details using the following parameter in your
client axis2.xml



proxy.wso2.org
5678
EXAMPLE\keith
keithsPassword



Thanks,
Keith.

On Thu, Aug 21, 2008 at 3:40 PM, Sandeep Kumar K
<[EMAIL PROTECTED]>wrote:

>  How to connect to a SOAP service through proxy?. Does it supports NTLM
> authentication?.
>
> *--
> Thanks & Regards
> Sandeep Kumar K
> Sr. Software Engineer
> Geneva Software Technologies Limited,
> # 82, Research Center II, I floor, EPIPA
> Nallurhalli, Whitefield, Bangalore - 560066
> Mob  :  +91-9880193454*
>
>


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

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


Re: Problem using NTLM authentication

2008-09-01 Thread keith chapman
Can you try adding the following parameter to your client axis2.xml



proxy.wso2.org
5678
EXAMPLE\keith
keithsPassword



Thanks,
Keith.

On Thu, Aug 21, 2008 at 3:09 PM, Rajat Bhushan <[EMAIL PROTECTED]>wrote:

>  Hi.
>
> I am trying to access a .NET web service which expects NTLM
> credentials. I am using the code given below but it is not working. Actually
> I am getting a pop-up asking me for the credentials. I don't want that to
> happen. I want to provide the credentials in the code itself. Can some one
> please point out what is going wrong or help me with how to do this.
>
> Options options = new Options();
> options.setAction(NAMESPACEProject+"ReadProject");
> options.setTo(targetUrl);
>
> Header hdr1 = new Header("PjAuth",contextString);
> ArrayList hdrs = new ArrayList();
> hdrs.add(hdr1);
>
> *HttpTransportProperties.Authenticator auth = new
> HttpTransportProperties.Authenticator();
> auth.setDomain("ST-IDC");
> auth.setUsername("rabhusha");
> auth.setPassword("123456");
> auth.setHost("RABHUSHA");*
>
> options.setProperty(HTTPConstants.AUTHENTICATE,auth);
>
> options.setProperty(HTTPConstants.HTTP_HEADERS,hdrs);
> client.setOptions(options);
>
> OMElement res = client.sendReceive(readProjectInfo);
>
>
> Thanks & Regards,
> Rajat Bhushan
>  - To
> unsubscribe, e-mail: [EMAIL PROTECTED] For additional
> commands, e-mail: [EMAIL PROTECTED]




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

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


Re: Axis https issue

2008-09-01 Thread keith chapman
Try adding the following parameter to the https transportReceiver in your
axis2.xml

443

Thanks,
Keith.

On Sun, Aug 24, 2008 at 8:18 PM, Madhavaram, Neelima <
[EMAIL PROTECTED]> wrote:

>  Hi,
>
>
>
> I have been using axis for a while and it always worked when posting
> service to http site.
>
> But when posted to a secure site, we can see list of services but clicking
> on any wsdl link wouldn't work.
>
> When cursor is placed over the wsdl link, we can clearly see that URL is
> http://:443/services instead of
>
> https:///services
>
>
>
> We are using Oracle 10g application server.
>
> Is it the problem of axis or application server?
>
>
>
> Can any one help me in this?
>
>
>
> Thanks,
>
> nmadhava
>
>
>



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

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


Authentication with Axis2

2008-09-01 Thread bertieBotts

Hi,

I am attempting to connect to MSExchange Web Services.

The authenticator bit of my code is:
exStub=new ExchangeWebServiceStub(configContext,ewsUrl);
Options options = 
exStub._getServiceClient().getOptions();
HttpTransportProperties.Authenticator authenticator = 
new
HttpTransportProperties.Authenticator();
List authScheme = new ArrayList();

//authScheme.add(HttpTransportProperties.Authenticator.NTLM);

authScheme.add(HttpTransportProperties.Authenticator.BASIC);

//authScheme.add(HttpTransportProperties.Authenticator.DIGEST);
authenticator.setAuthSchemes(authScheme);
authenticator.setUsername(userName);
authenticator.setPassword(password);
authenticator.setHost(host);
authenticator.setDomain(domain);
authenticator.setPort(port);
options.setProperty(HTTPConstants.AUTHENTICATE, 
authenticator);
ServiceClient serviceClient=exStub._getServiceClient();
serviceClient.setOptions(options);

When I attempt to connect I get:

DEBUG] HttpClient - Operating system architecture: x86
[DEBUG] HttpClient - Operating system version: 5.1
[DEBUG] HttpClient - SUN 1.42: SUN (DSA key/parameter generation; DSA
signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS keystore;
PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection CertStores)
[DEBUG] HttpClient - SunJSSE 1.42: Sun JSSE provider(implements RSA
Signatures, PKCS12, SunX509 key/trust factories, SSLv3, TLSv1)
[DEBUG] HttpClient - SunRsaSign 1.42: SUN's provider for RSA signatures
[DEBUG] HttpClient - SunJCE 1.42: SunJCE Provider (implements DES, Triple
DES, AES, Blowfish, PBE, Diffie-Hellman, HMAC-MD5, HMAC-SHA1)
[DEBUG] HttpClient - SunJGSS 1.0: Sun (Kerberos v5)
[DEBUG] DefaultHttpParams - Set parameter http.connection.timeout = 3
[DEBUG] DefaultHttpParams - Set parameter http.socket.timeout = 3
[DEBUG] DefaultHttpParams - Set parameter http.socket.timeout = 3
[DEBUG] DefaultHttpParams - Set parameter http.authentication.preemptive =
false
[DEBUG] DefaultHttpParams - Set parameter http.auth.scheme-priority =
[Basic]
[DEBUG] MultiThreadedHttpConnectionManager -
HttpConnectionManager.getConnection:  config =
HostConfiguration[host=https://psecc001.poc.ssi.govt.nz], timeout = 0
[DEBUG] MultiThreadedHttpConnectionManager - Allocating new connection,
hostConfig=HostConfiguration[host=https://psecc001.poc.ssi.govt.nz]
[DEBUG] HttpConnection - Open connection to psecc001.poc.ssi.govt.nz:443
[DEBUG] header - >> "POST /EWS/Exchange.asmx HTTP/1.1[\r][\n]"
[DEBUG] HttpMethodBase - Adding Host request header
[DEBUG] header - >> "Content-Type: text/xml; charset=UTF-8[\r][\n]"
[DEBUG] header - >> "SOAPAction:
"http://schemas.microsoft.com/exchange/services/2006/messages/FindItem"[\r][\n]";
[DEBUG] header - >> "User-Agent: Axis2[\r][\n]"
[DEBUG] header - >> "Host: psecc001.poc.ssi.govt.nz[\r][\n]"
[DEBUG] header - >> "Content-Length: 897[\r][\n]"
[DEBUG] header - >> "[\r][\n]"
[DEBUG] content - >> "http://schemas.xmlsoap.org/soap/envelope/";>http://schemas.microsoft.com/exchange/services/2006/types";
soapenv:mustUnderstand="0">[EMAIL 
PROTECTED]http://schemas.microsoft.com/exchange/services/2006/messages";
Traversal="Shallow">http://schemas.microsoft.com/exchange/services/2006/types";>IdOnlyhttp://schemas.microsoft.com/exchange/services/2006/types";
Id="calendar"
/>"
[DEBUG] EntityEnclosingMethod - Request body sent
[DEBUG] header - << "HTTP/1.1 401 Unauthorized[\r][\n]"
[DEBUG] header - << "Content-Length: 1656[\r][\n]"
[DEBUG] header - << "Content-Type: text/html[\r][\n]"
[DEBUG] header - << "Server: Microsoft-IIS/6.0[\r][\n]"
[DEBUG] header - << "WWW-Authenticate: Basic
realm="poc.ssi.govt.nz"[\r][\n]"
[DEBUG] header - << "X-Powered-By: ASP.NET[\r][\n]"
[DEBUG] header - << "Date: Tue, 02 Sep 2008 05:18:36 GMT[\r][\n]"
[DEBUG] HttpMethodDirector - Authorization required
[DEBUG] AuthChallengeProcessor - Supported authentication schemes in the
order of preference: [Basic]
[INFO] AuthChallengeProcessor - Basic authentication scheme selected
[DEBUG] AuthChallengeProcessor - Using authentication scheme: basic
[DEBUG] AuthChallengeProcessor - Authorization challenge processed
[DEBUG] HttpMethodDirector - Authentication scope: BASIC
'poc.ssi.govt.nz'@psecc001.poc.ssi.govt.nz:443
[DEBUG] HttpMethodDirector - Credentials required
[DEBUG] HttpMethodDirector - Credentials provider not available
[INFO] HttpMethodDirector - No credentials available for BASIC
'poc.ssi.govt.nz'@psecc001.poc.ssi.govt.nz:443
[INFO] HTTPSender - Unable to sendViaPost to
url[https://psecc001.poc.ssi.govt.nz/EWS/Exchange.asmx]
org.apache.axis2.AxisFault: Transport error: 401 Error:
Unauthorized