Some quick Axis2C help required ---- very very urgent

2008-11-18 Thread ramesh Gopal

The last time I ran into some issue with my Axis code, I came across lot of 
suggestions.

Sample xml :

operation
in0 111 /in0
in0 222 /in0
/operation


Now I have modified my code as follows :

first_element = axiom_node_get_data_element(node, env);
if ((ci = axiom_element_get_child_elements(first_element, env, node)) != NULL)
{
while(AXIS2_TRUE == axiom_child_element_iterator_has_next(ci, env))
{
cn = axiom_child_element_iterator_next(ci, env);
ce = axiom_node_get_data_element(cn, env);
result = axiom_element_get_text(ce, env, cn);
textArr[i] = result;
i++;
}
}

But after these changes, I am getting an error of a different kind (though 
again a segmentation issue)

#0  0x0053c7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x0017c7f5 in raise () from /lib/tls/libc.so.6
#2  0x0017e199 in abort () from /lib/tls/libc.so.6
#3  0x001b04ea in __libc_message () from /lib/tls/libc.so.6
#4  0x001b6c6f in _int_free () from /lib/tls/libc.so.6
#5  0x001b6fea in free () from /lib/tls/libc.so.6
#6  0x00b16d0b in axutil_allocator_free_impl (allocator=0x9671008, 
ptr=0x96e16c0) at allocator.c:95
#7  0x00c937e2 in axiom_element_free (om_element=0x96deb90, env=0x96e16c0)
at om_element.c:741
#8  0x00f39797 in axis2_skel_ws_test_demo_test_demo ()
   from ..//services/ws_test_demo/libws_test_demo.so
#9  0x00f39a0f in axis2_svc_skel_ws_test_demo_invoke ()
   from ..//services/ws_test_demo/libws_test_demo.so
#10 0x009df25d in axis2_raw_xml_in_out_msg_recv_invoke_business_logic_sync (
msg_recv=0x96cdac8, env=0x96d8f78, msg_ctx=0x96d9a88, 
new_msg_ctx=0x96def08) at raw_xml_in_out_msg_recv.c:209
#11 0x009dedb2 in axis2_msg_recv_invoke_business_logic (msg_recv=0x0, 
env=0x96d8f78, in_msg_ctx=0x96d9a88, out_msg_ctx=0x96def08)
at msg_recv.c:397
#12 0x009dee93 in axis2_msg_recv_receive_impl (msg_recv=0x96cdac8, 
env=0x96d8f78, msg_ctx=0x96d9a88, callback_recv_param=0x0)
at msg_recv.c:319


As this error says something about freeing ... is it reqd that we free some 
elements ... Are I missing something in the code

Or Is it something to do with glibc error. 

Pls suggest ... Any kind of help at the earliest is appreciated.

Ramesh.



  Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/


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



Re: Some quick Axis2C help required ---- very very urgent

2008-11-18 Thread Samisa Abeysinghe
It is hard to look at this code fragment and tell what the error is. 
Please send the full code so that I could run it and see.


Thanks,
Samisa...

ramesh Gopal wrote:

The last time I ran into some issue with my Axis code, I came across lot of 
suggestions.

Sample xml :

operation
in0 111 /in0
in0 222 /in0
/operation


Now I have modified my code as follows :

first_element = axiom_node_get_data_element(node, env);
if ((ci = axiom_element_get_child_elements(first_element, env, node)) != NULL)
{
while(AXIS2_TRUE == axiom_child_element_iterator_has_next(ci, env))
{
cn = axiom_child_element_iterator_next(ci, env);
ce = axiom_node_get_data_element(cn, env);
result = axiom_element_get_text(ce, env, cn);
textArr[i] = result;
i++;
}
}

But after these changes, I am getting an error of a different kind (though 
again a segmentation issue)

#0  0x0053c7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x0017c7f5 in raise () from /lib/tls/libc.so.6
#2  0x0017e199 in abort () from /lib/tls/libc.so.6
#3  0x001b04ea in __libc_message () from /lib/tls/libc.so.6
#4  0x001b6c6f in _int_free () from /lib/tls/libc.so.6
#5  0x001b6fea in free () from /lib/tls/libc.so.6
#6  0x00b16d0b in axutil_allocator_free_impl (allocator=0x9671008, 
ptr=0x96e16c0) at allocator.c:95

#7  0x00c937e2 in axiom_element_free (om_element=0x96deb90, env=0x96e16c0)
at om_element.c:741
#8  0x00f39797 in axis2_skel_ws_test_demo_test_demo ()
   from ..//services/ws_test_demo/libws_test_demo.so
#9  0x00f39a0f in axis2_svc_skel_ws_test_demo_invoke ()
   from ..//services/ws_test_demo/libws_test_demo.so
#10 0x009df25d in axis2_raw_xml_in_out_msg_recv_invoke_business_logic_sync (
msg_recv=0x96cdac8, env=0x96d8f78, msg_ctx=0x96d9a88, 
new_msg_ctx=0x96def08) at raw_xml_in_out_msg_recv.c:209
#11 0x009dedb2 in axis2_msg_recv_invoke_business_logic (msg_recv=0x0, 
env=0x96d8f78, in_msg_ctx=0x96d9a88, out_msg_ctx=0x96def08)

at msg_recv.c:397
#12 0x009dee93 in axis2_msg_recv_receive_impl (msg_recv=0x96cdac8, 
env=0x96d8f78, msg_ctx=0x96d9a88, callback_recv_param=0x0)

at msg_recv.c:319


As this error says something about freeing ... is it reqd that we free some 
elements ... Are I missing something in the code

Or Is it something to do with glibc error. 


Pls suggest ... Any kind of help at the earliest is appreciated.

Ramesh.



  Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/


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




No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.175 / Virus Database: 270.9.4/1795 - Release Date: 11/17/2008 5:24 PM


  



--
Samisa Abeysinghe 
Director, Engineering; WSO2 Inc.


http://www.wso2.com/ - The Open Source SOA Company


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



RE: xs:any minOccurs Check is Wrong

2008-11-18 Thread David Taylor (Lowell)
I think I have figured out the problem.  In this case, there is an
anonymous complex type with a sequence.  That sequence has an implied
minOccurs of 1.  But, inside that sequence is only a single item, any,
with a minOccurs of 0.  The ADB deserializer didn't handle the case
where the any had nothing, since the sequence was expecting at least 1
item.  I worked around it by adding minOccurs=0 to the sequence.  I
don't know how the specification says to handle this, but it may be that
if all the subitems have minOccurs=0, then the parent should also be
treated as though minOccurs=0 as well.

Thanks,

-David

 



From: Dimuthu Gamage [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 17, 2008 10:04 PM
To: Apache AXIS C User List
Subject: Re: xs:any minOccurs Check is Wrong

 

Hi David,

From the error message of your generated code, it looks like you are
checking ItemListTypeSequence instead of ItemListType property. Can
you check whether there is anther property named ItemListType?.

If it is no other property, then this should probably bugs for not
setting @any and @minOccurs. If so please report it to the Apache Jira.
https://issues.apache.org/jira/secure/Dashboard.jspa (select Axis2-C
project)

Thanks
Dimuthu

On Wed, Nov 12, 2008 at 4:29 AM, David Taylor (Lowell) [EMAIL PROTECTED]
wrote:

I have a WSDL that I am using to generate ADB stubs.  This WSDL includes
a type with xs:any that is causing the stub to have code generated to
check for at least 1 element in the list, even though the element lists
minOccurs=0.  Here's the fragment of the WSDL:

 

 

complexType name=ItemListType

sequence maxOccurs=unbounded

any namespace=##other
processContents=lax minOccurs=0 maxOccurs=unbounded /

/sequence

/complexType

 

Here is the erroneous check in the generated stub deserialize function:

 

   if (i  1)

   {

 /* found element out of order */

 AXIS2_LOG_ERROR(env-log,
AXIS2_LOG_SI, ItemListTypeSequence (@minOccurs = '1') only have %d
elements, i);

 if(element_qname)

 {

axutil_qname_free(element_qname,
env);

 }

 if(arr_list)

 {

axutil_array_list_free(arr_list,
env);

 }

 return AXIS2_FAILURE;

   }

 

The problem appears to be that the XSLT stylesheet is looking for an
@any attribute to be set, to avoid generating this section of code.  It
seems that the xs:any element should set this attribute.  However, I
can't figure out where that attribute should be set.  Any help would be
greatly appreciated.

Thanks,

-David

 




-- 
Thanks,
Dimuthu Gamage

http://www.dimuthu.org
http://www.wso2.org



[WSDL2Java] How to use an XSD contained in a JAR

2008-11-18 Thread stlecho

Hi,

I would like to import an XSD that is contained in a JAR. Is this possible
with WSDL2Java ?

Regards, Stefan Lecho.
-- 
View this message in context: 
http://www.nabble.com/-WSDL2Java--How-to-use-an-XSD-contained-in-a-JAR-tp20557265p20557265.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]



jaxws-calculator

2008-11-18 Thread Deepak Damara
Hi,
I am trying to run  sample jaxws-calculator  from axis2-1.4.1 release . I 
am using java 1.5. I am not able to deploy service .
log is 
 No annotated classes found in the jar: 
file:/D:/axis2-1.4.1-source/repository/servicejars/jaxws-cal
culator-1.4.1.jar. Service deployment failed.
[INFO] Deploying artifact : jaxws-calculator-1.4.1.jar
[INFO] Exception creating Axis Service : null
javax.xml.ws.WebServiceException: Validation error: cannot find WSDL 
Definition specified by this We
bService annotation. Implementation class: 
org.apache.axis2.jaxws.calculator.CalculatorService; WSDL
 location: META-INF/CalculatorService.wsdl
at 
org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:1
73)
at 
org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:70)

at 
org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:118
)
at 
org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.validateIntegrity(ServiceD
escriptionImpl.java:1194)
at 
org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.validateDBCLIntegrity(Serv
iceDescriptionImpl.java:1105)
at 
org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.init(ServiceDescriptionI
mpl.java:314)
at 
org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescriptionFr
omDBCMap(DescriptionFactoryImpl.java:240)
at 
org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescription(D
escriptionFactoryImpl.java:210)
at 
org.apache.axis2.jaxws.description.DescriptionFactory.createAxisService(DescriptionFactor
y.java:357)
at 
org.apache.axis2.jaxws.framework.JAXWSDeployer.createAxisService(JAXWSDeployer.java:278)
at 
org.apache.axis2.jaxws.framework.JAXWSDeployer.deployClasses(JAXWSDeployer.java:202)
at 
org.apache.axis2.jaxws.framework.JAXWSDeployer.deploy(JAXWSDeployer.java:158)
at 
org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.
java:136)
at 
org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:597)
at 
org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
at 
org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:330)
at 
org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:227)

at 
org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:324)

at 
org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:64
)
at 
org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:71)
at 
org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(Scheduler.java:83)

