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

2009-10-19 Thread mule_user

I am using the link for learning:

https://www.wso2.org/library/90

Ax2
|
---src
|
 ---samples.demo
  |
   ---Book.java
   BookService.java
WebContent
   |
WEB-INF
  |
  ---lib (has all jars from Axis 2)
  |
   services
 |
  BookService
|
 META-INF
   |
---services.xml

///
package samples.demo;

public class Book {
private String title;
private String isbn;
private String author;

public String getIsbn() {
return isbn;
}

public void setIsbn(String isbn) {
this.isbn = isbn;
}

public String getTitle() {
return title;
}

public void setTitle(String title) {
this.title = title;
}

public String getAuthor() {
return author;
}

public void setAuthor(String author) {
this.author = author;
}
}
///
package samples.demo;

public class BookService {
private Book onlyBook;

public BookService() {
onlyBook = new Book();
onlyBook.setAuthor("Dan Diephouse");
onlyBook.setTitle("Using Axis2");
onlyBook.setIsbn("0123456789");
}

public Book[] getBooks() {
return new Book[]{onlyBook};
}

public Book findBook(String isbn) {
if (isbn.equals(onlyBook.getIsbn()))
return onlyBook;

return null;
}
}

services.xml




Book sample service

samples.demo.BookService








/
web.xml


http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>

Axis2WebWs

Apache-Axis Servlet
AxisServlet

org.apache.axis2.transport.http.AxisServlet
1



AxisServlet
/servlet/AxisServlet


AxisServlet
*.jws


