Re: axis2-wsdl2code-maven-plugin use
Hi Not sure this is exact what you are asking about but here is how I use the plugin, I have a separate class stored in src/main/java that extends the skeleton created by wsdl2code tool and implements the service. Then change the ServiceClass parameter in service xml file to refer to the new class that implements the service. parameter name=ServiceClassnew.package.ServiceImpl/parameter Then it's also easy to use the maven aar plugin for packaging the hole thing. cheers, Håkon 2009/7/11 Larry Meadors larry.mead...@gmail.com That wouldn't solve the issue - the problem is that I have to edit one of the files that it creates, but it creates it in a temporary location (everything under target is wiped when you run mvn clean), and if I have a second copy, then the compile blows chunks. :-( I will stick with my ant trick - it works adequately, and if the interface changes because of a change to the WSDL file, the compile will fail, and I'll have a copy of the generated file that I can merge with my implemented file. For any others with the same problem, here's the code from my pom.xml: build ... plugins ... plugin artifactIdmaven-antrun-plugin/artifactId executions execution idmove-skeleton/id phaseprocess-sources/phase goalsgoalrun/goal/goals configuration tasks echoMove the generated skeleton/echo move file=${basedir}/target/generated-sources/.../BlahSkeleton.java tofile=${basedir}/target/generated-sources/.../BlahSkeleton.java.generated/ /tasks /configuration /execution /executions /plugin /plugins /build Running ant tasks from maven feels a bit like cheating, but it does the trick. Larry -- Håkon Sagehaug, Scientific Programmer Parallab, Bergen Center for Computational Science (BCCS) UNIFOB AS (University of Bergen Research Company)
Re: Is it possible to invoke multiple services in a single transaction?
It depends on what you mean by single transaction or single SOAP. Andreas On Mon, Jul 13, 2009 at 07:37, Chinmoy Chakrabortycch...@gmail.com wrote: Hi All, I didn't get any response for my previous query so I am sending again. Could you please tell me, Is it possible to invoke multiple services in a single transaction?. How I can do this? Any idea?? Chinmoy On Thu, Jul 9, 2009 at 12:27 PM, Chinmoy Chakraborty cch...@gmail.com wrote: Hi, I want invoke autenticate service by passing username and password in SOAP header and in the SOAP body I want to add multiple services. In short in a single SOAP i want to invoke multiple services along with authentication by sending username and password in the SOAP header. How I can do that suing Axis2? Any direction will be highly appreciated. Chinmoy
.jar or .aar | Preference by axis2?
I have my Skeleton class in both .aar and .jar under my lib of axis2.war. Which one will get picked if my service gets called? Thanks, Appu Appasamy T
Re: Is it possible to invoke multiple services in a single transaction?
Andreas, Thanks for reply. I have three services deployed in the server *authenticate, listfinction and ABS*. Below is the 3 SOPAs for 3 webservice call (from client) captured in SOAPMonitor: *authenthicate service SOAP* ?xml version='1.0' encoding='utf-8'? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Header xmlns:wsa=http://www.w3.org/2005/08/addressing; wsa:Tohttp://localhost:8080/services/authenticateservice/wsa:To wsa:MessageIDurn:uuid:2595C7BE88547C153B1247470034166/wsa:MessageID wsa:ActionauthenticateWithRole/wsa:Action /soapenv:Header soapenv:Body ns:authenticate xmlns:ns=authenticateservice ns:usernamesystem/ns:username ns:passwordmanager/ns:password /ns:authenticate /soapenv:Body /soapenv:Envelope *listfunction service SOAP* ?xml version='1.0' encoding='utf-8'? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Header xmlns:wsa=http://www.w3.org/2005/08/addressing; wsa:Tohttp://localhost:8080/services/abc_listFunctions/wsa:To wsa:MessageIDurn:uuid:2595C7BE88547C153B1247470035857/wsa:MessageID wsa:ActionlistFunctions/wsa:Action /soapenv:Header soapenv:Body ns:listFunctions xmlns:ns=abc_listFunctions arg0LIMS1_f9e44b2c1227302196bda75955654ce3/arg0 arg1false/arg1 /ns:listFunctions /soapenv:Body /soapenv:Envelope *ABS service SOAP* ?xml version='1.0' encoding='utf-8'? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Header xmlns:wsa=http://www.w3.org/2005/08/addressing; wsa:Tohttp://localhost:8080/services/ABS/wsa:To wsa:MessageIDurn:uuid:2595C7BE88547C153B1247470047736/wsa:MessageID wsa:Actioninvoke/wsa:Action /soapenv:Header soapenv:Body ns:ABS xmlns:ns=http://www.labware.com/webservice; arg0LIMS1_f9e44b2c1227302196bda75955654ce3/arg0 arg1-6/arg1 /ns:ABS /soapenv:Body /soapenv:Envelope Now I want to send username and password in SOAP header and in the SOAP body I want add two services that will call two webservices. So by sending a single SOAP I want to call actually three services (authenticate, listfinction and ABS). I hope I could make you understand. Chinmoy On Mon, Jul 13, 2009 at 12:31 PM, Andreas Veithen andreas.veit...@gmail.com wrote: It depends on what you mean by single transaction or single SOAP. Andreas On Mon, Jul 13, 2009 at 07:37, Chinmoy Chakrabortycch...@gmail.com wrote: Hi All, I didn't get any response for my previous query so I am sending again. Could you please tell me, Is it possible to invoke multiple services in a single transaction?. How I can do this? Any idea?? Chinmoy On Thu, Jul 9, 2009 at 12:27 PM, Chinmoy Chakraborty cch...@gmail.com wrote: Hi, I want invoke autenticate service by passing username and password in SOAP header and in the SOAP body I want to add multiple services. In short in a single SOAP i want to invoke multiple services along with authentication by sending username and password in the SOAP header. How I can do that suing Axis2? Any direction will be highly appreciated. Chinmoy
Re: WSDL gen error
HI Demtirs! I couldn't understand what is your problem, please describe more about your problem. The namespace can be anything, and it is nothing to do whit network, connection or anything else. Please read more about namespace. but if you get two different wsdl from two different environment, sound strange, alse i suppose you have the same axis-version same-java version and so on. Please check manually call any service on those two service, if you don't get the same respons, it is some thing you should be worried about it. otherwise the differences between those two wsdl-s is not importent. From: Demetris G demet...@ece.neu.edu To: axis-user@ws.apache.org Sent: Sunday, July 12, 2009 7:32:32 AM Subject: Re: WSDL gen error Hi again, I am beginning to worry that (a) I am either asking a really stupid question here and in the thread that is listed further down in my email that is not worth wasting any time on (b) a really complicated question (I doubt it) (c) I am in the wrong list ... should I move these two questions to the axis-dev you think? If axis is giving me a different WSDL file in two different Linux machines while the configuration and version is the same, is that a bug I need to worry about? And at least any information on how to manipulate the IP address in the WSDL would be greatly appreciated. Anyone?? Thanks once again Demetris Demetris G wrote: Hi all, Calling a service on the same machine as the axis server will set the namespace http://127.0.0.1:8080/axis/services/ However, calling it from another node in the same network behind a NAT still returns the same IP address in the name space - is that normal? Also, how can the IP address in the first case (calling it from the same machine) be set to the true IP address of the machine? Also if anyone has any more info on my email below it will be greatly appreciated. Thanks Demetris Demetris G wrote: And scanning through the two WSDL files I see also other diffs - wsdl:message name=mainRequest wsdl:part name=args type=impl:ArrayOf_soapenc_string/ /wsdl:message vs. wsdl:message name=mainRequest wsdl:part name=args type=intf:ArrayOf_soapenc_string/ /wsdl:message So it seems to me that it treats the same service a bit differently on a separate machine even though the setup/config etc of the server is identical. Demetris G wrote: At least someone may know this - what would cause the Axis engine to generate WSDLs with types instead of wsdl:types? If I know that then I can probably figure out why the same Axis engine distribution on two different Linux boxes would generate two different types of WSDLs - I am using the same browser to issue the request: http://xxx.xxx.xxx.xxx:8080/axis/services/remoteBooks?wsdl One engine gives this: types ... /types and the other: wsdl:types schema targetNamespace=http://xml.apache.org/xml-soap; ... /wsdl:types Any ideas? Thanks Demetris G wrote: And a follow up - same Axis engine (running in exactly same OSGi containers, same services, on one Linux machine it generates the WSDL file with types and the other with wsdl:types ! Why is that the case? This is a bit puzzling. Thanks very much in advance Demetris G wrote: Hi all, this may have been asked a while back - what would cause the Axis engine to generate WSDLs that carry types instead of wsdl:types: This causes the WSDL parser I use to throw: [java] WSDLException (at /wsdl:definitions/types): faultCode=INVALID_WSDL: Encountered illegal extension element 'types' in the context of a 'javax.wsdl.Definition'. Extension elements must be in a namespace other than WSDL's.: Using Axis 1.4 over java 1.5. Any ideas? Thanks
Re: Is it possible to invoke multiple services in a single transaction?
What are you meaning with multiple services? There is just one respons for one request.. and authentication hasn't to do with transaction. Do you know how you can and why you should, use the webservice!? From: Chinmoy Chakraborty cch...@gmail.com To: axis-user@ws.apache.org Sent: Monday, July 13, 2009 7:37:43 AM Subject: Re: Is it possible to invoke multiple services in a single transaction? Hi All, I didn't get any response for my previous query so I am sending again. Could you please tell me, Is it possible to invoke multiple services in a single transaction?. How I can do this? Any idea?? Chinmoy On Thu, Jul 9, 2009 at 12:27 PM, Chinmoy Chakraborty cch...@gmail.com wrote: Hi, I want invoke autenticate service by passing username and password in SOAP header and in the SOAP body I want to add multiple services. In short in a single SOAP i want to invoke multiple services along with authentication by sending username and password in the SOAP header. How I can do that suing Axis2? Any direction will be highly appreciated. Chinmoy
Re: .jar or .aar | Preference by axis2?
is your webservice working now? if yes, just delete one of them if it works still, that one is working. :) From: Appasamy Thirugnana athirugn...@sapient.com To: axis-user@ws.apache.org axis-user@ws.apache.org Sent: Monday, July 13, 2009 9:38:03 AM Subject: .jar or .aar | Preference by axis2? I have my Skeleton class in both .aar and .jar under my lib of axis2.war. Which one will get picked if my service gets called? Thanks, Appu Appasamy T
RE: Is it possible to invoke multiple services in a single transaction?
Then create a web service that takes as input all the data for all the services, have that service call other services. Taariq From: Lars Ericsson [mailto:larslars9...@yahoo.com] Sent: 13 July 2009 10:46 To: axis-user@ws.apache.org Subject: Re: Is it possible to invoke multiple services in a single transaction? What are you meaning with multiple services? There is just one respons for one request.. and authentication hasn't to do with transaction. Do you know how you can and why you should, use the webservice!? From: Chinmoy Chakraborty cch...@gmail.com To: axis-user@ws.apache.org Sent: Monday, July 13, 2009 7:37:43 AM Subject: Re: Is it possible to invoke multiple services in a single transaction? Hi All, I didn't get any response for my previous query so I am sending again. Could you please tell me, Is it possible to invoke multiple services in a single transaction?. How I can do this? Any idea?? Chinmoy On Thu, Jul 9, 2009 at 12:27 PM, Chinmoy Chakraborty cch...@gmail.commailto:cch...@gmail.com wrote: Hi, I want invoke autenticate service by passing username and password in SOAP header and in the SOAP body I want to add multiple services. In short in a single SOAP i want to invoke multiple services along with authentication by sending username and password in the SOAP header. How I can do that suing Axis2? Any direction will be highly appreciated. Chinmoy
Re: Is it possible to invoke multiple services in a single transaction?
Guys, Thanks for the reply. One of our client has this requirement. They want to authenticate, call some services and close (call close service) the session in a single request by which they don't have any orphaned sessions. I have three services deployed in the server authenticate, listfinction and ABS. Below is the 3 SOPAs for 3 webservice call (from client) captured in SOAPMonitor: authenthicate service SOAP ?xml version='1.0' encoding='utf-8'? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Header xmlns:wsa=http://www.w3.org/2005/08/addressing; wsa:Tohttp://localhost:8080/services/authenticateservice/wsa:To wsa:MessageIDurn:uuid:2595C7BE88547C153B1247470034166/wsa:MessageID wsa:ActionauthenticateWithRole/wsa:Action /soapenv:Header soapenv:Body ns:authenticate xmlns:ns=authenticateservice ns:usernamesystem/ns:username ns:passwordmanager/ns:password /ns:authenticate /soapenv:Body /soapenv:Envelope listfunction service SOAP ?xml version='1.0' encoding='utf-8'? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Header xmlns:wsa=http://www.w3.org/2005/08/addressing; wsa:Tohttp://localhost:8080/services/abc_listFunctions/wsa:To wsa:MessageIDurn:uuid:2595C7BE88547C153B1247470035857/wsa:MessageID wsa:ActionlistFunctions/wsa:Action /soapenv:Header soapenv:Body ns:listFunctions xmlns:ns=abc_listFunctions arg0LIMS1_f9e44b2c1227302196bda75955654ce3/arg0 arg1false/arg1 /ns:listFunctions /soapenv:Body /soapenv:Envelope ABS service SOAP ?xml version='1.0' encoding='utf-8'? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Header xmlns:wsa=http://www.w3.org/2005/08/addressing; wsa:Tohttp://localhost:8080/services/ABS/wsa:To wsa:MessageIDurn:uuid:2595C7BE88547C153B1247470047736/wsa:MessageID wsa:Actioninvoke/wsa:Action /soapenv:Header soapenv:Body ns:ABS xmlns:ns=http://www.labware.com/webservice; arg0LIMS1_f9e44b2c1227302196bda75955654ce3/arg0 arg1-6/arg1 /ns:ABS /soapenv:Body /soapenv:Envelope Now I want to send username and password in SOAP header and in the SOAP body I want add two services that will call two webservices. So by sending a single SOAP I want to call actually three services (authenticate, listfinction and ABS). I hope I could make you understand. Chinmoy On Mon, Jul 13, 2009 at 4:09 PM, Taariq Levack taariq.lev...@tasima.co.zawrote: Then create a web service that takes as input all the data for all the services, have that service call other services. Taariq *From:* Lars Ericsson [mailto:larslars9...@yahoo.com] *Sent:* 13 July 2009 10:46 *To:* axis-user@ws.apache.org *Subject:* Re: Is it possible to invoke multiple services in a single transaction? What are you meaning with multiple services? There is just one respons for one request.. and authentication hasn't to do with transaction. Do you know how you can and why you should, use the webservice!? -- *From:* Chinmoy Chakraborty cch...@gmail.com *To:* axis-user@ws.apache.org *Sent:* Monday, July 13, 2009 7:37:43 AM *Subject:* Re: Is it possible to invoke multiple services in a single transaction? Hi All, I didn't get any response for my previous query so I am sending again. Could you please tell me, Is it possible to invoke multiple services in a single transaction?. How I can do this? Any idea?? Chinmoy On Thu, Jul 9, 2009 at 12:27 PM, Chinmoy Chakraborty cch...@gmail.com wrote: Hi, I want invoke autenticate service by passing username and password in SOAP header and in the SOAP body I want to add multiple services. In short in a single SOAP i want to invoke multiple services along with authentication by sending username and password in the SOAP header. How I can do that suing Axis2? Any direction will be highly appreciated. Chinmoy
Re: Is it possible to invoke multiple services in a single transaction?
You have three webservices, and you want to use just one client to access for all three services! is it right? No it is not possible. you should have a client for eache service. it have several resones, one of this can be the have differnet namespace and different functions and so on. but you can make just one service, as a superClient or interface to call those functions and service on those three different services. and i have done without any security before and it should work, and it should works even for wss. From: Chinmoy Chakraborty cch...@gmail.com To: axis-user@ws.apache.org Sent: Monday, July 13, 2009 12:49:46 PM Subject: Re: Is it possible to invoke multiple services in a single transaction? Guys, Thanks for the reply. One of our client has this requirement. They want to authenticate, call some services and close (call close service) the session in a single request by which they don't have any orphaned sessions. I have three services deployed in the server authenticate, listfinction and ABS. Below is the 3 SOPAs for 3 webservice call (from client) captured in SOAPMonitor: authenthicate service SOAP ?xml version='1.0' encoding='utf-8'? http://localhost:8080/services/authenticateservice wsa:MessageIDurn:uuid:2595C7BE88547C153B1247470034166/wsa:MessageID wsa:ActionauthenticateWithRole/wsa:Action /soapenv:Header soapenv:Body ns:authenticate xmlns:ns=authenticateservice ns:usernamesystem/ns:username ns:passwordmanager/ns:password /ns:authenticate /soapenv:Body /soapenv:Envelope listfunction service SOAP ?xml version='1.0' encoding='utf-8'? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Header xmlns:wsa=http://www.w3.org/2005/08/addressing; http://localhost:8080/services/abc_listFunctions wsa:MessageIDurn:uuid:2595C7BE88547C153B1247470035857/wsa:MessageID wsa:ActionlistFunctions/wsa:Action /soapenv:Header soapenv:Body ns:listFunctions xmlns:ns=abc_listFunctions arg0LIMS1_f9e44b2c1227302196bda75955654ce3/arg0 arg1false/arg1 /ns:listFunctions /soapenv:Body /soapenv:Envelope ABS service SOAP ?xml version='1.0' encoding='utf-8'? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:Header xmlns:wsa=http://www.w3.org/2005/08/addressing; http://localhost:8080/services/ABS wsa:MessageIDurn:uuid:2595C7BE88547C153B1247470047736/wsa:MessageID wsa:Actioninvoke/wsa:Action /soapenv:Header soapenv:Body arg0LIMS1_f9e44b2c1227302196bda75955654ce3/arg0 arg1-6/arg1 /ns:ABS /soapenv:Body /soapenv:Envelope Now I want to send username and password in SOAP header and in the SOAP body I want add two services that will call two webservices. So by sending a single SOAP I want to call actually three services (authenticate, listfinction and ABS). I hope I could make you understand. Chinmoy On Mon, Jul 13, 2009 at 4:09 PM, Taariq Levack taariq.lev...@tasima.co.za wrote: Then create a web service that takes as input all the data for all the services, have that service call other services. Taariq From:Lars Ericsson [mailto:larslars9...@yahoo.com] Sent: 13 July 2009 10:46 To: axis-user@ws.apache.org Subject: Re: Is it possible to invoke multiple services in a single transaction? What are you meaning with multiple services? There is just one respons for one request.. and authentication hasn't to do with transaction. Do you know how you can and why you should, use the webservice!? From:Chinmoy Chakraborty cch...@gmail.com To: axis-user@ws.apache.org Sent: Monday, July 13, 2009 7:37:43 AM Subject: Re: Is it possible to invoke multiple services in a single transaction? Hi All, I didn't get any response for my previous query so I am sending again. Could you please tell me, Is it possible to invoke multiple services in a single transaction?. How I can do this? Any idea?? Chinmoy On Thu, Jul 9, 2009 at 12:27 PM, Chinmoy Chakraborty cch...@gmail.com wrote: Hi, I want invoke autenticate service by passing username and password in SOAP header and in the SOAP body I want to add multiple services. In short in a single SOAP i want to invoke multiple services along with authentication by sending username and password in the SOAP header. How I can do that suing Axis2? Any direction will be highly appreciated. Chinmoy
WSDL generated
Hi all, the way I understand this WSDL snippet (although my knowledge is limited, I confess) s:complexType name=CancelSalesOrderRequest s:complexContent mixed=false s:extension base=tns:Request s:sequence s:element name=OrderClose type=s3:BusinessEntity / s:element name=Status type=s:int / /s:sequence /s:extension /s:complexContent /s:complexType s:complexType name=Request abstract=true s:sequence s:element name=OptionalParameters type=tns:ArrayOfOptionalParameter / /s:sequence /s:complexType s:complexType name=ArrayOfOptionalParameter s:sequence s:element minOccurs=0 maxOccurs=unbounded name=OptionalParameter nillable=true type=tns:OptionalParameter / /s:sequence /s:complexType This allows the OptionalParameters of the request to be 'null', but yet my Axis2 1.4 generated code says: static { typeDesc.setXmlType( new javax.xml.namespace.QName( http://schemas.microsoft.com/crm/2007/WebServices;, Request ) ); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName( optionalParameters ); elemField.setXmlName( new javax.xml.namespace.QName( http://schemas.microsoft.com/crm/2007/WebServices;, OptionalParameters ) ); elemField.setXmlType( new javax.xml.namespace.QName( http://schemas.microsoft.com/crm/2007/WebServices;, OptionalParameter ) ); elemField.setNillable( false ); // - THIS HERE !!! elemField .setItemQName( new javax.xml.namespace.QName( http://schemas.microsoft.com/crm/2007/WebServices;, OptionalParameter ) ); typeDesc.addFieldDesc( elemField ); } Is this a bug, or am I in the wrong? Br, --- Miha Vitorovic Inženir v tehničnem področju Customer Support Engineer NIL Data Communications, Tivolska cesta 48, 1000 Ljubljana, Slovenia Phone +386 1 4746 500 Fax +386 1 4746 501 http://www.NIL.si
Send raw message
Hi all, While I understand that the point of AXIS is to remove the need for generating raw XML, I would still like to know if it is possible to do something similar to that. Why? Well, my deadline is approaching, and if I don't solve the problems I'm facing, I'd like to use the option as a workaround. And now the problem: I'm integrating our in-house system with MS Dynamics CRM 4.0, and it's giving problems that I am unable to solve with my limited knowledge of WSDL and WebSevices. I have two messages. They both look the same (well not THE SAME, but equivalent) to me, but the server disagrees. The one that is not working (generated by axis code): ?xml version=1.0 encoding=UTF-8? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; soapenv:Header CrmAuthenticationToken soapenv:actor= http://schemas.xmlsoap.org/soap/actor/next; soapenv:mustUnderstand=0 xmlns=http://schemas.microsoft.com/crm/2007/WebServices; AuthenticationType xmlns= http://schemas.microsoft.com/crm/2007/CoreTypes;0/AuthenticationType OrganizationName xmlns= http://schemas.microsoft.com/crm/2007/CoreTypes;Test/OrganizationName CallerId xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes ----/CallerId /CrmAuthenticationToken /soapenv:Header soapenv:Body Execute xmlns=http://schemas.microsoft.com/crm/2007/WebServices; Request xsi:type=ns1:CancelSalesOrderRequest xmlns:ns1= http://schemas.microsoft.com/crm/2007/WebServices; ns1:OptionalParameters xsi:type=ns1:OptionalParameter/ ns1:OrderClose xsi:type=ns1:orderclose ns1:salesorderid name=salesorder dsc=0 IsNull=false xsi:type=ns2:Lookup xmlns:ns2= http://schemas.microsoft.com/crm/2006/WebServices 6dad4393-a06f-de11-bac1-007276884dce/ns1:salesorderid /ns1:OrderClose ns1:Status xsi:type=xsd:int-1/ns1:Status /Request /Execute /soapenv:Body /soapenv:Envelope The working one: ?xml version=1.0 encoding=utf-8? soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd= http://www.w3.org/2001/XMLSchema; soap:Header CrmAuthenticationToken xmlns= http://schemas.microsoft.com/crm/2007/WebServices; AuthenticationType xmlns= http://schemas.microsoft.com/crm/2007/CoreTypes;0/AuthenticationType OrganizationName xmlns= http://schemas.microsoft.com/crm/2007/CoreTypes;Test/OrganizationName CallerId xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes ----/CallerId /CrmAuthenticationToken /soap:Header soap:Body Execute xmlns=http://schemas.microsoft.com/crm/2007/WebServices; Request xsi:type=CancelSalesOrderRequest OrderClose xsi:type=orderclose salesorderid name=salesorder6dad4393-a06f-de11-bac1-007276884dce/salesorderid /OrderClose Status-1/Status /Request /Execute /soap:Body /soap:Envelope So, can anyone help, either by making the generated request work (point out what seems to be the problem), or by telling me how to use the framework to send an XML generated by hand? Thanks in advance and best regards, --- Miha Vitorovic Inženir v tehničnem področju Customer Support Engineer NIL Data Communications, Tivolska cesta 48, 1000 Ljubljana, Slovenia Phone +386 1 4746 500 Fax +386 1 4746 501 http://www.NIL.si
Re: Send raw message
I'm not sure, i f i understand your problem. make a class with help of apache-httpclient and send your stirng to the server maybe you should define documentation-type and so on. you can look at this page to see how you can make a httpclinet with appache-httpclient. http://hc.apache.org/httpclient-3.x/tutorial.html this is an example to use get, but i will recomend you to use postMethod From: Miha Vitorovic mvitoro...@nil.si To: axis-user@ws.apache.org Sent: Monday, July 13, 2009 2:54:37 PM Subject: Send raw message Hi all, While I understand that the point of AXIS is to remove the need for generating raw XML, I would still like to know if it is possible to do something similar to that. Why? Well, my deadline is approaching, and if I don't solve the problems I'm facing, I'd like to use the option as a workaround. And now the problem: I'm integrating our in-house system with MS Dynamics CRM 4.0, and it's giving problems that I am unable to solve with my limited knowledge of WSDL and WebSevices. I have two messages. They both look the same (well not THE SAME, but equivalent) to me, but the server disagrees. The one that is not working (generated by axis code): ?xml version=1.0 encoding=UTF-8? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap..org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Header CrmAuthenticationToken soapenv:actor=http://schemas.xmlsoap.org/soap/actor/next; soapenv:mustUnderstand=0 xmlns=http://schemas.microsoft.com/crm/2007/WebServices; AuthenticationType xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes;0/AuthenticationType OrganizationName xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes;Test/OrganizationName CallerId xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes;----/CallerId /CrmAuthenticationToken /soapenv:Header soapenv:Body Execute xmlns=http://schemas.microsoft.com/crm/2007/WebServices; Request xsi:type=ns1:CancelSalesOrderRequest xmlns:ns1=http://schemas.microsoft.com/crm/2007/WebServices; ns1:OptionalParameters xsi:type=ns1:OptionalParameter/ ns1:OrderClose xsi:type=ns1:orderclose ns1:salesorderid name=salesorder dsc=0 IsNull=false xsi:type=ns2:Lookup xmlns:ns2=http://schemas.microsoft.com/crm/2006/WebServices;6dad4393-a06f-de11-bac1-007276884dce/ns1:salesorderid /ns1:OrderClose ns1:Status xsi:type=xsd:int-1/ns1:Status /Request /Execute /soapenv:Body /soapenv:Envelope The working one: ?xml version=1.0 encoding=utf-8? soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; soap:Header CrmAuthenticationToken xmlns=http://schemas.microsoft.com/crm/2007/WebServices; AuthenticationType xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes;0/AuthenticationType OrganizationName xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes;Test/OrganizationName CallerId xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes;----/CallerId /CrmAuthenticationToken /soap:Header soap:Body Execute xmlns=http://schemas.microsoft.com/crm/2007/WebServices; Request xsi:type=CancelSalesOrderRequest OrderClose xsi:type=orderclose salesorderid name=salesorder6dad4393-a06f-de11-bac1-007276884dce/salesorderid /OrderClose Status-1/Status /Request /Execute /soap:Body /soap:Envelope So, can anyone help, either by making the generated request work (point out what seems to be the problem), or by telling me how to use the framework to send an XML generated by hand? Thanks in advance and best regards, --- Miha Vitorovic Inženir v tehničnem področju Customer Support Engineer NIL Data Communications, Tivolska cesta 48, 1000 Ljubljana, Slovenia Phone +386 1 4746 500 Fax +386 1 4746 501 http://www.NIL.si
Re: Send raw message
If you are using Axis2, you can use ServiceClient to send XML (as an OMElement). BTW, did you check the messages with a schema validator to see which one is right? Andreas 2009/7/13 Miha Vitorovic mvitoro...@nil.si: Hi all, While I understand that the point of AXIS is to remove the need for generating raw XML, I would still like to know if it is possible to do something similar to that. Why? Well, my deadline is approaching, and if I don't solve the problems I'm facing, I'd like to use the option as a workaround. And now the problem: I'm integrating our in-house system with MS Dynamics CRM 4.0, and it's giving problems that I am unable to solve with my limited knowledge of WSDL and WebSevices. I have two messages. They both look the same (well not THE SAME, but equivalent) to me, but the server disagrees. The one that is not working (generated by axis code): ?xml version=1.0 encoding=UTF-8? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Header CrmAuthenticationToken soapenv:actor=http://schemas.xmlsoap.org/soap/actor/next; soapenv:mustUnderstand=0 xmlns=http://schemas.microsoft.com/crm/2007/WebServices; AuthenticationType xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes;0/AuthenticationType OrganizationName xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes;Test/OrganizationName CallerId xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes;----/CallerId /CrmAuthenticationToken /soapenv:Header soapenv:Body Execute xmlns=http://schemas.microsoft.com/crm/2007/WebServices; Request xsi:type=ns1:CancelSalesOrderRequest xmlns:ns1=http://schemas.microsoft.com/crm/2007/WebServices; ns1:OptionalParameters xsi:type=ns1:OptionalParameter/ ns1:OrderClose xsi:type=ns1:orderclose ns1:salesorderid name=salesorder dsc=0 IsNull=false xsi:type=ns2:Lookup xmlns:ns2=http://schemas.microsoft.com/crm/2006/WebServices;6dad4393-a06f-de11-bac1-007276884dce/ns1:salesorderid /ns1:OrderClose ns1:Status xsi:type=xsd:int-1/ns1:Status /Request /Execute /soapenv:Body /soapenv:Envelope The working one: ?xml version=1.0 encoding=utf-8? soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; soap:Header CrmAuthenticationToken xmlns=http://schemas.microsoft.com/crm/2007/WebServices; AuthenticationType xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes;0/AuthenticationType OrganizationName xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes;Test/OrganizationName CallerId xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes;----/CallerId /CrmAuthenticationToken /soap:Header soap:Body Execute xmlns=http://schemas.microsoft.com/crm/2007/WebServices; Request xsi:type=CancelSalesOrderRequest OrderClose xsi:type=orderclose salesorderid name=salesorder6dad4393-a06f-de11-bac1-007276884dce/salesorderid /OrderClose Status-1/Status /Request /Execute /soap:Body /soap:Envelope So, can anyone help, either by making the generated request work (point out what seems to be the problem), or by telling me how to use the framework to send an XML generated by hand? Thanks in advance and best regards, --- Miha Vitorovic Inženir v tehničnem področju Customer Support Engineer NIL Data Communications, Tivolska cesta 48, 1000 Ljubljana, Slovenia Phone +386 1 4746 500 Fax +386 1 4746 501 http://www.NIL.si
Axis2 + Jaxb
Hi, Sorry if this is a duplicate post, Can any one please suggest a good example of jaxb with axis2, as I am finding it difficult to find one. Any good articles also will help me. Thanks Amit Sharma -- View this message in context: http://www.nabble.com/Axis2-%2B-Jaxb-tp24463941p24463941.html Sent from the Axis - User mailing list archive at Nabble.com.
Re: WSDL gen error
Hi Lars, thanks for the response and the info regarding the namespace. My issue is the following - We have the Axis (1.4) bundles running in the OSGi container on a set of Linux machines with no issues. Web Services can be published and invoked upon - the WSDL files that are generated by these Axis bundles are correct and they can generate correct operational stubs. We needed to run a few of these on some powerful mobile devices that can actually run Jalimo, a full version (for fhe most part) of Java 1.5 based on the GNU libraries. So we simply installed the same OSGi container and Axis (1.4) bundles on them and ran them. The Axis servers work as they should, the generate WSDL files when invoked - however, the WSDL file they generate encaplsulate the scheme definitions in types tags instead of wsdl:types ! This is an issue because the XML parsers that process wsdl:types tags nicely have a problem with the types tags. After hours of searching I came upon this - http://issues.apache.org/jira/browse/AXIS-2336. Others a while back have encountered the same issue when running Axis on particular containers. However, (a) their resolution is specific to their container (b) my issue is not the type of container since the OSGi container works fine with Axis. My issue is that I moved more a Linux desktop to a Linux mobile device, even though the executables and runtime remained the same. I know that Axis 1.4 is ancient, however, there are still many of them in production and migration for us is in our future plans but for now we need to get this to work. Any ideas would be greatly appreciated. Regards Lars Ericsson wrote: HI Demtirs! I couldn't understand what is your problem, please describe more about your problem. The namespace can be anything, and it is nothing to do whit network, connection or anything else. Please read more about namespace. but if you get two different wsdl from two different environment, sound strange, alse i suppose you have the same axis-version same-java version and so on. Please check manually call any service on those two service, if you don't get the same respons, it is some thing you should be worried about it. otherwise the differences between those two wsdl-s is not importent. *From:* Demetris G demet...@ece.neu.edu *To:* axis-user@ws.apache.org *Sent:* Sunday, July 12, 2009 7:32:32 AM *Subject:* Re: WSDL gen error Hi again, I am beginning to worry that (a) I am either asking a really stupid question here and in the thread that is listed further down in my email that is not worth wasting any time on (b) a really complicated question (I doubt it) (c) I am in the wrong list ... should I move these two questions to the axis-dev you think? If axis is giving me a different WSDL file in two different Linux machines while the configuration and version is the same, is that a bug I need to worry about? And at least any information on how to manipulate the IP address in the WSDL would be greatly appreciated. Anyone?? Thanks once again Demetris Demetris G wrote: Hi all, Calling a service on the same machine as the axis server will set the namespace http://127.0.0.1:8080/axis/services/ However, calling it from another node in the same network behind a NAT still returns the same IP address in the name space - is that normal? Also, how can the IP address in the first case (calling it from the same machine) be set to the true IP address of the machine? Also if anyone has any more info on my email below it will be greatly appreciated. Thanks Demetris Demetris G wrote: And scanning through the two WSDL files I see also other diffs - wsdl:message name=mainRequest wsdl:part name=args type=impl:ArrayOf_soapenc_string/ /wsdl:message vs. wsdl:message name=mainRequest wsdl:part name=args type=intf:ArrayOf_soapenc_string/ /wsdl:message So it seems to me that it treats the same service a bit differently on a separate machine even though the setup/config etc of the server is identical. Demetris G wrote: At least someone may know this - what would cause the Axis engine to generate WSDLs with types instead of wsdl:types? If I know that then I can probably figure out why the same Axis engine distribution on two different Linux boxes would generate two different types of WSDLs - I am using the same browser to issue the request: http://xxx.xxx.xxx.xxx:8080/axis/services/remoteBooks?wsdl One engine gives this: types ... /types and the other: wsdl:types schema targetNamespace=http://xml.apache.org/xml-soap; ... /wsdl:types Any ideas? Thanks Demetris G wrote: And a follow up - same Axis engine (running in exactly same OSGi containers, same services, on one Linux machine it generates the WSDL file with types and the other with wsdl:types ! Why is that the case? This is a bit puzzling. Thanks very
Re: Send raw message
Thanks for the OMElement pointer, I'll check it out. As for the validator, I'm pretty new at this, and don't know much about it. Just point me in the direction of a few documents, and I'll make use of it ;) Br, --- Miha Vitorovic Inženir v tehničnem področju Customer Support Engineer NIL Data Communications, Tivolska cesta 48, 1000 Ljubljana, Slovenia Phone +386 1 4746 500 Fax +386 1 4746 501 http://www.NIL.si From: Andreas Veithen andreas.veit...@gmail.com To: axis-user@ws.apache.org Date: 13.07.2009 15:43 Subject: Re: Send raw message If you are using Axis2, you can use ServiceClient to send XML (as an OMElement). BTW, did you check the messages with a schema validator to see which one is right? Andreas 2009/7/13 Miha Vitorovic mvitoro...@nil.si: Hi all, While I understand that the point of AXIS is to remove the need for generating raw XML, I would still like to know if it is possible to do something similar to that. Why? Well, my deadline is approaching, and if I don't solve the problems I'm facing, I'd like to use the option as a workaround. And now the problem: I'm integrating our in-house system with MS Dynamics CRM 4.0, and it's giving problems that I am unable to solve with my limited knowledge of WSDL and WebSevices. I have two messages. They both look the same (well not THE SAME, but equivalent) to me, but the server disagrees. The one that is not working (generated by axis code): ?xml version=1.0 encoding=UTF-8? soapenv:Envelope xmlns:soapenv= http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Header CrmAuthenticationToken soapenv:actor=http://schemas.xmlsoap.org/soap/actor/next; soapenv:mustUnderstand=0 xmlns=http://schemas.microsoft.com/crm/2007/WebServices; AuthenticationType xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes 0/AuthenticationType OrganizationName xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes Test/OrganizationName CallerId xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes ----/CallerId /CrmAuthenticationToken /soapenv:Header soapenv:Body Execute xmlns=http://schemas.microsoft.com/crm/2007/WebServices; Request xsi:type=ns1:CancelSalesOrderRequest xmlns:ns1=http://schemas.microsoft.com/crm/2007/WebServices; ns1:OptionalParameters xsi:type=ns1:OptionalParameter/ ns1:OrderClose xsi:type=ns1:orderclose ns1:salesorderid name=salesorder dsc=0 IsNull=false xsi:type=ns2:Lookup xmlns:ns2=http://schemas.microsoft.com/crm/2006/WebServices 6dad4393-a06f-de11-bac1-007276884dce/ns1:salesorderid /ns1:OrderClose ns1:Status xsi:type=xsd:int-1/ns1:Status /Request /Execute /soapenv:Body /soapenv:Envelope The working one: ?xml version=1.0 encoding=utf-8? soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; soap:Header CrmAuthenticationToken xmlns=http://schemas.microsoft.com/crm/2007/WebServices; AuthenticationType xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes 0/AuthenticationType OrganizationName xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes Test/OrganizationName CallerId xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes ----/CallerId /CrmAuthenticationToken /soap:Header soap:Body Execute xmlns=http://schemas.microsoft.com/crm/2007/WebServices; Request xsi:type=CancelSalesOrderRequest OrderClose xsi:type=orderclose salesorderid name=salesorder6dad4393-a06f-de11-bac1-007276884dce/salesorderid /OrderClose Status-1/Status /Request /Execute /soap:Body /soap:Envelope So, can anyone help, either by making the generated request work (point out what seems to be the problem), or by telling me how to use the framework to send an XML generated by hand? Thanks in advance and best regards, --- Miha Vitorovic Inženir v tehničnem področju Customer Support Engineer NIL Data Communications, Tivolska cesta 48, 1000 Ljubljana, Slovenia Phone +386 1 4746 500 Fax +386 1 4746 501 http://www.NIL.si
Re: Send raw message
There are probably some online validators. Eclipse also has a validator. Andreas 2009/7/13 Miha Vitorovic mvitoro...@nil.si: Thanks for the OMElement pointer, I'll check it out. As for the validator, I'm pretty new at this, and don't know much about it. Just point me in the direction of a few documents, and I'll make use of it ;) Br, --- Miha Vitorovic Inženir v tehničnem področju Customer Support Engineer NIL Data Communications, Tivolska cesta 48, 1000 Ljubljana, Slovenia Phone +386 1 4746 500 Fax +386 1 4746 501 http://www.NIL.si From: Andreas Veithen andreas.veit...@gmail.com To: axis-user@ws.apache.org Date: 13.07.2009 15:43 Subject: Re: Send raw message If you are using Axis2, you can use ServiceClient to send XML (as an OMElement). BTW, did you check the messages with a schema validator to see which one is right? Andreas 2009/7/13 Miha Vitorovic mvitoro...@nil.si: Hi all, While I understand that the point of AXIS is to remove the need for generating raw XML, I would still like to know if it is possible to do something similar to that. Why? Well, my deadline is approaching, and if I don't solve the problems I'm facing, I'd like to use the option as a workaround. And now the problem: I'm integrating our in-house system with MS Dynamics CRM 4.0, and it's giving problems that I am unable to solve with my limited knowledge of WSDL and WebSevices. I have two messages. They both look the same (well not THE SAME, but equivalent) to me, but the server disagrees. The one that is not working (generated by axis code): ?xml version=1.0 encoding=UTF-8? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Header CrmAuthenticationToken soapenv:actor=http://schemas.xmlsoap.org/soap/actor/next; soapenv:mustUnderstand=0 xmlns=http://schemas.microsoft.com/crm/2007/WebServices; AuthenticationType xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes;0/AuthenticationType OrganizationName xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes;Test/OrganizationName CallerId xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes;----/CallerId /CrmAuthenticationToken /soapenv:Header soapenv:Body Execute xmlns=http://schemas.microsoft.com/crm/2007/WebServices; Request xsi:type=ns1:CancelSalesOrderRequest xmlns:ns1=http://schemas.microsoft.com/crm/2007/WebServices; ns1:OptionalParameters xsi:type=ns1:OptionalParameter/ ns1:OrderClose xsi:type=ns1:orderclose ns1:salesorderid name=salesorder dsc=0 IsNull=false xsi:type=ns2:Lookup xmlns:ns2=http://schemas.microsoft.com/crm/2006/WebServices;6dad4393-a06f-de11-bac1-007276884dce/ns1:salesorderid /ns1:OrderClose ns1:Status xsi:type=xsd:int-1/ns1:Status /Request /Execute /soapenv:Body /soapenv:Envelope The working one: ?xml version=1.0 encoding=utf-8? soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; soap:Header CrmAuthenticationToken xmlns=http://schemas.microsoft.com/crm/2007/WebServices; AuthenticationType xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes;0/AuthenticationType OrganizationName xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes;Test/OrganizationName CallerId xmlns=http://schemas.microsoft.com/crm/2007/CoreTypes;----/CallerId /CrmAuthenticationToken /soap:Header soap:Body Execute xmlns=http://schemas.microsoft.com/crm/2007/WebServices; Request xsi:type=CancelSalesOrderRequest OrderClose xsi:type=orderclose salesorderid name=salesorder6dad4393-a06f-de11-bac1-007276884dce/salesorderid /OrderClose Status-1/Status /Request /Execute /soap:Body /soap:Envelope So, can anyone help, either by making the generated request work (point out what seems to be the problem), or by telling me how to use the framework to send an XML generated by hand? Thanks in advance and best regards, --- Miha Vitorovic Inženir v tehničnem področju Customer Support Engineer NIL Data Communications, Tivolska cesta 48, 1000 Ljubljana, Slovenia Phone +386 1 4746 500 Fax +386 1 4746 501 http://www.NIL.si
UnsupportedOperationException - changing non void method to void
Hi all... I've returned to this project and I still have the same issue. If my web service exposes a public method that returns a string everything is fine, but if i change this to a void method, regenerate the web service (using Eclipse) I get the following error when i call this method. If I change it back to a method that returns something the error disappears. *org.apache.axis2.AxisFault: java.lang.UnsupportedOperationException: An access occurred that is not valid. at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512) at org.apache.axis2.description.RobustOutOnlyAxisOperation$RobustOutOnlyOperationClient.handleResponse(RobustOutOnlyAxisOperation.java:91) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at com.youpark.webservice.AccountEventHandlerSoapStub.MessageReceived(AccountEventHandlerSoapStub.java:341) at com.youpark.webclient.GenerateMessages.generateMessages(GenerateMessages.java:163) at com.youpark.webclient.CallGeneratedMessages.init(CallGeneratedMessages.java:42) at com.youpark.webclient.CallGeneratedMessages.init(CallGeneratedMessages.java:17) at com.youpark.webclient.CallGeneratedMessages.main(CallGeneratedMessages.java:51) * *I call the web service like this:* *POJO class AccountEventHandlerSoapStubstub2 = new AccountEventHandlerSoapStub(TARGET_EPR); MessageReceived messageReceived = new MessageReceived(); // messageReceived.setMessageID(message[0].getId()); ... messageReceived.setMessageText(message[0].getBody()); messageReceived.setType(message[0].getType().toString()); ..//fill in correct data here try { //MessageReceivedResponse responsReceived=stub2.MessageReceived(messageReceived); stub2.MessageReceived(messageReceived);* *The Generated stub fails/errors on the execute command below:* //adding SOAP soap_headers _serviceClient.addHeadersToEnvelope(env); // create message context with that soap envelope _messageContext.setEnvelope(env); // add the message contxt to the operation client _operationClient.addMessageContext(_messageContext); _operationClient.execute(true); *The services.xml is auto generated and looks like this:* *service name=AccountEventHandlerSoap Description Please Type your service description here /Description messageReceivers messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-only; class=org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver / messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-out; class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/ /messageReceivers parameter name=ServiceClass locked=falsecom.youpark.webservice.AccountEventHandlerSoap/parameter /service * All suggestions appreciated. Amila suggested previously that the problem was* The problem is your Inonly axisoperation contains an InOut message receiver which is wrong.*... but how do I rectify this? I never followed it up at the time... Thanks, Tori On Fri, Jan 23, 2009 at 3:17 PM, Toriachtshatner.will...@gmail.com wrote: Hi Amila, Thanks for the reply, I've pasted my short services.xml file below. I retrieved this from C:\brianworkspacetwo\mywebservice\WebContent\WEB-INF\services\AccountEventHandlerSoap\META-INF Thanks, Tori service name=AccountEventHandlerSoap Description Please Type your service description here /Description messageReceivers messageReceiver mep= http://www.w3.org/2004/08/wsdl/in-only; class=org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver / messageReceiver mep= http://www.w3.org/2004/08/wsdl/in-out; class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/ /messageReceivers parameter name=ServiceClass locked=falsecom.youpark.webservice.AccountEventHandlerSoap/parameter /service Amila Suriarachchi wrote: May be a problem with your services.xml. Can you send that file? The problem is your Inonly axisoperation contains an InOut message receiver which is wrong. thanks, Amila. at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at
Re: UnsupportedOperationException - changing non void method to void
I fixed this issue recently, if you can please check with Axis2 trunk. I have even added a test case too. Thank you! Deepal On Mon, Jul 13, 2009 at 6:00 PM, William Shatnershatner.will...@gmail.com wrote: Hi all... I've returned to this project and I still have the same issue. If my web service exposes a public method that returns a string everything is fine, but if i change this to a void method, regenerate the web service (using Eclipse) I get the following error when i call this method. If I change it back to a method that returns something the error disappears. org.apache.axis2.AxisFault: java.lang.UnsupportedOperationException: An access occurred that is not valid. at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512) at org.apache.axis2.description.RobustOutOnlyAxisOperation$RobustOutOnlyOperationClient.handleResponse(RobustOutOnlyAxisOperation.java:91) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at com.youpark.webservice.AccountEventHandlerSoapStub.MessageReceived(AccountEventHandlerSoapStub.java:341) at com.youpark.webclient.GenerateMessages.generateMessages(GenerateMessages.java:163) at com.youpark.webclient.CallGeneratedMessages.init(CallGeneratedMessages.java:42) at com.youpark.webclient.CallGeneratedMessages.init(CallGeneratedMessages.java:17) at com.youpark.webclient.CallGeneratedMessages.main(CallGeneratedMessages.java:51) I call the web service like this: POJO class AccountEventHandlerSoapStubstub2 = new AccountEventHandlerSoapStub(TARGET_EPR); MessageReceived messageReceived = new MessageReceived(); // messageReceived.setMessageID(message[0].getId()); ... messageReceived.setMessageText(message[0].getBody()); messageReceived.setType(message[0].getType().toString()); ..//fill in correct data here try { //MessageReceivedResponse responsReceived=stub2.MessageReceived(messageReceived); stub2.MessageReceived(messageReceived); The Generated stub fails/errors on the execute command below: //adding SOAP soap_headers _serviceClient.addHeadersToEnvelope(env); // create message context with that soap envelope _messageContext.setEnvelope(env); // add the message contxt to the operation client _operationClient.addMessageContext(_messageContext); _operationClient.execute(true); The services.xml is auto generated and looks like this: service name=AccountEventHandlerSoap Description Please Type your service description here /Description messageReceivers messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-only; class=org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver / messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-out; class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/ /messageReceivers parameter name=ServiceClass locked=falsecom.youpark.webservice.AccountEventHandlerSoap/parameter /service All suggestions appreciated. Amila suggested previously that the problem was The problem is your Inonly axisoperation contains an InOut message receiver which is wrong but how do I rectify this? I never followed it up at the time... Thanks, Tori On Fri, Jan 23, 2009 at 3:17 PM, Toriachtshatner.will...@gmail.com wrote: Hi Amila, Thanks for the reply, I've pasted my short services.xml file below. I retrieved this from C:\brianworkspacetwo\mywebservice\WebContent\WEB-INF\services\AccountEventHandlerSoap\META-INF Thanks, Tori service name=AccountEventHandlerSoap Description Please Type your service description here /Description messageReceivers messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-only; class=org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver / messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-out; class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/ /messageReceivers parameter name=ServiceClass locked=falsecom.youpark.webservice.AccountEventHandlerSoap/parameter /service Amila Suriarachchi wrote: May be a problem with your services.xml. Can you send that file? The problem is your Inonly axisoperation contains an InOut message receiver which is wrong. thanks, Amila. at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at
Axis skips generating type if it thinks it can just make an array
I'm using Axis 1.3. I have a schema with a complexType which has a single sequence of one element (unbounded count on that one element). It looks something like this (the commented element will come up later): xs:complexType name=SomethingItemPropertyListInfo xs:sequence xs:element name=PropertyData type=SomethingPropertyInfo minOccurs=0 maxOccurs=unbounded/ !--xs:element name=Dummy type=xs:boolean minOccurs=0/ -- /xs:sequence /xs:complexType When we generate code from this schema, the generated class corresponding to this type is, well, nonexistent. It generates nothing for it. If we instead comment in the Dummy element, it generates the SomethingItemPropertyListInfo class. This is a workaround, but an annoying one. We'd really like to have the schema definition not include Dummy, but still generate the SomethingItemPropertyListInfo type. At this point, we haven't attempted to inject Castor or XMLBeans into the picture to customize our code generation. We would definitely consider that if that's the only viable way to resolve this issue.
Re: Axis skips generating type if it thinks it can just make an array
I think you dont required to declare SomethingItemPropertyListInfo as complex element use simple element only On Tue, Jul 14, 2009 at 4:21 AM, KARR, DAVID (ATTCINW) dk0...@att.comwrote: I'm using Axis 1.3. I have a schema with a complexType which has a single sequence of one element (unbounded count on that one element). It looks something like this (the commented element will come up later): xs:complexType name=SomethingItemPropertyListInfo xs:sequence xs:element name=PropertyData type=SomethingPropertyInfo minOccurs=0 maxOccurs=unbounded/ !--xs:element name=Dummy type=xs:boolean minOccurs=0/ -- /xs:sequence /xs:complexType When we generate code from this schema, the generated class corresponding to this type is, well, nonexistent. It generates nothing for it. If we instead comment in the Dummy element, it generates the SomethingItemPropertyListInfo class. This is a workaround, but an annoying one. We'd really like to have the schema definition not include Dummy, but still generate the SomethingItemPropertyListInfo type. At this point, we haven't attempted to inject Castor or XMLBeans into the picture to customize our code generation. We would definitely consider that if that's the only viable way to resolve this issue. -- Yashvant Singh Chauhan Mobile- 09845277271 Bangalore *