at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
[ERROR] Error:
 No annotated classes found in the jar: 
file:/D:/axis2-1.4.1-source/repository/servicejars/jaxws-cal
culator-1.4.1.jar. Service deployment failed.

Deepak Kumar Damara
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

Experience certainty.   IT Services
Business Solutions
Outsourcing

=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




Re: org.apache.axis2.AxisFault: HTTP Transport error : '501' - 'Not Implemented' message

2008-11-18 Thread peterramesh

Hi Daniel,

I'm trying to access the services offered by Entrez utilities web service,
On running a sample java application (
http://eutils.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/DOC/esoap_java_help.html
http://eutils.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/DOC/esoap_java_help.html
) I'm getting 501 error.


- Unable to sendViaPost to
url[http://eutils.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/soap_adapter_2_0.cgi]
org.apache.axis2.AxisFault: Transport error: 501 Error: Not Implemented
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)
at
gov.nih.nlm.ncbi.www.soap.eutils.EUtilsServiceStub.run_eGquery(EUtilsServiceStub.java:1580)
at gov.nih.nlm.ncbi.www.soap.eutils.GetDBCount.main(GetDBCount.java:28)
org.apache.axis2.AxisFault: Transport error: 501 Error: Not Implemented


Does it meant that the service being not offered to the public?

Thanks in advance,
Rameshkumar



Daniel Hagen wrote:
 
 Hi Pinaki,
 
 this looks like a HTTP issue to me where the SQUID Proxy between client 
 and server does have a problem with the Chunked Transfer Encoding the 
 client uses in conjunction with a HTTP POST request.
 
 Squid's support for Chunked Transfer Encoding when communicating with 
 the client is incomplete; I have seen the exact behaviour you described 
 for HTTP PUT requests but was unaware that this also is the case for 
 HTTP POST.
 
 Maybe you could try to convince your webservice client not to use 
 Chunked Transfer Encoding but to
 - either close the HTTP connection after each request (which can be a 
 performance problem when you are making many requests in a short time
 frame)
 - or send a Content-Length along with the request
 
 Another workaround would be to disable the use of a proxy if your 
 environment allows you to connect to the Webservice server directly.
 
 Best regards
 
 Daniel
 
 Pinaki Chandrasekhar schrieb:
 Hello Friends,
 I have been trying to figure out the problem for a few days and really
 need
 some help.
 My j2ee application integrates with IPX gateway for Short messaging
 service.
 This is implemented as a WebService by IPX and they provided me with thge
 precompiled client stub files ( compiled using axis 2.1.1.1)
 I am new to web services and axis. I went through all the installation
 and
 tutorial successfully with a helloworld ws example and the axis2userguide
 example that is provided.
 However I am stuck when I try integrating with my existing j2ee
 application.
 My j2ee app is the client for the web service and I compiled it
 successfully
 with the client stubs set on the classpath. But I keep getting this error
 whenever it needs to send the message:
 org.apache.axis2.AxisFault: HTTP Transport error : '501' - 'Not
 Implemented'
 
 I have the server logs here for your reference.
 
 I may be messing  things up in configuring the whole app on the server
 with
 axis 2
 
 I am using the Jboss-4.0.3Sp1 as the server and also have axis2 installed
 on
 the same machine with the AXIS2_HOME set properly. I also have the
 axis.war
 file deployed on the server.
 
 Please, can someone help when to rectify the problem.
 
 Thanks in advance,
 
 pc
 
 
 
 this is the server log when I send a short code through my phone. It goes
 to
 the iPX gateway who reroute it back to my application. It seems like the
 message is all getting prepared and throws up an error while about to
 send.
 
 2008-04-23 10:31:15,769 INFO [ReceiveSMSServlet] Receive SMS Message
 
 2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] SMS
 Received:1208917875769
 
 2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] IPX Receive
 ---TimeStamp
 : 20080423 04:32:44
 
 2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] IPX Receive
 ---Operator :
 DiGi
 
 2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] IPX Receive
 ---MessageId
 : 1-1703551585
 
 2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] IPX Receive ---Message
 :
 Store fs 009
 
 2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] IPX
 Receive ---DestinationAddress : 32088
 
 2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] IPX
 Receive ---OriginatorAddress : 60169063492
 
 2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] Local
 Context.PROVIDER_URL: 

Re: REST Service with AXIS

2008-11-18 Thread keith chapman
Hi Manish,

I am the one who wrote that article, the original was published at
http://wso2.org/library/3726. Nice to hear that you found it usefull. I have
answered your questions inline,

On Mon, Nov 17, 2008 at 10:11 PM, kat kat [EMAIL PROTECTED] wrote:

 I have actually followed Keith Chapman's article on webmonkey, which is
 here:

 http://www.webmonkey.com/tutorial/RESTful_Web_Services_with_Apache_Axis2

 If I go with instrumenting REST using WSDL 2.0 , then my basic question
 referring to the above article is how can we actually make a POST (add new
 student) on /services/studentService/students or rather POST any basic or
 Complex Type. From the wsdl, addStudent(Student student) is the service
 method that will get called and it needs an argument which should be an
 object of class Student.
 In truly RESTful way, this should be a form POST and the data is url
 encoded or rather sent in application/x-www-form-urlencoded content type. If
 I have to say use this service with REST client in Python, I will have to
 know about the Student object ,is it? I am missing something here, can you
 explain?

This actually depends on your your request message is defined. In the
example I've provided I have used a POJO as the input to the service method,
and when a POJO is used the default schema generated by Axis2 is as follows,

xs:element name=addStudent
xs:complexType
xs:sequence
xs:element minOccurs=0 name=student
nillable=true type=ax21:Student/
/xs:sequence
/xs:complexType
/xs:element
xs:complexType name=Student
xs:sequence
xs:element minOccurs=0 name=age type=xs:int/
xs:element minOccurs=0 name=name
nillable=true type=xs:string/
xs:element maxOccurs=unbounded minOccurs=0
name=subjects nillable=true type=xs:string/
/xs:sequence
/xs:complexType
/xs:element

With a schema like this you cannot use the contentType
application/x-www-form-urlencoded (cause the server would not have enough
information to reconstruct the message). If you want to use
application/x-www-form-

urlencoded then you could do this by modifying your service method as
follows. addStudent(Sring name, int age, String [] subjects) . This would
generate a schema similar to,

xs:element name=addStudent
xs:complexType
xs:sequence
xs:element minOccurs=0 name=age type=xs:int/
xs:element minOccurs=0 name=name
nillable=true type=xs:string/
xs:element maxOccurs=unbounded
minOccurs=0 name=subjects nillable=true type=xs:string/
/xs:sequence
/xs:complexType
/xs:element

This makes it possible to do what you are trying.

Please have a look at
http://www.keith-chapman.org/2008/09/restfull-mashup-with-wsdl-20-wso2.htmlas
well. There I have shown how you could play around with the WSO2
Mashup
Server [1] (It runs on top of Axis2 and allows you to write service using
JavaScript with ease) and experiment with stuff. You could use that to write
services and validate your ideas in a flash. Hope this helps.

Thanks,
Keith.

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

 On the other hand I could do POST, may not be ComplexType but of simple
 type if  I have my service class returning an AXIOM OMElement object as well
 as taking OMElement object as an argument to the action methods but WSDL 2.0
 way seems cleaner to me.

 Appreciate your feedback

 Thanks
 Manish




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

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


WSDL2JAVA options

2008-11-18 Thread ibrahim demir
Hi All;

I'm creating my classes with axis2 wsdl2java tool. But teh resultant classes 
are hard to read. It adds the class package name before every element. Is there 
any option to stop them. Or do you have any way to get rid of them quickly.

As an example:

private staticjava.lang.String generatePrefix(java.lang.String 
namespace) { 
   if(namespace.equals(urn:cs.com.tr/banking)){ 
   return ; 
   } 
   return 
org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix(); 
   } 


I do not want to see java.lang.String in front of generatePrefix method. 

Yours.

 Ibrahim DEMIR
CyberSoft Yazilim Muh.
http://www.ibrahimdemir.org


  

Re: WSDL2JAVA options

2008-11-18 Thread Amila Suriarachchi
this is the default method it generates the code. this has done to
avoid compilation errors. There is no option to change it.

thanks,
Amila.

On 11/18/08, ibrahim demir [EMAIL PROTECTED] wrote:
 Hi All;

 I'm creating my classes with axis2 wsdl2java tool. But teh resultant classes
 are hard to read. It adds the class package name before every element. Is
 there any option to stop them. Or do you have any way to get rid of them
 quickly.

 As an example:

 private staticjava.lang.String generatePrefix(java.lang.String
 namespace) {
if(namespace.equals(urn:cs.com.tr/banking)){
return ;
}
return
 org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}


 I do not want to see java.lang.String in front of generatePrefix method.

 Yours.

  Ibrahim DEMIR
 CyberSoft Yazilim Muh.
 http://www.ibrahimdemir.org





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

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



Re: org.apache.axis2.AxisFault: HTTP Transport error : '501' - 'Not Implemented' message

2008-11-18 Thread Amila Suriarachchi
On Tue, Nov 18, 2008 at 5:30 PM, peterramesh [EMAIL PROTECTED] wrote:


 Hi Daniel,

 I'm trying to access the services offered by Entrez utilities web service,
 On running a sample java application (

 http://eutils.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/DOC/esoap_java_help.html

 http://eutils.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/DOC/esoap_java_help.html
 ) I'm getting 501 error.


 - Unable to sendViaPost to
 url[
 http://eutils.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/soap_adapter_2_0.cgi
 ]
 org.apache.axis2.AxisFault: Transport error: 501 Error: Not Implemented
at

 org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:296)


this means the problem is with the response.  Have look at the response.

thanks,
Amila.


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

 gov.nih.nlm.ncbi.www.soap.eutils.EUtilsServiceStub.run_eGquery(EUtilsServiceStub.java:1580)