AxisServlet
/services/*



/

I have successfully deployed axis2.war. I can successfully see:

http://localhost:9081/axis2/services/listServices

which only shows getVersion

My question:

Why can I not see getBooks and findBooks method of my new service
(BookService) in the url above?

I can successfully see WSDL under:

http://localhost:9081/Ax2/services/BookService?wsdl




-- 
View this message in context: 
http://www.nabble.com/Axis-2---Unable-to-see-my-new-service-from-Axis2-Admin-console-tp25966041p25966041.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: New to Axis2 - Unable to see service

2009-10-19 Thread Sagara Gunathunga
Hi

I'm not sure I have realized you approach here , I assume you have two
applications (axis2 and Axis2WebWs  ) in your server deploy folder. If
my assumption is correct ,   Within the scope of your application
server both axis2 and  Axis2WebWs  are two separate web applications.
You cant's expect define web service in one application (Axis2WebWs)
and it will show in a page that belong to the another web application
( listServices page of Axis2 application) . Above two applications use
two different Axis2 repositories . Admin console of  axis2 is only
display services of it's own repository.

These are some of my suggestions here.

1.) If you want to use Axis2 admin console,  package your web service
as .aar and deploy using the console If you have done correctly this
will bring your service details to console and you don't need  another
web application for this  approach. If you will  face faulty service
exception with this,  you can send the sample codes  of AAR to the
list and someone will help out.


2.) If you do not want to depend on admin console and want to package
as EAR content , my suggestion is first try to create your service as
a WAR content, You can refer this [1] . If you get success with this,
you can include the WAR content in your EAR package exactly like  you
placing any other .war content under EAR package. But you cant see
your services in the console. (Personally I haven't work with EAR and
Axis2 but Hope this will work )


3.) May be you can try to integrate those Admin console features to
your EAR file . But again I haven't try for that ,  better to try out.


[1] - 
http://www.developer.com/open/article.php/3777111/Embedding-Apache-Axis2-into-Existing-Applications.htm

Thanks,

On Mon, Oct 19, 2009 at 11:50 PM, mule_user  wrote:
>
> I changed the directory structure as:
>
> Axis2WebWs
> |
> src
> |       |
> |       org.ncc.server
> |                               |
> |                                Calculator.java
> |                                ICalculator.java
> |
> ---WebContent
> |
> META-INF
> |
> WEB-INF
>      |
>      -lib (has all the jar folders from Axis2)
>      |
>      web.xml
>     |
>     services
>           |
>           Calculator
>                 |
>                 META-INF
>                      |
>                       services.xml
>
> In other words, I removed services.xml from WebContent\META-INF. Instead, I
> created a new directory under WEB-INF as services\Calculator\META-INF and
> placed the same services.xml in that.
>
> After that, I re-deployed the EAR file. NO luck either. I see the same
> result as faulty services. I can only see getVersion, does not see
> Calculator.
>
>
>
>
>
>
> mule_user wrote:
>>
>> I am new to Axis2, but familiar with Axis1. I am trying to see the service
>> using the Axis2 admin console. I am unable to see the service. That can
>> mean many things. Any suggestion will be appreciated. Following are the
>> steps I ahve taken:
>>
>> 1. Deployed axis2.war. As such, I can successfully see
>> http://localhost:9081/axis2/services/listServices But obviously, the new
>> service created by me is not in that list.
>>
>> 2. Created a Java web project and deployed it in the same server where
>> axis2 admin application was deployed. The structure of the Java project
>> is:
>>
>> Axis2WebWs
>> |
>> src
>> |       |
>> |       org.ncc.server
>> |                               |
>> |                                Calculator.java
>> |                                ICalculator.java
>> |
>> ---WebContent
>> |
>> META-INF
>> |    |
>> |    services.xml
>> |
>> WEB-INF
>>       |
>>       -lib (has all the jar folders from Axis2)
>>       |
>>       web.xml
>>
>> 
>> package org.ncc.server;
>>
>> public class Calculator implements ICalculator{
>>        public int add(int a, int b) {
>>                return a + b;
>>       }
>> }
>> /
>> package org.ncc.server;
>>
>> public interface ICalculator {
>>       int add (int x, int y);
>> }
>> //
>> 
>>     
>>         Simple Calculator Service
>>     
>>
>>     org.ncc.server.Calculator
>>
>>     
>>         > class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
>>     
>>
>> 
>> 
>> 
>> > xmlns="http://java.sun.com/xml/ns/j2ee";
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
>>       
>>       Axis2WebWs
>>       
>>               Apache-Axis Servlet
>>               AxisServlet
>>
>> org.apache.axis2.transport.http.AxisServlet
>>               1
>>       
>>
>>       
>>               AxisServlet
>>               /servlet/AxisServlet
>>       
>>       
>>               AxisServlet
>>               *.jws
>>       
>>       
>>               AxisServlet
>>               /services/*
>>       
>> 
>> 

Re: New to Axis2 - Unable to see service

2009-10-19 Thread mule_user

I changed the directory structure as:

Axis2WebWs
|
src
|   |
|   org.ncc.server
|   |
|Calculator.java
|ICalculator.java
|
---WebContent
|
META-INF
|
WEB-INF  
  |
  -lib (has all the jar folders from Axis2)
  |
  web.xml
 |
 services
   |
   Calculator
 |
 META-INF
  |
   services.xml

In other words, I removed services.xml from WebContent\META-INF. Instead, I
created a new directory under WEB-INF as services\Calculator\META-INF and
placed the same services.xml in that.

After that, I re-deployed the EAR file. NO luck either. I see the same
result as faulty services. I can only see getVersion, does not see
Calculator.






mule_user wrote:
> 
> I am new to Axis2, but familiar with Axis1. I am trying to see the service
> using the Axis2 admin console. I am unable to see the service. That can
> mean many things. Any suggestion will be appreciated. Following are the
> steps I ahve taken:
> 
> 1. Deployed axis2.war. As such, I can successfully see
> http://localhost:9081/axis2/services/listServices But obviously, the new
> service created by me is not in that list.
> 
> 2. Created a Java web project and deployed it in the same server where
> axis2 admin application was deployed. The structure of the Java project
> is:
> 
> Axis2WebWs
> |
> src
> |   |
> |   org.ncc.server
> |   |
> |Calculator.java
> |ICalculator.java
> |
> ---WebContent
> |
> META-INF
> ||
> |services.xml
> |
> WEB-INF  
>   |
>   -lib (has all the jar folders from Axis2)
>   |
>   web.xml
> 
> 
> package org.ncc.server;
> 
> public class Calculator implements ICalculator{
>public int add(int a, int b) {  
>return a + b;   
>   }   
> }
> /  
> package org.ncc.server;
> 
> public interface ICalculator {
>   int add (int x, int y);
> }
> //
> 
> 
> Simple Calculator Service
> 
> 
> org.ncc.server.Calculator
> 
> 
>  class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
> 
>  
> 
> 
> 
>  xmlns="http://java.sun.com/xml/ns/j2ee";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
>   
>   Axis2WebWs
>   
>   Apache-Axis Servlet
>   AxisServlet
>   
> org.apache.axis2.transport.http.AxisServlet
>   1
>   
>   
>   
>   AxisServlet
>   /servlet/AxisServlet
>   
>   
>   AxisServlet
>   *.jws
>   
>   
>   AxisServlet
>   /services/*
>   
> 
> //
> I create a EAR file for this project and deploy it. Axis2WebWs gets
> deployed successfully. I am not (nor do want to) use Axis2 Admin console
> for deploy. I was hoping that the url below will show my service add:
> http://localhost:9081/axis2/services/listServices 
> 
> Instead it only lists getVersion method from Axis2 Admin console.
> 
> What am I missing?
> 
> Even though I do not want to deploy it using Axis2 Admin console, but for
> troubleshooting purposes, I changed ear file to aar file and wanted to
> upload that aar file using Axis2 Admin console. When I looked for the
> service, it mentioned faulty service. I said that cannot find
> services.xml.
> 
> Any suggestion will be appreciated. Again, I want to deploy the EAR file
> using Admin console of the app server only (will be scripted eventually),
> instead of relying on Axis2 Admin console.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/New-to-Axis2---Unable-to-see-service-tp25928644p25963099.html
Sent from the Axis - User mailing list archive at Nabble.com.



Need to scrub non-XML characters from WS response

2009-10-19 Thread Balsoma, Dominick
Hello, I am writing a client in Java using Axis 1.4 (Not Axis2) and the 3rd 
party web service I am connecting to is sending back non UTF-8 characters (such 
as é) to my client, where the SAXParser is tripping up on these characters.  
How can I scrub these characters out of the XML stream before they arrive at 
the SAX Parser and cause a fault?  Is this possible?

 

Thank you,

 

-  Dominick

*The opinions and concerns expressed in this email are entirely that of the 
writer and not of TWDC*

 



"org.apache.commons.discovery.DiscoveryException: No implementation defined for org.apache.commons.logging.LogFactory" exception

2009-10-19 Thread Wenpeng WEI

Hi all,

I am new to Axis.
I am using axis just for invoking web services and it works just well  
in command line.
But when I was calling the same method that works well before from  
another java application I got a  
"org.apache.commons.discovery.DiscoveryException: No implementation  
defined for org.apache.commons.logging.LogFactory" exception.
The application I called axis from is called "Dash", a agent platform.  
And there is no logging system in it.
I have been looking for the solution for a long time and got nothing  
good. Does anyone know why and how to fix it? Thanks a lot.


Wei


-

java.lang.ExceptionInInitializerError
	at  
org.apache.axis.encoding.TypeMappingImpl.(TypeMappingImpl.java: 
77)
	at  
org 
.apache 
.axis 
.encoding.TypeMappingRegistryImpl.(TypeMappingRegistryImpl.java: 
155)
	at  
org 
.apache 
.axis 
.encoding.TypeMappingRegistryImpl.(TypeMappingRegistryImpl.java: 
149)

at org.apache.axis.wsdl.toJava.Emitter.(Emitter.java:144)
	at  
jade 
.webservice 
.dynamicClient.DynamicClient.internalInitClient(DynamicClient.java:406)
	at  
jade 
.webservice.dynamicClient.DynamicClient.initClient(DynamicClient.java: 
367)
	at  
jade 
.webservice 
.dynamicClient.DynamicClientCache.get(DynamicClientCache.java:123)
	at  
jade 
.webservice 
.dynamicClient.DynamicClientCache.get(DynamicClientCache.java:77)

at baseProcess.dashSample.SimpleWindow.startup(SimpleWindow.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at  
sun 
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 
39)
	at  
sun 
.reflect 
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 
25)

at java.lang.reflect.Method.invoke(Method.java:592)
at dash.DashAgent.methodImpl(DashAgent.java:523)
at dash.DashAgent.control(DashAgent.java:459)
at ps.Action.execControl(Action.java:1047)
at ps.Action.execute(Action.java:286)
at ps.ProdSys.start(ProdSys.java:298)
at dash.DashAgent.run(DashAgent.java:180)
at java.lang.Thread.run(Thread.java:613)
Caused by: org.apache.commons.discovery.DiscoveryException: No  
implementation defined for org.apache.commons.logging.LogFactory
	at  
org 
.apache.commons.discovery.tools.DiscoverClass.find(DiscoverClass.java: 
404)
	at  
org 
.apache 
.commons.discovery.tools.DiscoverClass.newInstance(DiscoverClass.java: 
579)
	at  
org 
.apache 
.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java: 
418)
	at  
org 
.apache 
.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java: 
378)
	at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java: 
45)

at java.security.AccessController.doPrivileged(Native Method)
	at  
org 
.apache 
.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41)
	at  
org.apache.axis.components.logger.LogFactory.(LogFactory.java: 
33)

... 20 more


Re: SOAPUI Complex Type Arrays

2009-10-19 Thread Cristianpark

Hi there

I found a solution to this issue that helps to probe an method that have an
array as input.

Here's the Request that soapUI generates for the method:

http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:urn="urn:calcularIndicadorProcedimiento"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>
   
   
  http://schemas.xmlsoap.org/soap/encoding/";>
 
 Vertimientos
 Eficiencia
  
   


I didn't have a way to specify wich 'periodos' I want to work with. This is
how I solved it:

http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:urn="urn:calcularIndicadorProcedimiento"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>
   
   
  http://schemas.xmlsoap.org/soap/encoding/";>
 
   
2009-10-1  

2009-10-31
  
   
2009-9-1   

2009-9-30
   

 Vertimientos
 Eficiencia
  
   


I hope it can help somebody with the same problem.

Greetings from Colombia


Hi, I have the same issue as the threat author
I know this is an old Threat, but I want to know if it ever was solved

Anyway, if it's useful, this is my WSDL [1] and this [2] is the request I'm
doing on soapUI. I want to probe the WS sending the array as input.

Thank You

[1] http://pastebin.com/f732ec7c8
[2] http://pastebin.com/fb044c47
-- 
View this message in context: 
http://www.nabble.com/SOAPUI-Complex-Type-Arrays-tp15086103p25961689.html
Sent from the Axis - User mailing list archive at Nabble.com.



Trouble with Maven including rampart.mar as client-side dependency

2009-10-19 Thread David Dearing
I am trying to run Axis2+Rampart for a simple example with plain text
UsernameToken and Password.  I am using Axis2 1.5 and Rampart 1.4.

I have a secured service hosted by Axis that works fine with maven.  The
rampart and rahas modules are deployed correctly, using the mar files
from my maven repository.

Using the same maven configuration, I am trying to create the
corresponding client, but the rampart and rahas modules are *not*
deployed by default.  engageModule("rampart") always gives me an
"AxisFault: Unable to engage module : rampart"

I can force the client to deploy the modules by creating a
ConfigurationContext from the file system, but I would like these to be
automatically found from the maven classpath rather than separately
including the mar files as a client repository.

Does anyone have a clue as to how I can get the client to find the maven
dependencies when engaging the client?

Thanks in advance!
dave


java.lang.ClassCastException: org.apache.axis.attachments.AttachmentsImpl cannot be cast to org.apache.axis.attachments.Attachments

2009-10-19 Thread Ivanhou82

Hi All!

I am new to Axis (v1.4) and I need your help to solve my problem: I used
wsdl2java to generate axis code for my web application which runs on
Glassfish v2 server. Here is a snippet of my problematic code: 

public  com.work.MyServiceResponse MyService( com.work.MyServiceRequest
MyServiceRequest) throws java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[0]);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI("/MyService");
_call.setEncodingStyle(null);
_call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR,
Boolean.FALSE);
_call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS,
Boolean.FALSE);
   
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new
javax.xml.namespace.QName("http://InputMessageNamespace";, "MyService"));

setRequestHeaders(_call);

setAttachments(_call);


 try {
 java.lang.Object _resp = _call.invoke(new java.lang.Object[]
{MyServiceRequest});

if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)_resp;
}
else {
extractAttachments(_call);
try {
return ( com.work.MyServiceResponse) _resp;
} catch (java.lang.Exception _exception) {
return ( com.work.MyServiceResponse)
org.apache.axis.utils.JavaUtils.convert(_resp,  com.work.MyService.class);
}
}
  } catch (org.apache.axis.AxisFault axisFaultException) {
  throw axisFaultException;
}
}


When I deploy and run this code an AxisFault exception is thrown at the
first line of the try block (in bold).

The trace is:

Caused by: java.lang.ClassCastException:
org.apache.axis.attachments.AttachmentsImpl 
cannot be cast to org.apache.axis.attachments.Attachments
at org.apache.axis.Message.setup(Message.java:352)
at org.apache.axis.Message.(Message.java:246)
at org.apache.axis.client.Call.invoke(Call.java:2425)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
... 61 more
|#]


I have no attachments to attach but the problem occurs. I tried to comment
out setAttachments(_call); but it didn't help. Could You help me, please?

Thanks in advance,
Ivanhou
-- 
View this message in context: 
http://www.nabble.com/java.lang.ClassCastException%3A-org.apache.axis.attachments.AttachmentsImpl-cannot-be-cast-to-org.apache.axis.attachments.Attachments-tp25959859p25959859.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: SOAPUI Complex Type Arrays

2009-10-19 Thread Cristianpark

Hi, I have the same issue as the threat author
I know this is an old Threat, but I want to know if it ever was solved

Anyway, if it's useful, this is my WSDL [1] and this [2] is the request I'm
doing on soapUI. I want to probe the WS sending the array as input.

Thank You

[1] http://pastebin.com/f732ec7c8
[2] http://pastebin.com/fb044c47


omatzura wrote:
> 
> Hi Mar,
> 
> Ole from the soapUI team here.. maybe this is an error in how soapUI
> generates the request, would it be possible for you to mail me this WSDL
> containing the complex type so I can have a look? (o...@eviware.com)
> 
> Thanks in advance!
> 
> best regards,
> 
> /Ole
> eviware.com
> 
> 
> Mar-3 wrote:
>> 
>> I am trying to create a webservice that uses complex type arrays.  How 
>> do I display an example of a complex type within a complex type array.
>> 
>> For single complex type requests I get the layout of the object like so:
>> 
>>   > soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
>>  
>> > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>?
>>  
>>   
>> 
>> For arrays of complex type I get an empty array list.  The complex type 
>> array does not specify what is required in an object of that array.
>> 
>>   > soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
>>  > soapenc:arrayType="urn:AdvClass[]"/>
>>   
>> 
>> How do I cater for complex types so that SOAPUI can display the complex 
>> object type within the array.  Like so:
>> 
>>   > soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
>>  > soapenc:arrayType="urn:AdvClass[]">
>>  
>> > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>?
>>  
>>   
>>   
>> 
>> 
>> 
>> Searching for answers led me to a reply that stated that the array name 
>> was different to the one generated by the proxy.  I've searched through 
>> the auto generation and the array names all seem to line up (called 
>> avs).  Nothing seems out of the ordinary.
>> 
>> Can anyone tell me how to represent an object within an array using
>> SOAPUI?
>> 
>> Thanks,
>> Mar
>> 
>> -
>> To unsubscribe, e-mail: axis-user-unsubscr...@ws.apache.org
>> For additional commands, e-mail: axis-user-h...@ws.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/SOAPUI-Complex-Type-Arrays-tp15086103p25959232.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: SOAPUI Complex Type Arrays

2009-10-19 Thread Cristianpark

Hi, I have the same issue as the threat author
I know this is an old Threat, but I want to know if it ever was solved

Anyway, if it's useful, this is my WSDL [1] and this [2] is the request I'm
doing on soapUI. I want to probe the WS sending the array as input.

Thank You

[1] http://pastebin.com/f732ec7c8
[2] http://pastebin.com/fb044c47


omatzura wrote:
> 
> Hi Mar,
> 
> Ole from the soapUI team here.. maybe this is an error in how soapUI
> generates the request, would it be possible for you to mail me this WSDL
> containing the complex type so I can have a look? (o...@eviware.com)
> 
> Thanks in advance!
> 
> best regards,
> 
> /Ole
> eviware.com
> 
> 
> Mar-3 wrote:
>> 
>> I am trying to create a webservice that uses complex type arrays.  How 
>> do I display an example of a complex type within a complex type array.
>> 
>> For single complex type requests I get the layout of the object like so:
>> 
>>   > soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
>>  
>> > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>?
>>  
>>   
>> 
>> For arrays of complex type I get an empty array list.  The complex type 
>> array does not specify what is required in an object of that array.
>> 
>>   > soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
>>  > soapenc:arrayType="urn:AdvClass[]"/>
>>   
>> 
>> How do I cater for complex types so that SOAPUI can display the complex 
>> object type within the array.  Like so:
>> 
>>   > soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
>>  > soapenc:arrayType="urn:AdvClass[]">
>>  
>> > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>?
>>  
>>   
>>   
>> 
>> 
>> 
>> Searching for answers led me to a reply that stated that the array name 
>> was different to the one generated by the proxy.  I've searched through 
>> the auto generation and the array names all seem to line up (called 
>> avs).  Nothing seems out of the ordinary.
>> 
>> Can anyone tell me how to represent an object within an array using
>> SOAPUI?
>> 
>> Thanks,
>> Mar
>> 
>> -
>> To unsubscribe, e-mail: axis-user-unsubscr...@ws.apache.org
>> For additional commands, e-mail: axis-user-h...@ws.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/SOAPUI-Complex-Type-Arrays-tp15086103p25958653.html
Sent from the Axis - User mailing list archive at Nabble.com.



Problems with Date objects on Axis2

2009-10-19 Thread Guilherme Fré
Hi guys,

 

I’ve developed a WS using Axis2 and I’m trying to consume it using a C#.Net
client.

 

I have one method that require data parameters and I’m populating them with
DateTime objects from .Net. 

 

Also I have noticed that the parameter I have to set has the type
“DateTime?”. But it accepts the DateTime object as I’ve seen on debug mode.

 

So, when the request is done, the WS receives the date parameters as null.
I’ve tried to use java.util.Date and Java.sql.Timestamp and both have not
worked.

 

Does anyone can help me???

 

Thanks in regards.

--

Guilherme A. N. Fré



Re: XML Unmarshalling/ Data Binding

2009-10-19 Thread srini.maran

Here is the sample code to convert XM to object using ADB binding

Refering IBM article Library example - Input Object getBook

First convert XML schema to Object using wsdl2java - ADB binding

String xmlStr = "  123456 "

if you get an unexpected sub element, please specify
xmlns='http://ws.sosnoski.com/library/wsdl' in GetBook element.  ADB
requires xmlns in the element.

Instatiate the main element obejct (Eg. refering IBM article Library
example)

XMLStreamReader reader = XMLInputFactory.newInstance()
.createXMLStreamReader(new 
ByteArrayInputStream(xmlStr.getBytes()));
System.out.println("Getting Object");
GetBook gb = GetBook .Factory.parse(reader);

// to verify that the xml coverted to object succesfully or not, print the
XML from coverted object
System.out.println("Retrive XML from Object "
   + gb.getOMElement(gb.MY_QNAME,
OMAbstractFactory.getOMFactory())
.toStringWithConsume());

GetBook1 gb1 = new GetBook1();
gb1.setGetBook(gb);

System.out.println("Retrive XML from Object "
   + gb1.getOMElement(gb1.MY_QNAME,
OMAbstractFactory.getOMFactory())
.toStringWithConsume());



jcaristi wrote:
> 
> There are three Axis2 options for this, which are clearly explained in
> this article:
> 
> http://www.ibm.com/developerworks/webservices/library/ws-java3/
> 
> Note that you would probably want to use these in place of JAXB, not in
> addition to it.  If you want to use JAXB, you should probably stick with a
> pure JAX-WS solution and skip the Axis data binding.
> 
> 
> kushal12 wrote:
>> 
>> Hi,
>> 
>> Can somebody tell me if, there is a way by which you can convert the
>> incoming XML to a java object using Axis ??
>> 
>> I am trying to call a webservice and the client for which has been
>> written in Axis.
>> 
>> Now Client in turn gets the input data to be passsed to the service in
>> the form of XML. 
>> 
>> If I use Jaxb to unmarshal the incoming data, Jaxb generates its own set
>> of java classes for the xml, which are different in names, as those
>> generated by axis, as a part of wsdl2java tool.
>> 
>> Is there any way by which I can driectly copy the java object returned by
>> JAXB into the one generated by Axis ?
>> 
>> Have tried beanutils, but it expects all the property names in the source
>> and destination object to be same ?
>> 
>> Regards
>> Kushal
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/XML-Unmarshalling--Data-Binding-tp22580923p25958601.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: Avoid Logging to catalina.out

2009-10-19 Thread Mauro Molinari

Grimm, Markus ha scritto:

Is there a possibility to change this behaviour for the axis2-outputs.
F.e. Is there a way to give axis2 a own log4j-config?
Disabling the console-appender could mask the tomcat-outputs but this
stuff I would like to see anymore.
My catalina.out gets huge and anytime there's no chance to deal with the
file.


Instead of providing to Axis2 its own log4j configuration, you simply 
need to edit log4j.properties and provide a different logging behaviour 
for the classes in the org.apache.axis2 hierarchy.

You should read the Log4j documentation in order to do this.

--
Mauro Molinari
Software Designer & Developer
E-mail: mauro.molin...@cardinis.com


Re: Problemes throwing faults when rampart is enabled using Axis2-1.5

2009-10-19 Thread Håkon Sagehaug
Hi

That did the trick, thanks

cheers, Håkon

2009/10/16 Prabath Siriwardena 

> Hi;
>
> Your issue may be related to [1] - this is fixed in Axis2 trunk.
>
> Can you please test your scenario with the Axis2 distribution available at
> [2].
>
> Thanks & regards.
> -Prabath
>
> [1]:https://issues.apache.org/jira/browse/AXIS2-4241
> [2]:
> http://people.apache.org/~gdaniels/stagingRepo/org/apache/axis2/distribution/1.5.1/
>
> Håkon Sagehaug wrote:
>
>> Hi all,
>>
>> I've got a service with rampart enabled, when one of the operation throws
>> a fault message this is what I get back from the server, captured through
>> tcpmon
>>
>>  http://localhost:1/axis2/"/>
>>   Axis2 :: Internal server error   > href="axis2-web/css/axis-style.css" rel="stylesheet" type="text/css"/>
>> 

RE: File download issue

2009-10-19 Thread Tarun Chowdhry
Hi,
SORRY. {POSTED AT WRONG PLACE)

Kind Regards,
Tarun


-Original Message-
From: Tarun Chowdhry [mailto:tchowd...@ipolicynetworks.com] 
Sent: Monday, October 19, 2009 3:23 PM
To: axis-user@ws.apache.org
Subject: File download issue

Hi,
Getting the following exception when trying to call the FileUpload code:
Action class:
import java.io.*;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.Action;
import org.apache.struts2.ServletActionContext;




public class extends ActionSupport{

private String filename;
public InputStream myStream;


public String getFilename(){
return filename;
}

public void setFilename(String u){
System.out.println("--name set to " + u);
filename = u ;

}

public void setMyStream(InputStream i){
myStream = i;
}

public InputStream getMyStream(){

return 
ServletActionContext.getServletContext().getResourceAsStream(filename);
}

}

Configuration:
 

http://struts.apache.org/dtds/struts-2.0.dtd";> 


 








filedownload.jsp




myStream
application/octet-stream
attachment;filename="lists.text"




login.jsp



login.jsp
success.jsp
   









equest.

exception 

javax.servlet.ServletException: Can not find a java.io.InputStream with the 
name [myStream] in the invocation stack. Check the  tag 
specified for this action.

org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)

org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:422)


root cause 

java.lang.IllegalArgumentException: Can not find a java.io.InputStream with the 
name [myStream] in the invocation stack. Check the  tag 
specified for this action.

org.apache.struts2.dispatcher.StreamResult.doExecute(StreamResult.java:189)

org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178)

com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)

com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)

com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)

com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)

org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)

com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)

com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)

com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:184)

com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInv

Avoid Logging to catalina.out

2009-10-19 Thread Grimm, Markus
Hi all,
 
I use axis2 with tomcat and I have the problem that all axis2-outputs go
to catalina.out, too.
I think both axis2 and tomcat use as configuration the log4j.properties
in WEB-INF/classes.
In this logfile the _console-appender_ is activated and for this reason
all axis2-stuff goes to catalina.out?!
 
Is there a possibility to change this behaviour for the axis2-outputs.
F.e. Is there a way to give axis2 a own log4j-config?
Disabling the console-appender could mask the tomcat-outputs but this
stuff I would like to see anymore.
My catalina.out gets huge and anytime there's no chance to deal with the
file.
 
Thanks
Markus
 
 
 


File download issue

2009-10-19 Thread Tarun Chowdhry
Hi,
Getting the following exception when trying to call the FileUpload code:
Action class:
import java.io.*;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.Action;
import org.apache.struts2.ServletActionContext;




public class extends ActionSupport{

private String filename;
public InputStream myStream;


public String getFilename(){
return filename;
}

public void setFilename(String u){
System.out.println("--name set to " + u);
filename = u ;

}

public void setMyStream(InputStream i){
myStream = i;
}

public InputStream getMyStream(){

return 
ServletActionContext.getServletContext().getResourceAsStream(filename);
}

}

Configuration:
 

http://struts.apache.org/dtds/struts-2.0.dtd";> 


 








filedownload.jsp




myStream
application/octet-stream
attachment;filename="lists.text"




login.jsp



login.jsp
success.jsp
   









equest.

exception 

javax.servlet.ServletException: Can not find a java.io.InputStream with the 
name [myStream] in the invocation stack. Check the  tag 
specified for this action.

org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)

org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:422)


root cause 

java.lang.IllegalArgumentException: Can not find a java.io.InputStream with the 
name [myStream] in the invocation stack. Check the  tag 
specified for this action.

org.apache.struts2.dispatcher.StreamResult.doExecute(StreamResult.java:189)

org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178)

com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)

com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)

com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)

com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)

org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)

com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)

com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)

com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:184)

com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

com.opensymphon