at
 gov.nih.nlm.ncbi.www.soap.eutils.GetDBCount.main(GetDBCount.java:28)
 org.apache.axis2.AxisFault: Transport error: 501 Error: Not Implemented


 Does it meant that the service being not offered to the public?

 Thanks in advance,
 Rameshkumar



 Daniel Hagen wrote:
 
  Hi Pinaki,
 
  this looks like a HTTP issue to me where the SQUID Proxy between client
  and server does have a problem with the Chunked Transfer Encoding the
  client uses in conjunction with a HTTP POST request.
 
  Squid's support for Chunked Transfer Encoding when communicating with
  the client is incomplete; I have seen the exact behaviour you described
  for HTTP PUT requests but was unaware that this also is the case for
  HTTP POST.
 
  Maybe you could try to convince your webservice client not to use
  Chunked Transfer Encoding but to
  - either close the HTTP connection after each request (which can be a
  performance problem when you are making many requests in a short time
  frame)
  - or send a Content-Length along with the request
 
  Another workaround would be to disable the use of a proxy if your
  environment allows you to connect to the Webservice server directly.
 
  Best regards
 
  Daniel
 
  Pinaki Chandrasekhar schrieb:
  Hello Friends,
  I have been trying to figure out the problem for a few days and really
  need
  some help.
  My j2ee application integrates with IPX gateway for Short messaging
  service.
  This is implemented as a WebService by IPX and they provided me with
 thge
  precompiled client stub files ( compiled using axis 2.1.1.1)
  I am new to web services and axis. I went through all the installation
  and
  tutorial successfully with a helloworld ws example and the
 axis2userguide
  example that is provided.
  However I am stuck when I try integrating with my existing j2ee
  application.
  My j2ee app is the client for the web service and I compiled it
  successfully
  with the client stubs set on the classpath. But I keep getting this
 error
  whenever it needs to send the message:
  org.apache.axis2.AxisFault: HTTP Transport error : '501' - 'Not
  Implemented'
 
  I have the server logs here for your reference.
 
  I may be messing  things up in configuring the whole app on the server
  with
  axis 2
 
  I am using the Jboss-4.0.3Sp1 as the server and also have axis2
 installed
  on
  the same machine with the AXIS2_HOME set properly. I also have the
  axis.war
  file deployed on the server.
 
  Please, can someone help when to rectify the problem.
 
  Thanks in advance,
 
  pc
 
 
 
  this is the server log when I send a short code through my phone. It
 goes
  to
  the iPX gateway who reroute it back to my application. It seems like the
  message is all getting prepared and throws up an error while about to
  send.
 
  2008-04-23 10:31:15,769 INFO [ReceiveSMSServlet] Receive SMS Message
 
  2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] SMS
  Received:1208917875769
 
  2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] IPX Receive
  ---TimeStamp
  : 20080423 04:32:44
 
  2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] IPX Receive
  ---Operator :
  DiGi
 
  2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] IPX Receive
  ---MessageId
  : 1-1703551585
 
  2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] IPX Receive
 ---Message
  :
  Store fs 009
 
  2008-04-23 

Re: org.apache.axis2.AxisFault: HTTP Transport error : '501' - 'Not Implemented' message

2008-11-18 Thread ibrahim demir
Ok. Thanks for your quick reply. so I must find a way to refractor them or to 
clear them using Eclipse.

Yours.

 Ibrahim DEMIR
CyberSoft Yazilim Muh.
http://www.ibrahimdemir.org

 
   
 





From: Amila Suriarachchi [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Tuesday, November 18, 2008 4:18:47 PM
Subject: Re: org.apache.axis2.AxisFault: HTTP Transport error : '501' - 'Not 
Implemented' message




On Tue, Nov 18, 2008 at 5:30 PM, peterramesh [EMAIL PROTECTED] wrote:


Hi Daniel,

I'm trying to access the services offered by Entrez utilities web service,
On running a sample java application (
http://eutils.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/DOC/esoap_java_help.html
http://eutils.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/DOC/esoap_java_help.html
) I'm getting 501 error.


- Unable to sendViaPost to
url[http://eutils.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/soap_adapter_2_0.cgi]
org.apache.axis2.AxisFault: Transport error: 501 Error: Not Implemented
   at
org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:296)

this means the problem is with the response.  Have look at the response.

thanks,
Amila. 


   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)
   at
gov.nih.nlm.ncbi.www.soap.eutils.EUtilsServiceStub.run_eGquery(EUtilsServiceStub.java:1580)
   at gov.nih.nlm.ncbi.www.soap.eutils.GetDBCount.main(GetDBCount.java:28)
org.apache.axis2.AxisFault: Transport error: 501 Error: Not Implemented


Does it meant that the service being not offered to the public?

Thanks in advance,
Rameshkumar




Daniel Hagen wrote:

 Hi Pinaki,

 this looks like a HTTP issue to me where the SQUID Proxy between client
 and server does have a problem with the Chunked Transfer Encoding the
 client uses in conjunction with a HTTP POST request.

 Squid's support for Chunked Transfer Encoding when communicating with
 the client is incomplete; I have seen the exact behaviour you described
 for HTTP PUT requests but was unaware that this also is the case for
 HTTP POST.

 Maybe you could try to convince your webservice client not to use
 Chunked Transfer Encoding but to
 - either close the HTTP connection after each request (which can be a
 performance problem when you are making many requests in a short time
 frame)
 - or send a Content-Length along with the request

 Another workaround would be to disable the use of a proxy if your
 environment allows you to connect to the Webservice server directly.

 Best regards

 Daniel

 Pinaki Chandrasekhar schrieb:
 Hello Friends,
 I have been trying to figure out the problem for a few days and really
 need
 some help.
 My j2ee application integrates with IPX gateway for Short messaging
 service.
 This is implemented as a WebService by IPX and they provided me with thge
 precompiled client stub files ( compiled using axis 2.1.1.1)
 I am new to web services and axis. I went through all the installation
 and
 tutorial successfully with a helloworld ws example and the axis2userguide
 example that is provided.
 However I am stuck when I try integrating with my existing j2ee
 application.
 My j2ee app is the client for the web service and I compiled it
 successfully
 with the client stubs set on the classpath. But I keep getting this error
 whenever it needs to send the message:
 org.apache.axis2.AxisFault: HTTP Transport error : '501' - 'Not
 Implemented'

 I have the server logs here for your reference.

 I may be messing  things up in configuring the whole app on the server
 with
 axis 2

 I am using the Jboss-4.0.3Sp1 as the server and also have axis2 installed
 on
 the same machine with the AXIS2_HOME set properly. I also have the
 axis.war
 file deployed on the server.

 Please, can someone help when to rectify the problem.

 Thanks in advance,

 pc



 this is the server log when I send a short code through my phone. It goes
 to
 the iPX gateway who reroute it back to my application. It seems like the
 message is all getting prepared and throws up an error while about to
 send.

 2008-04-23 10:31:15,769 INFO [ReceiveSMSServlet] Receive SMS Message

 2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] SMS
 Received:1208917875769

 2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] IPX Receive
 

Re: [WSDL2Java] How to use an XSD contained in a JAR

2008-11-18 Thread Amila Suriarachchi
On Tue, Nov 18, 2008 at 4:19 PM, stlecho [EMAIL PROTECTED] wrote:


 Hi,

 I would like to import an XSD that is contained in a JAR. Is this possible
 with WSDL2Java ?

 I think no. This depends on whether wsdl4j supports this feature or not.
Please have a look at :)

thanks,
Amila.



 Regards, Stefan Lecho.
 --
 View this message in context:
 http://www.nabble.com/-WSDL2Java--How-to-use-an-XSD-contained-in-a-JAR-tp20557265p20557265.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.
blog: http://amilachinthaka.blogspot.com/


Re: WSDL2JAVA options

2008-11-18 Thread Manuel Darveau
Hi,

You could import the generated classes to eclipse and format the whole code
using the format tool.
This can remove unneeded package prefix and do various formatting based on
your preferences.

Manuel

On Tue, Nov 18, 2008 at 8:18 AM, ibrahim demir [EMAIL PROTECTED]wrote:

 Hi All;

 I'm creating my classes with axis2 wsdl2java tool. But teh resultant
 classes are hard to read. It adds the class package name before every
 element. Is there any option to stop them. Or do you have any way to get rid
 of them quickly.

 As an example:

 private static java.lang.String generatePrefix(java.lang.String
 namespace) {
if(namespace.equals(urn:cs.com.tr/banking)){
return ;
}
return
 org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}


 I do not want to see java.lang.String in front of generatePrefix method.

 Yours.

 Ibrahim DEMIR
 CyberSoft Yazilim Muh.
 http://www.ibrahimdemir.org








Re: org.apache.axis2.AxisFault: HTTP Transport error : '501' - 'Not Implemented' message

2008-11-18 Thread Amila Suriarachchi
On Wed, Apr 23, 2008 at 8:58 AM, Pinaki Chandrasekhar 
[EMAIL PROTECTED] wrote:

  Hello Friends,
 I have been trying to figure out the problem for a few days and really need
 some help.
 My j2ee application integrates with IPX gateway for Short messaging
 service.
 This is implemented as a WebService by IPX and they provided me with thge
 precompiled client stub files ( compiled using axis 2.1.1.1)


you don't need the stubs files to talk to a web service. Generate the client
code using the wsdl2java tool.
Try to call to your service using a standalone client (I mean  no need to
deploy it in a jboss server).
This way you can isolate the problem easily.

thanks,
Amila.

 I am new to web services and axis. I went through all the installation and
 tutorial successfully with a helloworld ws example and the axis2userguide
 example that is provided.
 However I am stuck when I try integrating with my existing j2ee
 application. My j2ee app is the client for the web service and I compiled it
 successfully with the client stubs set on the classpath. But I keep getting
 this error whenever it needs to send the message:

 org.apache.axis2.AxisFault: HTTP Transport error : '501' - 'Not
 Implemented'

 I have the server logs here for your reference.

 I may be messing  things up in configuring the whole app on the server with
 axis 2

 I am using the Jboss-4.0.3Sp1 as the server and also have axis2 installed
 on the same machine with the AXIS2_HOME set properly. I also have the
 axis.war file deployed on the server.

 Please, can someone help when to rectify the problem.

 Thanks in advance,

 pc



 this is the server log when I send a short code through my phone. It goes
 to the iPX gateway who reroute it back to my application. It seems like the
 message is all getting prepared and throws up an error while about to send.

 2008-04-23 10:31:15,769 INFO [ReceiveSMSServlet] Receive SMS Message

 2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] SMS
 Received:1208917875769

 2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] IPX Receive ---TimeStamp
 : 20080423 04:32:44

 2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] IPX Receive ---Operator
 : DiGi

 2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] IPX Receive ---MessageId
 : 1-1703551585

 2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] IPX Receive ---Message :
 Store fs 009

 2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] IPX Receive
 ---DestinationAddress : 32088

 2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] IPX Receive
 ---OriginatorAddress : 60169063492

 2008-04-23 10:31:15,769 DEBUG [ReceiveSMSServlet] Local
 Context.PROVIDER_URL: java.naming.provider.url

 2008-04-23 10:31:15,779 INFO [ContentControllerBean] get content for
 requestCode = fs 009

 2008-04-23 10:31:15,779 DEBUG
 [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.Content#findByKeyword]
 Executing SQL: SELECT DISTINCT t0_c.ContentId, t0_c.Keyword, t0_c.Tariff,
 t0_c.Type, t0_c.Title, t0_c.Status, t0_c.creationDate FROM content t0_c
 WHERE (t0_c.Keyword = ?)

 2008-04-23 10:31:15,789 DEBUG
 [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadRelationCommand.Content] load
 relation SQL: SELECT content.StoreId, store.Name, store.Status,
 store.mobileNumber, store.freeRequestCount FROM content content, store store
 WHERE (content.StoreId=store.StoreId) AND ((content.ContentId=?))

 2008-04-23 10:31:15,799 DEBUG
 [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.Media#findByContent]
 Executing SQL: SELECT DISTINCT t0_m.MediaId, t0_m.fileSize, t0_m.fileName,
 t0_m.Height, t0_m.Width FROM media t0_m, content t1_m_content WHERE
 ((t1_m_content.ContentId=?) AND t0_m.ContentId=t1_m_content.ContentId)

 2008-04-23 10:31:15,809 DEBUG
 [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.Store#findStore] Executing
 SQL: SELECT DISTINCT t0_s.StoreId FROM store t0_s WHERE (t0_s.StoreId = ?)

 2008-04-23 10:31:15,819 DEBUG
 [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.Setting#findSetting]
 Executing SQL: SELECT t0_s.SettingId, t0_s.SmsServerPassword,
 t0_s.SmsServer, t0_s.SmsUrl, t0_s.SmsLogin, t0_s.SmsPassword,
 t0_s.SmsKeyword, t0_s.SmsShortcode, t0_s.SmsService, t0_s.wapGatewayUrl,
 t0_s.freeDownload, t0_s.mTCost, t0_s.operatorPercentage, t0_s.iPXPercentage
 FROM setting t0_s

 2008-04-23 10:31:16,450 DEBUG [httpclient.wire.header]  POST
 /api/services2/SmsUtilApiService HTTP/1.1[\r][\n]

 2008-04-23 10:31:16,490 DEBUG [httpclient.wire.header]  SOAPAction:
 tns:#sendWapPushSm[\r][\n]

 2008-04-23 10:31:16,490 DEBUG [httpclient.wire.header]  User-Agent:
 Axis2[\r][\n]

 2008-04-23 10:31:16,490 DEBUG [httpclient.wire.header]  Host:
 asia.ipx.com[\r][\n]

 2008-04-23 10:31:16,490 DEBUG [httpclient.wire.header] 
 Transfer-Encoding: chunked[\r][\n]

 2008-04-23 10:31:16,490 DEBUG [httpclient.wire.header]  Content-Type:
 text/xml; charset=UTF-8[\r][\n]

 2008-04-23 10:31:16,490 DEBUG [httpclient.wire.header]  [\r][\n]

 2008-04-23 10:31:16,610 DEBUG [httpclient.wire.content]  37d[\r][\n]

 2008-04-23 10:31:16,610 DEBUG 

RE: AXIS2-3239, 3443

2008-11-18 Thread Eric Decosta
I'm interested in a fix as well; it seems that part of the issue is that 
AxisFault.makeFault() doesn't fill-in the Detail element of the Fault.

Following this example: : 
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/FaultThrowingService.java?view=markup

You can generate just about anything you want for a Fault, but I'd expect that 
if I specified something in the soap:fault for the service that Axis2 handle 
things automatically.

I'm just making some guesses here as I haven't spent much time rummaging around 
in the Axis2 code base.

-Eric

From: Manuel Darveau [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2008 4:21 PM
To: axis-user@ws.apache.org
Subject: AXIS2-3239, 3443

Hi all,

I known this is a tough question (and most probably better suited for axis-dev) 
but do you have any idea when bug 3239 (and eventually 3443) will be fixed.
Do you have a target?

In short, the bug is about custom exception handling in the code first 
approach. When you develop a service that throws custom exception(s), the WSDL 
is correctly created including the custom faults but the resulting 
implementation always convert custom exceptions into AxisFault.
This make it difficult/impossible for clients to catch custom/specific 
exception.

This is not a show stopper but definitely an annoyance for me. I know you will 
say: it's open source, you can propose a patch but I would like to know if a 
fix is already in progress.
Do you have any pointer for me on where to look for a fix?

Thank you!

Manuel


Re: AXIS2-3239, 3443

2008-11-18 Thread Manuel Darveau
Hi,

I digged in the code and I think the fix should be around
org.apache.axis2.util.MessageContextBuilder:614 or directly on
AxisFault.makeFault().
I have a workaround that consist of injecting the detail on the generated
AxisFault.
For example, if my operation's wsdl is:
...
xs:schema attributeFormDefault=qualified elementFormDefault=unqualified
targetNamespace=http://ws.ACME.com;
  xs:complexType name=Exception
xs:sequence
  xs:element minOccurs=0 name=Exception nillable=true
type=xs:anyType/
/xs:sequence
  /xs:complexType
  xs:element name=UnauthorizedAccessException
xs:complexType
  xs:sequence
xs:element minOccurs=0 name=UnauthorizedAccessException
nillable=true type=ax21:UnauthorizedAccessException/
  /xs:sequence
/xs:complexType
  /xs:element
/xs:schema
...
wsdl:operation name=getSomething
wsdl:input message=ns:getSomethingRequest
wsaw:Action=urn:getSomething/
wsdl:output message=ns:getSomethingResponse
wsaw:Action=urn:getSomethingResponse/
wsdl:fault message=ns:UnauthorizedAccessException
name=UnauthorizedAccessException
wsaw:Action=urn:getSomethingUnauthorizedAccessException/
/wsdl:operation
...

I can do in my service:
AxisFault af = AxisFault.makeFault(new
UnauthorizedAccessException());
af.setDetail(new OMElementImpl(UnauthorizedAccessException, new
OMNamespaceImpl(http://ws.ACME.com;, whatever_alias), new
OMDOMFactory()));
throw af;

Note that I can't write a generic exception handler that will trap any
exception and inject the details since I don't know how to determine the
namespace used when defining the exception in the WSDL.
I *think* it will always be the service namespace but I am not sure. Also, I
don't this the new OMDOMFactory() part is really clean...

Any other solution?

Manuel

On Tue, Nov 18, 2008 at 9:44 AM, Eric Decosta [EMAIL PROTECTED]wrote:

  I'm interested in a fix as well; it seems that part of the issue is that
 AxisFault.makeFault() doesn't fill-in the Detail element of the Fault.



 Following this example: :
 http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/FaultThrowingService.java?view=markup



 You can generate just about anything you want for a Fault, but I'd expect
 that if I specified something in the soap:fault for the service that Axis2
 handle things automatically.



 I'm just making some guesses here as I haven't spent much time rummaging
 around in the Axis2 code base.



 -Eric



 *From:* Manuel Darveau [mailto:[EMAIL PROTECTED]
 *Sent:* Monday, November 17, 2008 4:21 PM
 *To:* axis-user@ws.apache.org
 *Subject:* AXIS2-3239, 3443



 Hi all,

 I known this is a tough question (and most probably better suited for
 axis-dev) but do you have any idea when bug 3239 (and eventually 3443) will
 be fixed.
 Do you have a target?

 In short, the bug is about custom exception handling in the code first
 approach. When you develop a service that throws custom exception(s), the
 WSDL is correctly created including the custom faults but the resulting
 implementation always convert custom exceptions into AxisFault.
 This make it difficult/impossible for clients to catch custom/specific
 exception.

 This is not a show stopper but definitely an annoyance for me. I know you
 will say: it's open source, you can propose a patch but I would like to
 know if a fix is already in progress.
 Do you have any pointer for me on where to look for a fix?

 Thank you!

 Manuel



Re: Requested factory com.ctc.wstx.stax.WstxOutputFactory cannot be located exception

2008-11-18 Thread frelli

Anybody has a clue on this?

frelli wrote:
I'm using Axis 1.4.1 and when use a stub with success apart than in 
one place.


When i invoke the WSDL (again, only in one method, the others are just 
fine) I get the following Axis fault


org.apache.axis2.AxisFault: Requested factory 
com.ctc.wstx.stax.WstxOutputFactory cannot be located.  Classloader 
[EMAIL PROTECTED]


The class is correctly in the classpath, and I have no idea where I 
should look into to trouble shoot the problem.


The complete stack is:


BDTransport: ..  Classloader [EMAIL PROTECTED]
2008-11-16 17:11:26.125 INFO  [8240] - org.apache.axis2.AxisFault: 
Requested factory com.ctc.wstx.stax.WstxOutputFactory cannot be 
located.  Classloader [EMAIL PROTECTED]

   at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
   at 
org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:96) 

   at 
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499) 

   at 
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114) 

   at 
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096) 

   at 
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398) 

   at 
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) 

   at 
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) 

   at 
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346) 

   at 
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542) 

   at 
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189) 

   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)




Anybody can help on this?


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



Something like RawXMLOUTOnlyMessageReceiver?

2008-11-18 Thread John.Tyler
Hello, I'm creating an AXIOM-based service using Axis2 v1.4.1 and have
two methods with signatures that don't seem to map to any of the
available Raw*MessageReceivers:
public OMElement getBalance()
public void update()

How can I define these in my services.xml?  I only see options for
RawXMLInOnly (which expects an input argument), RawXMLINOutAsync (which
expects an input argument and return type), and RawXMLINOut (ditto), and
reading through the javadocs it appears that the method signature helps
Axis figure out which service method to invoke for each defined
operation.

Any suggestions?

John Tyler
Commodities IT Developer
Houston, TX
+1 713 331 8313 (19581 8313)

Visit our website at http://www.ubs.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mails are not encrypted and cannot be guaranteed to be secure or 
error-free as information could be intercepted, corrupted, lost, 
destroyed, arrive late or incomplete, or contain viruses.  The sender 
therefore does not accept liability for any errors or omissions in the 
contents of this message which arise as a result of e-mail transmission.  
If verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities 
or related financial instruments.

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

RE: AXIS2-3239, 3443

2008-11-18 Thread Eric Decosta
I went a different route and tried doing things top-down from the WSDL (see 
attached) and things worked as expected:

Request:
soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; 
xmlns:test=http://test.webservices.bat.mathworks.com;
   soapenv:Header/
   soapenv:Body
  test:getEmployeeIdRequest
 test:fullnameBogus/test:fullname
  /test:getEmployeeIdRequest
   /soapenv:Body
/soapenv:Envelope

Returned Fault:
soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
   soapenv:Body
  soapenv:Fault
 faultcodesoapenv:Server/faultcode
 faultstringEmployeeNotFoundException/faultstring
 detail
ns2:EmployeeNotFoundFault 
xmlns:ns2=http://test.webservices.bat.mathworks.com;
   ns2:severityCataclysmic/ns2:severity
   ns2:retryablefalse/ns2:retryable
/ns2:EmployeeNotFoundFault
 /detail
  /soapenv:Fault
   /soapenv:Body
/soapenv:Envelope

Whatever name you give the message becomes the type of exception that the 
service method throws; whatever element that message refers to is the type that 
eventually appears in the details.

More reasons to stick to the top-down approach.

If the attachments don't get through, let me know and I'll in-line them.

-Eric

From: Manuel Darveau [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 18, 2008 10:10 AM
To: axis-user@ws.apache.org
Subject: Re: AXIS2-3239, 3443

Hi,

I digged in the code and I think the fix should be around 
org.apache.axis2.util.MessageContextBuilder:614 or directly on 
AxisFault.makeFault().
I have a workaround that consist of injecting the detail on the generated 
AxisFault.
For example, if my operation's wsdl is:
...
xs:schema attributeFormDefault=qualified elementFormDefault=unqualified 
targetNamespace=http://ws.ACME.com;
  xs:complexType name=Exception
xs:sequence
  xs:element minOccurs=0 name=Exception nillable=true 
type=xs:anyType/
/xs:sequence
  /xs:complexType
  xs:element name=UnauthorizedAccessException
xs:complexType
  xs:sequence
xs:element minOccurs=0 name=UnauthorizedAccessException 
nillable=true type=ax21:UnauthorizedAccessException/
  /xs:sequence
/xs:complexType
  /xs:element
/xs:schema
...
wsdl:operation name=getSomething
wsdl:input message=ns:getSomethingRequest wsaw:Action=urn:getSomething/
wsdl:output message=ns:getSomethingResponse 
wsaw:Action=urn:getSomethingResponse/
wsdl:fault message=ns:UnauthorizedAccessException 
name=UnauthorizedAccessException 
wsaw:Action=urn:getSomethingUnauthorizedAccessException/
/wsdl:operation
...

I can do in my service:
AxisFault af = AxisFault.makeFault(new UnauthorizedAccessException());
af.setDetail(new OMElementImpl(UnauthorizedAccessException, new 
OMNamespaceImpl(http://ws.ACME.com;, whatever_alias), new OMDOMFactory()));
throw af;

Note that I can't write a generic exception handler that will trap any 
exception and inject the details since I don't know how to determine the 
namespace used when defining the exception in the WSDL.
I *think* it will always be the service namespace but I am not sure. Also, I 
don't this the new OMDOMFactory() part is really clean...

Any other solution?

Manuel
On Tue, Nov 18, 2008 at 9:44 AM, Eric Decosta [EMAIL PROTECTED]mailto:[EMAIL 
PROTECTED] wrote:

I'm interested in a fix as well; it seems that part of the issue is that 
AxisFault.makeFault() doesn't fill-in the Detail element of the Fault.



Following this example: : 
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/FaultThrowingService.java?view=markup



You can generate just about anything you want for a Fault, but I'd expect that 
if I specified something in the soap:fault for the service that Axis2 handle 
things automatically.



I'm just making some guesses here as I haven't spent much time rummaging around 
in the Axis2 code base.



-Eric



From: Manuel Darveau [mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED]]
Sent: Monday, November 17, 2008 4:21 PM
To: axis-user@ws.apache.orgmailto:axis-user@ws.apache.org
Subject: AXIS2-3239, 3443



Hi all,

I known this is a tough question (and most probably better suited for axis-dev) 
but do you have any idea when bug 3239 (and eventually 3443) will be fixed.
Do you have a target?

In short, the bug is about custom exception handling in the code first 
approach. When you develop a service that throws custom exception(s), the WSDL 
is correctly created including the custom faults but the resulting 
implementation always convert custom exceptions into AxisFault.
This make it difficult/impossible for clients to catch custom/specific 
exception.

This is not a show stopper but definitely an annoyance for me. I know you will 
say: it's open source, you can propose a patch but I would like to know if a 
fix is already in progress.
Do you have any pointer for me on where to look for a fix?

Thank you!


Re: java.security.AccessControlException: access denied (java.io.FilePermission ..../WEB-INF/scriptServices read)

2008-11-18 Thread Ramesh Vishwanatham
Hi Amila

Thanks a lot, by adding loadLibrary permission and others I am able to 
make AxisServlet initialization successful with my services loaded.
I had one problem which I could not find a solution, below is the error 
trace:

SECJ0314W: Current Java 2 Security policy reported a potential violation 
of Java 2 Security 
Permission. Please refer to Problem Determination Guide for 
further information.

Permission:

  /xyz.ear/xyz.war/WEB-INF/scriptServices : access denied 
(java.io.FilePermission 
/xyz.ear/xyz.war/WEB-INF/scriptServices read)


Code:

 org.apache.axis2.scripting.ScriptRepositoryListener  in  {file:
 
/temp/HOSTNAME_Node01/APPNAME/xyz/xyz.war/axis251939axis2-scripting-1.3.mar}



Stack Trace:

java.security.AccessControlException: access denied 
(java.io.FilePermission 
/xyz.ear/xyz.war/WEB-INF/scriptServices read)


In order to over come this problem I have removed axis2-scripting-1.3.mar 
from modules folder. What does this module do and impact of it not being 
there. 

Regards,
Ramesh 





Amila Suriarachchi [EMAIL PROTECTED] 
11/15/2008 09:22 AM
Please respond to
axis-user@ws.apache.org


To
axis-user@ws.apache.org
cc

Subject
Re: java.security.AccessControlException: access denied 
(java.io.FilePermission /WEB-INF/scriptServices read)






hi,

ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());

this line has something like above. you may need to give native method 
access permission.

thanks,
Amila.

On Fri, Nov 14, 2008 at 9:41 PM, Ramesh Vishwanatham 
[EMAIL PROTECTED] wrote:

Hi Amila 
After fixing all the policy related exceptions, now I am getting below 
exception any idea what could be the reason. 


ServletWrappe E   SRVE0100E: Did not realize  init() exception thrown by 
servlet AxisServlet: java.lang.ExceptionInInitializerError 
at org.apache.axis2.util.XMLUtils.toOM(XMLUtils.java:564) 
at 
org.apache.axis2.deployment.DescriptionBuilder.buildOM(DescriptionBuilder.java:96)
 

at 
org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:79)
 

at 
org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:615)
 

at 
org.apache.axis2.deployment.WarBasedAxisConfigurator.init(WarBasedAxisConfigurator.java:146)
 

at 
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:500)
 

at 
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:420) 

Thanks 
Ramesh 



Amila Suriarachchi [EMAIL PROTECTED] 
11/14/2008 12:48 AM


Please respond to
axis-user@ws.apache.org


To
axis-user@ws.apache.org 
cc

Subject
Re: java.security.AccessControlException: access denied 
(java.io.FilePermission /WEB-INF/scriptServices read)








Try to give filePermission to all the file and see first. Then try to
narrow down to the level you want.

thanks,
Amila.

On 11/13/08, Ramesh Vishwanatham [EMAIL PROTECTED] wrote:
 Hi Amila
 Thanks for replying my question, I have added following in policy file:

 grant codeBase file:/xyz/xyz.war/- {
 permission java.io.FilePermission
 /xyz.ear/xyz.war/WEB-INF/scriptServices, read;
 };


 and still getting below error:


 SecurityManag W   SECJ0314W: Current Java 2 Security policy reported a
 potential violation
 of Java 2 Security Permission. Please refer to Problem
 Determination Guide for further
 information.

 Permission:
 ./xyz.ear/xyz.war/WEB-INF/scriptServices : access denied
 (java.io.FilePermission
 ./xyz.ear/xyz.war/WEB-INF/scriptServices read)


 Code:
 org.apache.axis2.scripting.ScriptRepositoryListener  in
 {file:/xyz/xyz.war/axis247136axis2-scripting-1.3.mar}




 Stack Trace:

 java.security.AccessControlException: access denied
 (java.io.FilePermission
 ./xyz.ear/xyz.war/WEB-INF/scriptServices read)
 at
 
java.security.AccessControlContext.checkPermission(AccessControlContext.java(Compiled
 Code))


 please let me know what coule be the problem.

 Regards,
 Ramesh





 Amila Suriarachchi [EMAIL PROTECTED]
 11/13/2008 05:28 AM
 Please respond to
 axis-user@ws.apache.org


 To
 axis-user@ws.apache.org
 cc

 Subject
 Re: java.security.AccessControlException: access denied
 (java.io.FilePermission /WEB-INF/scriptServices read)








 On Wed, Nov 12, 2008 at 3:24 AM, Ramesh Vishwanatham 
 [EMAIL PROTECTED] wrote:

 All
 I have a built simple web service and trying to deploy axis2 1.3 version
 in WAS6.0 environment running Java 1.4.2 under security manager and
 getting following exception:

 Stack Trace:

 java.security.AccessControlException: access denied
 (java.io.FilePermission /WEB-INF/scriptServices read)


 Looks like this problem was reported earlier and may be got fixed in 
later
 releases.

 Resolved: (AXIS2-3816) AccessControlException when running with
 Java2Security

 And also I find out 

Re: AXIS2-3239, 3443

2008-11-18 Thread Manuel Darveau
Thanks Eric.

I check the code generated usin wsdl2java -ss -uri TestService.wsdl.
The catch(EmployeeNotFoundException) in
TestServiceMessageReceiverInOut.invokeBusinessLogic does the job of
injecting the detail in the axis fault.
This is done in a somewhat complicated way and it depends on generated
constants in EmployeeNotFoundException.

When you use the bottom up approach, the Exception (in this case
EmployeeNotFoundException) will not be filled with axis stuff so it is not
that easy to convert it back to XML.
I guess I will have to did again in axis code to see how an Object is
converted into XML and simply convert my exception and put the result (which
should be a OMElement) in the detail of the AxisFault.

Any axis dev has advice on how to convert my exception into a OMElement?

Manuel

On Tue, Nov 18, 2008 at 11:33 AM, Eric Decosta
[EMAIL PROTECTED]wrote:

  I went a different route and tried doing things top-down from the WSDL
 (see attached) and things worked as expected:



 Request:

 soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
 xmlns:test=http://test.webservices.bat.mathworks.com;

soapenv:Header/

soapenv:Body

   test:getEmployeeIdRequest

  test:fullnameBogus/test:fullname

   /test:getEmployeeIdRequest

/soapenv:Body

 /soapenv:Envelope



 Returned Fault:

 soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/
 

soapenv:Body

   soapenv:Fault

  faultcodesoapenv:Server/faultcode

  faultstringEmployeeNotFoundException/faultstring

  detail

 ns2:EmployeeNotFoundFault xmlns:ns2=
 http://test.webservices.bat.mathworks.com;

ns2:severityCataclysmic/ns2:severity

ns2:retryablefalse/ns2:retryable

 /ns2:EmployeeNotFoundFault

  /detail

   /soapenv:Fault

/soapenv:Body

 /soapenv:Envelope



 Whatever name you give the message becomes the type of exception that the
 service method throws; whatever element that message refers to is the type
 that eventually appears in the details.



 More reasons to stick to the top-down approach.



 If the attachments don't get through, let me know and I'll in-line them.



 -Eric



 *From:* Manuel Darveau [mailto:[EMAIL PROTECTED]
 *Sent:* Tuesday, November 18, 2008 10:10 AM
 *To:* axis-user@ws.apache.org
 *Subject:* Re: AXIS2-3239, 3443



 Hi,

 I digged in the code and I think the fix should be around
 org.apache.axis2.util.MessageContextBuilder:614 or directly on
 AxisFault.makeFault().
 I have a workaround that consist of injecting the detail on the generated
 AxisFault.
 For example, if my operation's wsdl is:
 ...
 xs:schema attributeFormDefault=qualified
 elementFormDefault=unqualified targetNamespace=http://ws.ACME.com;
   xs:complexType name=Exception
 xs:sequence
   xs:element minOccurs=0 name=Exception nillable=true
 type=xs:anyType/
 /xs:sequence
   /xs:complexType
   xs:element name=UnauthorizedAccessException
 xs:complexType
   xs:sequence
 xs:element minOccurs=0 name=UnauthorizedAccessException
 nillable=true type=ax21:UnauthorizedAccessException/
   /xs:sequence
 /xs:complexType
   /xs:element
 /xs:schema
 ...
 wsdl:operation name=getSomething
 wsdl:input message=ns:getSomethingRequest
 wsaw:Action=urn:getSomething/
 wsdl:output message=ns:getSomethingResponse
 wsaw:Action=urn:getSomethingResponse/
 wsdl:fault message=ns:UnauthorizedAccessException
 name=UnauthorizedAccessException
 wsaw:Action=urn:getSomethingUnauthorizedAccessException/
 /wsdl:operation
 ...

 I can do in my service:
 AxisFault af = AxisFault.makeFault(new
 UnauthorizedAccessException());
 af.setDetail(new OMElementImpl(UnauthorizedAccessException, new
 OMNamespaceImpl(http://ws.ACME.com;, whatever_alias), new
 OMDOMFactory()));
 throw af;

 Note that I can't write a generic exception handler that will trap any
 exception and inject the details since I don't know how to determine the
 namespace used when defining the exception in the WSDL.
 I *think* it will always be the service namespace but I am not sure. Also,
 I don't this the new OMDOMFactory() part is really clean...

 Any other solution?

 Manuel

 On Tue, Nov 18, 2008 at 9:44 AM, Eric Decosta [EMAIL PROTECTED]
 wrote:

 I'm interested in a fix as well; it seems that part of the issue is that
 AxisFault.makeFault() doesn't fill-in the Detail element of the Fault.



 Following this example: :
 http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/FaultThrowingService.java?view=markup



 You can generate just about anything you want for a Fault, but I'd expect
 that if I specified something in the soap:fault for the service that Axis2
 handle things automatically.



 I'm just making some guesses here as I haven't spent much time rummaging
 around in the Axis2 code base.



 -Eric



 *From:* Manuel Darveau 

RE: AXIS2-3239, 3443

2008-11-18 Thread Eric Decosta
Yes, Axis2 injects the detail into the AxisFault there, but I had to add that 
detail via setFaultMessage() in TestServiceSkeleton before throwing the fault.

Skeleton:
EmployeeNotFoundException e =
new EmployeeNotFoundException(Could not find employee:  +
getEmployeeIdRequest.getFullname());
EmployeeNotFoundFault msg = new EmployeeNotFoundFault();
msg.setRetryable(false);
msg.setSeverity(Fatal);
e.setFaultMessage(msg);
throw e;

MessageReceiver
} catch (EmployeeNotFoundException e) {
  msgContext.setProperty(org.apache.axis2.Constants.FAULT_NAME,
  EmployeeNotFoundFault);
  org.apache.axis2.AxisFault f = createAxisFault(e);
  if (e.getFaultMessage() != null) {
f.setDetail(toOM(e.getFaultMessage(), false));
  }
  throw f;
}

private org.apache.axis2.AxisFault createAxisFault(java.lang.Exception e) {
  org.apache.axis2.AxisFault f;
  Throwable cause = e.getCause();
  if (cause != null) {
f = new org.apache.axis2.AxisFault(e.getMessage(), cause);
  } else {
f = new org.apache.axis2.AxisFault(e.getMessage());
  }
return f;
}

private org.apache.axiom.om.OMElement toOM(
com.mathworks.bat.webservices.test.EmployeeNotFoundFault param,
boolean optimizeContent) throws org.apache.axis2.AxisFault {

  try {
return param
.getOMElement(
com.mathworks.bat.webservices.test.EmployeeNotFoundFault.MY_QNAME,
org.apache.axiom.om.OMAbstractFactory
.getOMFactory());
  } catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
  }

}

EmployeeNotFoundFault.getOMElement() which is where things get set up for an 
eventual call to serialize().  serialize() is where all the nitty-gritty 
happens.

-Eric

From: Manuel Darveau [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 18, 2008 12:31 PM
To: axis-user@ws.apache.org
Subject: Re: AXIS2-3239, 3443

Thanks Eric.

I check the code generated usin wsdl2java -ss -uri TestService.wsdl.
The catch(EmployeeNotFoundException) in 
TestServiceMessageReceiverInOut.invokeBusinessLogic does the job of injecting 
the detail in the axis fault.
This is done in a somewhat complicated way and it depends on generated 
constants in EmployeeNotFoundException.

When you use the bottom up approach, the Exception (in this case 
EmployeeNotFoundException) will not be filled with axis stuff so it is not that 
easy to convert it back to XML.
I guess I will have to did again in axis code to see how an Object is converted 
into XML and simply convert my exception and put the result (which should be a 
OMElement) in the detail of the AxisFault.

Any axis dev has advice on how to convert my exception into a OMElement?

Manuel
On Tue, Nov 18, 2008 at 11:33 AM, Eric Decosta [EMAIL PROTECTED]mailto:[EMAIL 
PROTECTED] wrote:

I went a different route and tried doing things top-down from the WSDL (see 
attached) and things worked as expected:



Request:

soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; 
xmlns:test=http://test.webservices.bat.mathworks.com;

   soapenv:Header/

   soapenv:Body

  test:getEmployeeIdRequest

 test:fullnameBogus/test:fullname

  /test:getEmployeeIdRequest

   /soapenv:Body

/soapenv:Envelope



Returned Fault:

soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;

   soapenv:Body

  soapenv:Fault

 faultcodesoapenv:Server/faultcode

 faultstringEmployeeNotFoundException/faultstring

 detail

ns2:EmployeeNotFoundFault 
xmlns:ns2=http://test.webservices.bat.mathworks.com;

   ns2:severityCataclysmic/ns2:severity

   ns2:retryablefalse/ns2:retryable

/ns2:EmployeeNotFoundFault

 /detail

  /soapenv:Fault

   /soapenv:Body

/soapenv:Envelope



Whatever name you give the message becomes the type of exception that the 
service method throws; whatever element that message refers to is the type that 
eventually appears in the details.



More reasons to stick to the top-down approach.



If the attachments don't get through, let me know and I'll in-line them.



-Eric



From: Manuel Darveau [mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 18, 2008 10:10 AM

To: axis-user@ws.apache.orgmailto:axis-user@ws.apache.org
Subject: Re: AXIS2-3239, 3443



Hi,

I digged in the code and I think the fix should be around 
org.apache.axis2.util.MessageContextBuilder:614 or directly on 
AxisFault.makeFault().
I have a workaround that consist of injecting the detail on the generated 
AxisFault.
For example, if my operation's wsdl is:
...
xs:schema attributeFormDefault=qualified elementFormDefault=unqualified 
targetNamespace=http://ws.ACME.com;
  xs:complexType name=Exception

Re: More questions about maven and axis2

2008-11-18 Thread CheffPJ

Hello.  I very much appreciate this posting as I was having the same issue
with axsi2 generated xmlbeans resources not being included in the packaging.

This looks to be a bug.  Can an axis2 developer confirm please and I'll file
a bug report?

Thanks,
Pat McDonough



David Ojeda-2 wrote:
 
 Hello all,
 
 I have some questions about using maven and axis2. I am using maven 2.0.9, 
 axis2 1.4.1, axis2-wsdl2code-maven-plugin 1.4.1.
 
 Here is my situation:
 Right now I just want to have a project that generates the client stub for
 a 
 webservice. I need to use xmlbeans over other databindings.
 
 I set up a pom to do this:
 
 project xmlns=http://maven.apache.org/POM/4.0.0; 
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
 http://maven.apache.org/maven-v4_0_0.xsd;
   modelVersion4.0.0/modelVersion
   groupIdmypackage.ws.client/groupId
   artifactIdwsclients/artifactId
   packagingjar/packaging
   version1.0.0-SNAPSHOT/version
   namewsclients/name
   urlhttp://maven.apache.org/url
   build
   resources
   resource
   
 directorytarget/generated-sources/axis2/wsdl2code/resources/directory
   /resource
   /resources
   plugins
   plugin
   groupIdorg.apache.axis2/groupId
   
 artifactIdaxis2-wsdl2code-maven-plugin/artifactId
   version1.4.1/version
   executions
   execution
   goals
   goalwsdl2code/goal
   /goals
   /execution
   /executions
   configuration
   packageNamemypackage.x1/packageName
   
 wsdlFilesrc/main/wsdl/WSClientOperations.wsdl/wsdlFile
   
 databindingNamexmlbeans/databindingName
   /configuration
   /plugin
   /plugins
   /build
   dependencies
   dependency
   groupIdjunit/groupId
   artifactIdjunit/artifactId
   version3.8.1/version
   scopetest/scope
   /dependency
   dependency
   groupIdorg.apache.axis2/groupId
   artifactIdaxis2/artifactId
   version1.4.1/version
   /dependency
   dependency
   groupIdorg.apache.axis2/groupId
   artifactIdaxis2-xmlbeans/artifactId
   version1.4.1/version
   /dependency
   /dependencies
 /project
 
 The first problem I encountered was that I had to explicitly declare the 
 axis2-xmlbeans dependecy. No big deal there.
 Then, I was having the TypeHolder class problem that xmlbeans usually has
 when 
 the schemaorg_apache_xmlbeans directory is not in the classpath. That's
 why I 
 had to add to the pom a resource in the build section. It seems like the 
 plugin doesn't work as it should, because I believe this step should not
 be 
 necessary.
 
 Now I want to add another wsdl so another stub is generated. I plan to
 have 
 10-20 wsdl in this project so all stubs are generated here. 
 
 My first question is: how do I add another wsdl? I checked 
 http://ws.apache.org/axis2/tools/1_4_1/maven-plugins/maven-wsdl2code-
 plugin.html
 and there is no documentation for this scenario.
 
 Second question: I would rather generate xmlbeans classes separately and
 tell 
 wsdl2code to only generate stubs with the -Ewdc option. Is this possible
 with 
 the axis2-wsdl2code-maven-plugin ? Again, the documentation doesn't say 
 anything about this feature.
 
 Third question: axis2 and maven users: how do you structure your projects
 with 
 maven? I am really interested specially if my first and second questions
 are 
 no and no. Do you use a module for each webservice client and webservice 
 implementation?
 I was hoping to have a module for all webservices client and another one
 for 
 the server implementations (although one module per ws implementation
 works 
 for me too).
 
 Thanks for you attention
 
 -- 
 David Ojeda
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/More-questions-about-maven-and-axis2-tp20325210p20566200.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: [WSDL2Java] How to use an XSD contained in a JAR

2008-11-18 Thread stlecho

The wsdl4j project does not have a mailing list :o(, so I would be pleased if
someone could clarify if wsdl4j supports this feature.

PS: Amila, could it be that your post has been modified: Please have a look
at ... ?

Amila Suriarachchi wrote:
 
 On Tue, Nov 18, 2008 at 4:19 PM, stlecho [EMAIL PROTECTED] wrote:
 

 Hi,

 I would like to import an XSD that is contained in a JAR. Is this
 possible
 with WSDL2Java ?
 
  I think no. This depends on whether wsdl4j supports this feature or not.
 Please have a look at :)
 
 thanks,
 Amila.
 


 Regards, Stefan Lecho.
 --
 View this message in context:
 http://www.nabble.com/-WSDL2Java--How-to-use-an-XSD-contained-in-a-JAR-tp20557265p20557265.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.
 blog: http://amilachinthaka.blogspot.com/
 
 

-- 
View this message in context: 
http://www.nabble.com/-WSDL2Java--How-to-use-an-XSD-contained-in-a-JAR-tp20557265p20568481.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: Soap Request Problem Re: Http Error: could not Post file on server

2008-11-18 Thread changxing
Yes it's a problem of altova xmlspy.  I tried in flex3 to access the 
webservice. No timeout issue.


Thanks

Chang Xing.




Amila Suriarachchi wrote:



On Mon, Nov 17, 2008 at 9:34 AM, changxing [EMAIL PROTECTED] wrote:

Hi Amila,

Thanks for the reply.

First now I'm sure this has nothing to do with database.
I used a simple webservice(StockQuoteService which comes with
axis2) to do more testing, which doesn't access database.
In the getPrice(), I delayed 40 seconds.
If I request the service in IE, I get the result after 40 seconds.
But if I request the service in altova xmlspy(first create a soap
request then send the soap request), I get the same error message
as below:
Http Error: Could not Post file.

I think the problem is there with  xmlspy timeout value.



This seems that soap request has a timeout value different from
http request's.  Does axis2 treat soap request different from http
request?

No. Actually this handles by the tomcat. Soap message comes also as an 
http request to the Tomcat server.
Axis2 is also another servlet. So it get this http reqeust process it 
and sends an http response.


thanks,
Amila.


and is there a soap request timeout value in axis2?  confusing...

thanks,

Chang Xing.


Amila Suriarachchi wrote:



On Fri, Nov 14, 2008 at 1:49 PM, changxing
[EMAIL PROTECTED] wrote:

   Hi Axis2 User Group,

   My Axis2 webservice is deployed in Tomcat, this webservice will
   access oracle to get information.
   According to the parameter passed in, the query can be long or
   short. For shorter one, this webservice
   works ok, but if it takes long time(more than 30 seconds),
then I
   get this error:
   Http Error: Could not Post file '/axis2/services/Myservice' on
   server '10.18.12.3 http://10.18.12.3 http://10.18.12.3'(0)
   then xmlspy gets a error message: Error sending the soap data.

   I have set the requesttime out value to 20 miliseconds in
   axis2.xml, as well as the connectionTimeout value in tomcat.

I think here the problem is with the tomcat. Try to write a
servlet and delay it more than 30s and see whether the same
thing happen or not.

thanks,
Amila.


   But these don't help to solve the problem.
   Ever time, it will timeout after 30 seconds.

   Does anybody can help with this problem?

   Thanks very much!


   Chang Xing.





 
 -

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




-- 
Amila Suriarachchi

WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/



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




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



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



Re: REST Service with AXIS

2008-11-18 Thread kat kat
On Tue, Nov 18, 2008 at 4:38 AM, keith chapman [EMAIL PROTECTED]wrote:

 Hi Manish,

 I am the one who wrote that article, the original was published at
 http://wso2.org/library/3726. Nice to hear that you found it usefull. I
 have answered your questions inline,



Yeah, I knew you would be on this list thats why I posted. Thanks much for
the input, I will try that out.


I have actually followed Keith Chapman's article on webmonkey, which is
 here:

 http://www.webmonkey.com/tutorial/RESTful_Web_Services_with_Apache_Axis2

 If I go with instrumenting REST using WSDL 2.0 , then my basic question
 referring to the above article is how can we actually make a POST (add new
 student) on /services/studentService/students or rather POST any basic or
 Complex Type. From the wsdl, addStudent(Student student) is the service
 method that will get called and it needs an argument which should be an
 object of class Student.
 In truly RESTful way, this should be a form POST and the data is url
 encoded or rather sent in application/x-www-form-urlencoded content type. If
 I have to say use this service with REST client in Python, I will have to
 know about the Student object ,is it? I am missing something here, can you
 explain?

 This actually depends on your your request message is defined. In the
 example I've provided I have used a POJO as the input to the service method,
 and when a POJO is used the default schema generated by Axis2 is as follows,

 xs:element name=addStudent
 xs:complexType
 xs:sequence

 xs:element minOccurs=0 name=student 
 nillable=true type=ax21:Student/
 /xs:sequence
 /xs:complexType

 /xs:element
 xs:complexType name=Student
 xs:sequence
 xs:element minOccurs=0 name=age type=xs:int/

 xs:element minOccurs=0 name=name nillable=true 
 type=xs:string/
 xs:element maxOccurs=unbounded minOccurs=0 
 name=subjects nillable=true type=xs:string/

 /xs:sequence
 /xs:complexType
 /xs:element

 With a schema like this you cannot use the contentType
 application/x-www-form-urlencoded (cause the server would not have enough
 information to reconstruct the message).



Sure. Then if we have to use POJO style input to the service method, how can
we make a POST in any content type? The reason I want to know is I know we
can have simple data type POST's on a service method as you show below, but
if a method needs to have 15 arguments as input, then it makes sense to
actually send a structure with arguments as key/value pairs or something
like that to a service method or in this case we have to use OMElement as
argument to the service method?

Thanks again...



 If you want to use application/x-www-form-

 urlencoded then you could do this by modifying your service method as
 follows. addStudent(Sring name, int age, String [] subjects) . This would
 generate a schema similar to,

 xs:element name=addStudent

 xs:complexType
 xs:sequence
 xs:element minOccurs=0 name=age type=xs:int/

 xs:element minOccurs=0 name=name nillable=true 
 type=xs:string/
 xs:element maxOccurs=unbounded minOccurs=0 
 name=subjects nillable=true type=xs:string/

 /xs:sequence
 /xs:complexType
 /xs:element

 This makes it possible to do what you are trying.

 Please have a look at
 http://www.keith-chapman.org/2008/09/restfull-mashup-with-wsdl-20-wso2.htmlas 
 well. There I have shown how you could play around with the WSO2 Mashup
 Server [1] (It runs on top of Axis2 and allows you to write service using
 JavaScript with ease) and experiment with stuff. You could use that to write
 services and validate your ideas in a flash. Hope this helps.

 Thanks,
 Keith.

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

 On the other hand I could do POST, may not be ComplexType but of simple
 type if  I have my service class returning an AXIOM OMElement object as well
 as taking OMElement object as an argument to the action methods but WSDL 2.0
 way seems cleaner to me.

 Appreciate your feedback

 Thanks
 Manish

 On Mon, Nov 17, 2008 at 10:11 PM, kat kat [EMAIL PROTECTED] wrote:



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

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



Axis2 build error after checkout Axis2 from Subversion

2008-11-18 Thread ZHU Johnson
Hi, all

I am new for axis2. I took source code from svn co
http://svn.apache.org/repos/asf/webservices/axis2/trunk/java;.

And build axis with mvn -e -X install  -Dtest=false -Drelease.

But I got some build error. The error is the following.

My problem:How can I build successfully? And what is the result? And how
can I deploy the result to tomcat?

 

Thanks

Johnson

 

[DEBUG] getProperty(ns=null, name=ant.reuse.loader, user=false)

 [copy] Copying 1 file to
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\client-rep
o\modules

 [copy] Copying 1 file to
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\modules

 [copy] Copying 2 files to
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\WSGenService

  [zip] Building zip:
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\WSGenService.jar

   [delete] Deleting directory
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\WSGenService

 [copy] Copying 1 file to
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\BasicAuthSecurityService

  [zip] Building zip:
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\BasicAuthSecurityService.jar

   [delete] Deleting directory
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\BasicAuthSecurityService

 [copy] Copying 3 files to
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\StringProviderService

  [zip] Building zip:
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\StringProviderService.jar

   [delete] Deleting directory
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\StringProviderService

 [copy] Copying 1 file to
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\StringMessageProviderService

  [zip] Building zip:
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\StringMessageProviderService.jar

   [delete] Deleting directory
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\StringMessageProviderService

 [copy] Copying 1 file to
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\SourceProviderService

  [zip] Building zip:
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\SourceProviderService.jar

   [delete] Deleting directory
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\SourceProviderService

 [copy] Copying 1 file to
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\SourceMessageProviderService

  [zip] Building zip:
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\SourceMessageProviderService.jar

   [delete] Deleting directory
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\SourceMessageProviderService

 [copy] Copying 3 files to
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\SoapMessageProviderService

  [zip] Building zip:
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\SoapMessageProviderService.jar

   [delete] Deleting directory
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\SoapMessageProviderService

 [copy] Copying 1 file to
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\SoapMessageCheckMTOMProviderService

  [zip] Building zip:
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\SoapMessageCheckMTOMProviderService.jar

   [delete] Deleting directory
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\SoapMessageCheckMTOMProviderService

 [copy] Copying 3 files to
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\SoapMessageMUProviderService

  [zip] Building zip:
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\SoapMessageMUProviderService.jar

   [delete] Deleting directory
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\SoapMessageMUProviderService

 [copy] Copying 1 file to
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\JAXBProviderService

  [zip] Building zip:
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class
es\servicejars\JAXBProviderService.jar

   [delete] Deleting directory
D:\code\learn\axis\axis2_svn\modules\jaxws-integration\target\test-class

Re: java.security.AccessControlException: access denied (java.io.FilePermission ..../WEB-INF/scriptServices read)

2008-11-18 Thread Amila Suriarachchi
On Tue, Nov 18, 2008 at 10:51 PM, Ramesh Vishwanatham 
[EMAIL PROTECTED] wrote:


 Hi Amila

 Thanks a lot, by adding loadLibrary permission and others I am able to make
 AxisServlet initialization successful with my services loaded.
 I had one problem which I could not find a solution, below is the error
 trace:

 *SECJ0314W: Current Java 2 Security policy reported a potential violation
 of Java 2 Security *
 *Permission. Please refer to Problem Determination Guide for
 further information.*

 *Permission:*

 *  /xyz.ear/xyz.war/WEB-INF/scriptServices : access denied
 (java.io.FilePermission *
 */xyz.ear/xyz.war/WEB-INF/scriptServices read)*


This seems to be a conflict in your polices in policy file. A careful look
may reveal the problem.




 *Code:*

 * org.apache.axis2.scripting.ScriptRepositoryListener  in  {file:*
 *
 /temp/HOSTNAME_Node01/APPNAME/xyz/xyz.war/axis251939axis2-scripting-1.3.mar}
 *



 *Stack Trace:*

 *java.security.AccessControlException: access denied
 (java.io.FilePermission *
 */xyz.ear/xyz.war/WEB-INF/scriptServices read)*


 In order to over come this problem I have removed axis2-scripting-1.3.mar
 from modules folder. What does this module do and impact of it not being
 there.


This seems to be something to deploy script files as services. Which IMHO
should have written as a custom deployer. So there won't be any problem
unless you want to deploy scripts.

Please start a new thread for this question :)

thanks,
Amila.



 Regards,
 Ramesh




  *Amila Suriarachchi [EMAIL PROTECTED]*

 11/15/2008 09:22 AM
   Please respond to
 axis-user@ws.apache.org

   To
 axis-user@ws.apache.org  cc
   Subject
 Re: java.security.AccessControlException: access denied
 (java.io.FilePermission /WEB-INF/scriptServices read)




 hi,

 ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());

 this line has something like above. you may need to give native method
 access permission.

 thanks,
 Amila.

 On Fri, Nov 14, 2008 at 9:41 PM, Ramesh Vishwanatham *
 [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Hi Amila
 After fixing all the policy related exceptions, now I am getting below
 exception any idea what could be the reason.

 *
 ServletWrappe E   SRVE0100E: Did not realize  init() exception thrown by
 servlet AxisServlet: java.lang.ExceptionInInitializerError* *
at org.apache.axis2.util.XMLUtils.toOM(XMLUtils.java:564)* *
at
 org.apache.axis2.deployment.DescriptionBuilder.buildOM(DescriptionBuilder.java:96)
 * *
at
 org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:79)
 * *
at
 org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:615)
 * *
at
 org.apache.axis2.deployment.WarBasedAxisConfigurator.init(WarBasedAxisConfigurator.java:146)
 * *
at
 org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:500)
 * *
at
 org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:420)*

 Thanks
 Ramesh


   *Amila Suriarachchi [EMAIL PROTECTED][EMAIL PROTECTED]
 **

 11/14/2008 12:48 AM


   Please respond to*
 [EMAIL PROTECTED] axis-user@ws.apache.org

   To
 [EMAIL PROTECTED] axis-user@ws.apache.org  cc
   Subject
 Re: java.security.AccessControlException: access denied
 (java.io.FilePermission /WEB-INF/scriptServices read)






 Try to give filePermission to all the file and see first. Then try to
 narrow down to the level you want.

 thanks,
 Amila.

 On 11/13/08, Ramesh Vishwanatham [EMAIL PROTECTED][EMAIL PROTECTED]
 wrote:
  Hi Amila
  Thanks for replying my question, I have added following in policy file:
 
  grant codeBase file:/xyz/xyz.war/- {
  permission java.io.FilePermission
  /xyz.ear/xyz.war/WEB-INF/scriptServices, read;
  };
 
 
  and still getting below error:
 
 
  SecurityManag W   SECJ0314W: Current Java 2 Security policy reported a
  potential violation
  of Java 2 Security Permission. Please refer to Problem
  Determination Guide for further
  information.
 
  Permission:
  ./xyz.ear/xyz.war/WEB-INF/scriptServices : access denied
  (java.io.FilePermission
  ./xyz.ear/xyz.war/WEB-INF/scriptServices read)
 
 
  Code:
  org.apache.axis2.scripting.ScriptRepositoryListener  in
  {file:/xyz/xyz.war/axis247136axis2-scripting-1.3.mar}
 
 
 
 
  Stack Trace:
 
  java.security.AccessControlException: access denied
  (java.io.FilePermission
  ./xyz.ear/xyz.war/WEB-INF/scriptServices read)
  at
 
 java.security.AccessControlContext.checkPermission(AccessControlContext.java(Compiled
  Code))
 
 
  please let me know what coule be the problem.
 
  Regards,
  Ramesh
 
 
 
 
 
  Amila Suriarachchi [EMAIL PROTECTED][EMAIL PROTECTED]
 
  11/13/2008 05:28 AM
  Please respond to
  [EMAIL PROTECTED] axis-user@ws.apache.org
 
 
  To
  [EMAIL 

Re: Something like RawXMLOUTOnlyMessageReceiver?

2008-11-18 Thread Amila Suriarachchi
Write your own message receivers extending
AbstractInOutMessageReceiver and AbstractMessageReceiver classes.

thanks,
Amila.

On Tue, Nov 18, 2008 at 9:25 PM, [EMAIL PROTECTED] wrote:

  Hello, I'm creating an AXIOM-based service using Axis2 v1.4.1 and have
 two methods with signatures that don't seem to map to any of the available
 Raw*MessageReceivers:

 public OMElement getBalance()
 public void update()

 How can I define these in my services.xml?  I only see options for
 RawXMLInOnly (which expects an input argument), RawXMLINOutAsync (which
 expects an input argument and return type), and RawXMLINOut (ditto), and
 reading through the javadocs it appears that the method signature helps Axis
 figure out which service method to invoke for each defined operation.

 Any suggestions?

 John Tyler
 Commodities IT Developer
 Houston, TX
 +1 713 331 8313 (19581 8313)

 Visit our website at http://www.ubs.com

 This message contains confidential information and is intended only
 for the individual named.  If you are not the named addressee you
 should not disseminate, distribute or copy this e-mail.  Please
 notify the sender immediately by e-mail if you have received this
 e-mail by mistake and delete this e-mail from your system.

 E-mails are not encrypted and cannot be guaranteed to be secure or
 error-free as information could be intercepted, corrupted, lost,
 destroyed, arrive late or incomplete, or contain viruses.  The sender
 therefore does not accept liability for any errors or omissions in the
 contents of this message which arise as a result of e-mail transmission.
 If verification is required please request a hard-copy version.  This
 message is provided for informational purposes and should not be
 construed as a solicitation or offer to buy or sell any securities
 or related financial instruments.


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




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


Help! How to define the WSDL so my SOAP XML schema can be correct?

2008-11-18 Thread Tian Chi
Hi all,

I'm a new user of Axis2. I created a WSDL for Axis2 but it turned out my XML
schema has one more layer (tag) than I expected.
Following is the XML I got

?xml version=1.0?
SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/

SOAP-ENV:Body
ns:MMRequest xmlns:ns=http://ws.iplant.com;
ns:MMRequest/
/ns:MMRequest
/SOAP-ENV:Body
/SOAP-ENV:Envelope

Noticed there is an extra ns:MMRequest inside ns:MMRequest, but I just
need one ns:MMequest such as

?xml version=1.0?
SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/

SOAP-ENV:Body
ns:MMRequest xmlns:ns=http://ws.iplant.com;
.. # This is where I put my data #
/ns:MMRequest
/SOAP-ENV:Body
/SOAP-ENV:Envelope

Can anyone tell me what I'm doing wrong and how to fix it?
Following is my WSDL file.

===
wsdl:definitions
xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/;
xmlns:http=http://schemas.xmlsoap.org/wsdl/http/;
xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/;
xmlns:tns=http://xml.equipmentalley.com/ws/schema/EquipmentAlley;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
targetNamespace=http://xml.equipmentalley.com/ws/schema/EquipmentAlley/

wsdl:types
xsd:schema xmlns:xsd=http://www.w3.org/2001/XMLSchema;
targetNamespace=
http://xml.equipmentalley.com/ws/schema/EquipmentAlley;

elementFormDefault=qualified

xsd:include schemaLocation=stateType.xsd/
xsd:include schemaLocation=countryType.xsd/
xsd:include schemaLocation=categoryType.xsd/

xsd:element name=MMRequest
xsd:complexType
xsd:sequence
xsd:element ref=tns:username /
xsd:element ref=tns:password /
xsd:element name=transactionList
type=tns:Transaction maxOccurs=unbounded/
/xsd:sequence
/xsd:complexType
/xsd:element
xsd:element name=MMRequestResponse
xsd:complexType
xsd:sequence
xsd:element ref=tns:status/
xsd:element ref=tns:message/
xsd:element name=transactionResponseList
type=tns:TransactionResponse minOccurs=0 maxOccurs=unbounded/
/xsd:sequence
/xsd:complexType
/xsd:element

xsd:complexType name=Transaction
xsd:sequence
xsd:element ref=tns:action/
xsd:element name=client type=tns:Client /
/xsd:sequence
/xsd:complexType

xsd:complexType name=TransactionResponse
xsd:sequence
xsd:element ref=tns:status/
xsd:element ref=tns:message/
xsd:element name=client type=tns:Client
minOccurs=0/
/xsd:sequence
/xsd:complexType

xsd:complexType name=Client
xsd:sequence
xsd:element ref=tns:companyName minOccurs=0/
xsd:element ref=tns:firstName minOccurs=0/
xsd:element ref=tns:lastName minOccurs=0/
xsd:element ref=tns:email minOccurs=0/
/xsd:sequence
/xsd:complexType

!--  Action --
xsd:element name=action type=xsd:string /

!-- Message Response --
xsd:element name=status type=xsd:int /
xsd:element name=message type=xsd:string /

!-- Client --
xsd:element name=companyName type=xsd:string /
xsd:element name=firstName type=xsd:string /
xsd:element name=lastName type=xsd:string /
xsd:element name=email type=xsd:string /

!-- Login --
xsd:element name=username type=xsd:string /
xsd:element name=password type=xsd:string /
/xsd:schema
/wsdl:types
wsdl:message name=MMRequestMessage
wsdl:part name=part1 element=tns:MMRequest /
/wsdl:message
wsdl:message name=MMRequestResponseMessage
wsdl:part name=part1 element=tns:MMRequestResponse /
/wsdl:message
wsdl:portType name=CLServicePortType
wsdl:operation name=MMRequest
wsdl:input message=tns:MMRequestMessage /
wsdl:output message=tns:MMRequestResponseMessage /
/wsdl:operation
/wsdl:portType
wsdl:binding name=CLServiceSOAP12Binding
type=tns:ServicePortType
soap12:binding transport=http://schemas.xmlsoap.org/soap/http;
style=document /
wsdl:operation name=MMRequest
soap12:operation soapAction=
http://www.iplant.com/ws/soaplisting#transaction;
style=document /
wsdl:input
soap12:body