override wsdl
Is there any way to override the wsdl generation ?? or should I do it manually ? thanks Rodrigo Asensio rasen...@gmail.com http://www.rodrigoasensio.com To err is human, but to really screw up requires the root password.
Re: override wsdl
wanna override the default nillable and maxOccurrences attrib at types Rodrigo Asensio rasen...@gmail.com http://www.rodrigoasensio.com To err is human, but to really screw up requires the root password. On Fri, Dec 12, 2008 at 1:06 PM, keith chapman keithgchap...@gmail.com wrote: Depends on your requirement. What sort of things do you wanna override? Thanks, Keith. On Fri, Dec 12, 2008 at 6:19 PM, Rodrigo Asensio rasen...@gmail.com wrote: Is there any way to override the wsdl generation ?? or should I do it manually ? thanks Rodrigo Asensio rasen...@gmail.com http://www.rodrigoasensio.com To err is human, but to really screw up requires the root password. -- Keith Chapman Senior Software Engineer WSO2 Inc. Oxygenating the Web Service Platform. http://wso2.org/ blog: http://www.keith-chapman.org
Re: override wsdl
all right, thanks for the tip Rodrigo Asensio rasen...@gmail.com http://www.rodrigoasensio.com To err is human, but to really screw up requires the root password. On Fri, Dec 12, 2008 at 2:26 PM, Deepal Jayasinghe dee...@opensource.lk wrote: For that case, you have to put your wsdl into the service aar file. Then it will display yours rather than generating new one. Deepal wanna override the default nillable and maxOccurrences attrib at types Rodrigo Asensio rasen...@gmail.com http://www.rodrigoasensio.com To err is human, but to really screw up requires the root password. On Fri, Dec 12, 2008 at 1:06 PM, keith chapman keithgchap...@gmail.com wrote: Depends on your requirement. What sort of things do you wanna override? Thanks, Keith. On Fri, Dec 12, 2008 at 6:19 PM, Rodrigo Asensio rasen...@gmail.com wrote: Is there any way to override the wsdl generation ?? or should I do it manually ? thanks Rodrigo Asensio rasen...@gmail.com http://www.rodrigoasensio.com To err is human, but to really screw up requires the root password. -- Keith Chapman Senior Software Engineer WSO2 Inc. Oxygenating the Web Service Platform. http://wso2.org/ blog: http://www.keith-chapman.org -- Thank you! http://blogs.deepal.org
Re: Problem with a simple Object[] in RPCServiceClient
Finally It was solved. how ? the ws was done in coldfusion 7 who uses axis1 and there are some problems with doc-literal and soap encoding. Server side changed the wsdl and now I can retrieve arrays[] with the same code. Thanks for helping. R Rodrigo Asensio [EMAIL PROTECTED] http://www.rodrigoasensio.com To err is human, but to really screw up requires the root password. On Wed, Dec 10, 2008 at 2:55 PM, Rodrigo Asensio [EMAIL PROTECTED] wrote: Here is the code. Also I'm trying to generate the clients with adb or xmlbeans and I'm getting [ERROR] Part 'fault' of fault message '{http://icu_test.dev}CFCInvocationException' must be defined with 'element=QName' and not 'type=QName' this is a coldfusion axis1 ws. I found that according to the specification, fault and header message parts must be defined as document/literal, even if the body is defined as RPC style. Struct_cards -- public class struct_cards { protected java.lang.String card_delegate; protected java.lang.String card_expire_date; protected java.lang.String card_id; protected java.lang.String card_lfd; protected java.lang.String card_name; protected java.lang.String card_type; protected java.lang.String usrfld1; public struct_cards() {} public struct_cards(String card_delegate, String card_expire_date, String card_id, String card_lfd, String card_name, String card_type, String usrfld1) { this.card_delegate = card_delegate; this.card_expire_date = card_expire_date; this.card_id = card_id; this.card_lfd = card_lfd; this.card_name = card_name; this.card_type = card_type; this.usrfld1 = usrfld1; } public String getCard_delegate() { return card_delegate; } public void setCard_delegate(String card_delegate) { this.card_delegate = card_delegate; } public String getCard_expire_date() { return card_expire_date; } public void setCard_expire_date(String card_expire_date) { this.card_expire_date = card_expire_date; } public String getCard_id() { return card_id; } public void setCard_id(String card_id) { this.card_id = card_id; } public String getCard_lfd() { return card_lfd; } public void setCard_lfd(String card_lfd) { this.card_lfd = card_lfd; } public String getCard_name() { return card_name; } public void setCard_name(String card_name) { this.card_name = card_name; } public String getCard_type() { return card_type; } public void setCard_type(String card_type) { this.card_type = card_type; } public String getUsrfld1() { return usrfld1; } public void setUsrfld1(String usrfld1) { this.usrfld1 = usrfld1; } } invoke method -- public Object[] invoke() throws Exception { Object[] params = new Object() {someid}; RPCServiceClient serviceClient = new RPCServiceClient(); Options options = serviceClient.getOptions(); EndpointReference targetEPR = new EndpointReference(URL); options.setTo(targetEPR); options.setTimeOutInMilliSeconds(TIMEOUT); QName actionQ = new QName(NAMESPACE, get_cards); // Class[] returnTypes = new Class[] { returnTypeClass }; ArrayList resobj = new ArrayList(); resobj.add(struct_cards[].class); Class[] ax = (Class[])resobj.toArray(new Class[resobj.size()]); // Class[] returnTypes = new Class[]{struct_cards.class}; Object[] results = serviceClient.invokeBlocking(actionQ, params, ax); return results; } Rodrigo Asensio [EMAIL PROTECTED] http://www.rodrigoasensio.com To err is human, but to really screw up requires the root password. On Wed, Dec 10, 2008 at 2:47 PM, Deepal Jayasinghe [EMAIL PROTECTED] wrote: Can you please send me your service code, then I will give you the exact solution. Deepal Rodrigo Asensio wrote: the most accurate test for my case should be the testCompanyArray() where it converts doing something like this ArrayList resobj = new ArrayList(); resobj.add(Struct_cards[].class); (Class[])resobj.toArray(new Class[resobj.size()]) but the result is the same... below I'm posting the wsdl and extra info that might help (me :)) results Object[1] (id=83) [0] Struct_cards (id=84) card_delegate null
Re: Problem with a simple Object[] in RPCServiceClient
nop, I said this is a coldfusion axis1 ws. I found that according to the specification, fault and header message parts must be defined as document/literal, even if the body is defined as RPC style. regards and thanks Rodrigo Asensio [EMAIL PROTECTED] http://www.rodrigoasensio.com To err is human, but to really screw up requires the root password. On Wed, Dec 10, 2008 at 2:55 PM, Rodrigo Asensio [EMAIL PROTECTED] wrote: Here is the code. Also I'm trying to generate the clients with adb or xmlbeans and I'm getting [ERROR] Part 'fault' of fault message '{http://icu_test.dev}CFCInvocationException' must be defined with 'element=QName' and not 'type=QName' this is a coldfusion axis1 ws. I found that according to the specification, fault and header message parts must be defined as document/literal, even if the body is defined as RPC style. Struct_cards -- public class struct_cards { protected java.lang.String card_delegate; protected java.lang.String card_expire_date; protected java.lang.String card_id; protected java.lang.String card_lfd; protected java.lang.String card_name; protected java.lang.String card_type; protected java.lang.String usrfld1; public struct_cards() {} public struct_cards(String card_delegate, String card_expire_date, String card_id, String card_lfd, String card_name, String card_type, String usrfld1) { this.card_delegate = card_delegate; this.card_expire_date = card_expire_date; this.card_id = card_id; this.card_lfd = card_lfd; this.card_name = card_name; this.card_type = card_type; this.usrfld1 = usrfld1; } public String getCard_delegate() { return card_delegate; } public void setCard_delegate(String card_delegate) { this.card_delegate = card_delegate; } public String getCard_expire_date() { return card_expire_date; } public void setCard_expire_date(String card_expire_date) { this.card_expire_date = card_expire_date; } public String getCard_id() { return card_id; } public void setCard_id(String card_id) { this.card_id = card_id; } public String getCard_lfd() { return card_lfd; } public void setCard_lfd(String card_lfd) { this.card_lfd = card_lfd; } public String getCard_name() { return card_name; } public void setCard_name(String card_name) { this.card_name = card_name; } public String getCard_type() { return card_type; } public void setCard_type(String card_type) { this.card_type = card_type; } public String getUsrfld1() { return usrfld1; } public void setUsrfld1(String usrfld1) { this.usrfld1 = usrfld1; } } invoke method -- public Object[] invoke() throws Exception { Object[] params = new Object() {someid}; RPCServiceClient serviceClient = new RPCServiceClient(); Options options = serviceClient.getOptions(); EndpointReference targetEPR = new EndpointReference(URL); options.setTo(targetEPR); options.setTimeOutInMilliSeconds(TIMEOUT); QName actionQ = new QName(NAMESPACE, get_cards); // Class[] returnTypes = new Class[] { returnTypeClass }; ArrayList resobj = new ArrayList(); resobj.add(struct_cards[].class); Class[] ax = (Class[])resobj.toArray(new Class[resobj.size()]); // Class[] returnTypes = new Class[]{struct_cards.class}; Object[] results = serviceClient.invokeBlocking(actionQ, params, ax); return results; } Rodrigo Asensio [EMAIL PROTECTED] http://www.rodrigoasensio.com To err is human, but to really screw up requires the root password. On Wed, Dec 10, 2008 at 2:47 PM, Deepal Jayasinghe [EMAIL PROTECTED] wrote: Can you please send me your service code, then I will give you the exact solution. Deepal Rodrigo Asensio wrote: the most accurate test for my case should be the testCompanyArray() where it converts doing something like this ArrayList resobj = new ArrayList(); resobj.add(Struct_cards[].class); (Class[])resobj.toArray(new Class[resobj.size()]) but the result is the same... below I'm posting the wsdl and extra info that might help (me :)) results Object[1] (id=83) [0] Struct_cards (id=84) card_delegate null card_expire_date
compatibility issues
I'm axis2 and I'm generating ws for other consumers, some of them are ms crappy biztalk. They are getting some conflicts if they find in the wsdl something like this: xs:element maxOccurs=unbounded minOccurs=0 name=persons nillable=true type=ax21:Person/ the minOccurs=0 and the nillable=true is there any way to intersect the wget of the wsdl ?? or should I change it manually and point to a custom file ?? any property to set in the java2wsdl ant task ??? regards R Rodrigo Asensio rasen...@gmail.com http://www.rodrigoasensio.com To err is human, but to really screw up requires the root password.
Response a Custom XSD
Axis2 141 we are developing a ws based on our customer spec. He gave me a XSD and the response XML (inner the soap msg) should be in a specific way. I made it 100% using AXIOM OMElements because I didnt found a way to do the XS:ATTRIBUTES as is shown below. xs:element name=BigObject xs:complexType xs:sequence xs:element ref=SmallObject1/ xs:element ref=SmallObject2 minOccurs=0/ xs:element ref=SmallObject3 minOccurs=0 maxOccurs=unbounded/ xs:element ref=SmallObject4 minOccurs=0 maxOccurs=unbounded/ /xs:sequence xs:attribute name=Version type=xs:string use=optional default=3.3/ xs:attribute name=UnitsOfMeasure type=UnitsOfMeasure use=optional default=metric/ xs:attribute name=TrainingModeFlag type=xs:boolean use=optional default=false/ /xs:complexType /xs:element If I deploy a WS returning objects, how can I do that some attributes of the BigObject are shown like xs:attribute and not in the xs:sequence, is this possible or they are crazy asking me this ? is this standard ??? Rodrigo Asensio rasen...@gmail.com http://www.rodrigoasensio.com To err is human, but to really screw up requires the root password.
Re: Response a Custom XSD
I'm seeing the wikipedia article ( http://en.wikipedia.org/wiki/Web_Services_Description_Language#Example_WSDL_file ) and I saw something like I want, that means is not that crazy, now my question is , how can I represent in the XML the attributes of an object having this obj for example class Request { private Header header; would be the complex type private String method; is represented as an xs:attribute.. HOW can I make this } xs:element name=request xs:complexType xs:sequence xs:element name=header maxOccurs=unbounded xs:complexType xs:simpleContent xs:extension base=xs:string xs:attribute name=name type=xs:string use=required/ /xs:extension /xs:simpleContent /xs:complexType /xs:element xs:element name=body type=xs:anyType minOccurs=0/ /xs:sequence xs:attribute name=method type=xs:string use=required/ xs:attribute name=uri type=xs:anyURI use=required/ /xs:complexType /xs:element Rodrigo Asensio rasen...@gmail.com http://www.rodrigoasensio.com To err is human, but to really screw up requires the root password. On Thu, Dec 11, 2008 at 3:35 PM, Rodrigo Asensio rasen...@gmail.com wrote: Axis2 141 we are developing a ws based on our customer spec. He gave me a XSD and the response XML (inner the soap msg) should be in a specific way. I made it 100% using AXIOM OMElements because I didnt found a way to do the XS:ATTRIBUTES as is shown below. xs:element name=BigObject xs:complexType xs:sequence xs:element ref=SmallObject1/ xs:element ref=SmallObject2 minOccurs=0/ xs:element ref=SmallObject3 minOccurs=0 maxOccurs=unbounded/ xs:element ref=SmallObject4 minOccurs=0 maxOccurs=unbounded/ /xs:sequence xs:attribute name=Version type=xs:string use=optional default=3.3/ xs:attribute name=UnitsOfMeasure type=UnitsOfMeasure use=optional default=metric/ xs:attribute name=TrainingModeFlag type=xs:boolean use=optional default=false/ /xs:complexType /xs:element If I deploy a WS returning objects, how can I do that some attributes of the BigObject are shown like xs:attribute and not in the xs:sequence, is this possible or they are crazy asking me this ? is this standard ??? Rodrigo Asensio rasen...@gmail.com http://www.rodrigoasensio.com To err is human, but to really screw up requires the root password.
Problem with a simple Object[] in RPCServiceClient
Can't return a simple Object[] axis2 141 client code: RPCServiceClient serviceClient = new RPCServiceClient(); Options options = serviceClient.getOptions(); EndpointReference targetEPR = new EndpointReference(URL); options.setTo(targetEPR); options.setTimeOutInMilliSeconds(TIMEOUT); QName actionQ = new QName(NAMESPACE, action); Class[] returnTypes = new Class[] { Struct_cards.class }; // also tried Struct_cards[].class Object[] results = serviceClient.invokeBlocking(actionQ, params, returnTypes); It returns an array of 1 element Struct_cards with all its values empty, below the XML response and the bean code. I saw that might be a problem of axis2 converting simple object arrays, but I didn't found any proof. Any help will be appreciated. xml returns : - get_cardsResponse xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; get_cardsReturn xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:ns1=http://icu_test.dev; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenc:arrayType=ns1:struct_cards[2] xsi:type=soapenc:Array get_cardsReturn xsi:type=ns1:struct_cards card_delegate xsi:type=xsd:stringX/card_delegate card_expire_date xsi:type=xsd:string/card_expire_date card_id xsi:type=xsd:stringX/card_id card_lfd xsi:type=xsd:string/card_lfd card_name xsi:type=xsd:stringRodrigo Asensio/card_name card_type xsi:type=xsd:string1/card_type usrfld1 xsi:type=xsd:string/usrfld1 /get_cardsReturn get_cardsReturn xsi:type=ns1:struct_cards card_delegate xsi:type=xsd:stringx/card_delegate card_expire_date xsi:type=xsd:stringx/card_expire_date card_id xsi:type=xsd:stringx/card_id card_lfd xsi:type=xsd:string/card_lfd card_name xsi:type=xsd:stringRodrigo Asensio/card_name card_type xsi:type=xsd:string1/card_type usrfld1 xsi:type=xsd:string/usrfld1 /get_cardsReturn /get_cardsReturn /get_cardsResponse bean code: (very basic) --- public class Struct_cards { protected java.lang.String card_delegate; protected java.lang.String card_expire_date; protected java.lang.String card_id; protected java.lang.String card_lfd; protected java.lang.String card_name; protected java.lang.String card_type; protected java.lang.String usrfld1; public Struct_cards() {} public Struct_cards(String card_delegate, String card_expire_date, String card_id, String card_lfd, String card_name, String card_type, String usrfld1) { this.card_delegate = card_delegate; this.card_expire_date = card_expire_date; this.card_id = card_id; this.card_lfd = card_lfd; this.card_name = card_name; this.card_type = card_type; this.usrfld1 = usrfld1; } public String getCard_delegate() { return card_delegate; } public void setCard_delegate(String card_delegate) { this.card_delegate = card_delegate; } public String getCard_expire_date() { return card_expire_date; } public void setCard_expire_date(String card_expire_date) { this.card_expire_date = card_expire_date; } public String getCard_id() { return card_id; } public void setCard_id(String card_id) { this.card_id = card_id; } public String getCard_lfd() { return card_lfd; } public void setCard_lfd(String card_lfd) { this.card_lfd = card_lfd; } public String getCard_name() { return card_name; } public void setCard_name(String card_name) { this.card_name = card_name; } public String getCard_type() { return card_type; } public void setCard_type(String card_type) { this.card_type = card_type; } public String getUsrfld1() { return usrfld1; } public void setUsrfld1(String usrfld1) { this.usrfld1 = usrfld1; } Rodrigo Asensio [EMAIL PROTECTED] http://www.rodrigoasensio.com To err is human, but to really screw up requires the root password.
Re: Problem with a simple Object[] in RPCServiceClient
Class[] returnTypes = new Class[]{(Struct_cards[])} this don't compile because the objects inside the array must be Class type, and I already tried that one Class[] returnTypes = new Class[]{Struct_cards[].class} Rodrigo Asensio [EMAIL PROTECTED] http://www.rodrigoasensio.com To err is human, but to really screw up requires the root password. On Wed, Dec 10, 2008 at 12:50 PM, Deepal Jayasinghe [EMAIL PROTECTED] wrote: Can't return a simple Object[] axis2 141 client code: RPCServiceClient serviceClient = new RPCServiceClient(); Options options = serviceClient.getOptions(); EndpointReference targetEPR = new EndpointReference(URL); options.setTo(targetEPR); options.setTimeOutInMilliSeconds(TIMEOUT); QName actionQ = new QName(NAMESPACE, action); Class[] returnTypes = new Class[] { Struct_cards.class }; // Class[] returnTypes = new Class[]{(Struct_cards[])} would work. also tried Struct_cards[].class Object[] results = serviceClient.invokeBlocking(actionQ, params, returnTypes); It returns an array of 1 element Struct_cards with all its values empty, below the XML response and the bean code. I saw that might be a problem of axis2 converting simple object arrays, but I didn't found any proof. Any help will be appreciated. xml returns : - get_cardsResponse xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; get_cardsReturn xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:ns1=http://icu_test.dev; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenc:arrayType=ns1:struct_cards[2] xsi:type=soapenc:Array get_cardsReturn xsi:type=ns1:struct_cards card_delegate xsi:type=xsd:stringX/card_delegate card_expire_date xsi:type=xsd:string/card_expire_date card_id xsi:type=xsd:stringX/card_id card_lfd xsi:type=xsd:string/card_lfd card_name xsi:type=xsd:stringRodrigo Asensio/card_name card_type xsi:type=xsd:string1/card_type usrfld1 xsi:type=xsd:string/usrfld1 /get_cardsReturn get_cardsReturn xsi:type=ns1:struct_cards card_delegate xsi:type=xsd:stringx/card_delegate card_expire_date xsi:type=xsd:stringx/card_expire_date card_id xsi:type=xsd:stringx/card_id card_lfd xsi:type=xsd:string/card_lfd card_name xsi:type=xsd:stringRodrigo Asensio/card_name card_type xsi:type=xsd:string1/card_type usrfld1 xsi:type=xsd:string/usrfld1 /get_cardsReturn /get_cardsReturn /get_cardsResponse bean code: (very basic) --- public class Struct_cards { protected java.lang.String card_delegate; protected java.lang.String card_expire_date; protected java.lang.String card_id; protected java.lang.String card_lfd; protected java.lang.String card_name; protected java.lang.String card_type; protected java.lang.String usrfld1; public Struct_cards() {} public Struct_cards(String card_delegate, String card_expire_date, String card_id, String card_lfd, String card_name, String card_type, String usrfld1) { this.card_delegate = card_delegate; this.card_expire_date = card_expire_date; this.card_id = card_id; this.card_lfd = card_lfd; this.card_name = card_name; this.card_type = card_type; this.usrfld1 = usrfld1; } public String getCard_delegate() { return card_delegate; } public void setCard_delegate(String card_delegate) { this.card_delegate = card_delegate; } public String getCard_expire_date() { return card_expire_date; } public void setCard_expire_date(String card_expire_date) { this.card_expire_date = card_expire_date; } public String getCard_id() { return card_id; } public void setCard_id(String card_id) { this.card_id = card_id; } public String getCard_lfd() { return card_lfd; } public void setCard_lfd(String card_lfd) { this.card_lfd = card_lfd; } public String getCard_name() { return card_name; } public void setCard_name(String card_name) { this.card_name = card_name; } public String getCard_type() { return card_type; } public void setCard_type(String card_type) { this.card_type = card_type; } public String getUsrfld1() { return usrfld1; } public void setUsrfld1(String usrfld1) { this.usrfld1
Re: Problem with a simple Object[] in RPCServiceClient
the most accurate test for my case should be the testCompanyArray() where it converts doing something like this ArrayList resobj = new ArrayList(); resobj.add(Struct_cards[].class); (Class[])resobj.toArray(new Class[resobj.size()]) but the result is the same... below I'm posting the wsdl and extra info that might help (me :)) results Object[1] (id=83) [0] Struct_cards (id=84) card_delegate null card_expire_datenull card_id null card_lfdnull card_name null card_type null usrfld1 null ws created by Macromedia ColdFusion MX version 7,0,2,142559 import namespace=http://schemas.xmlsoap.org/soap/encoding// complexType name=Struct_cards − sequence element name=card_delegate nillable=true type=xsd:string/ element name=card_expire_date nillable=true type=xsd:string/ element name=card_id nillable=true type=xsd:string/ element name=card_lfd nillable=true type=xsd:string/ element name=card_name nillable=true type=xsd:string/ element name=card_type nillable=true type=xsd:string/ element name=usrfld1 nillable=true type=xsd:string/ /sequence /complexType − complexType name=ArrayOfStruct_cards − complexContent − restriction base=soapenc:Array attribute ref=soapenc:arrayType wsdl:arrayType=impl:Struct_cards[]/ /restriction /complexContent /complexType Rodrigo Asensio [EMAIL PROTECTED] http://www.rodrigoasensio.com To err is human, but to really screw up requires the root password. On Wed, Dec 10, 2008 at 2:11 PM, Deepal Jayasinghe [EMAIL PROTECTED] wrote: Have a look at following class , it does what you want to do https://svn.apache.org/repos/asf/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java Class[] returnTypes = new Class[]{(Struct_cards[])} this don't compile because the objects inside the array must be Class type, and I already tried that one Class[] returnTypes = new Class[]{Struct_cards[].class} Rodrigo Asensio [EMAIL PROTECTED] http://www.rodrigoasensio.com To err is human, but to really screw up requires the root password. On Wed, Dec 10, 2008 at 12:50 PM, Deepal Jayasinghe [EMAIL PROTECTED] wrote: Can't return a simple Object[] axis2 141 client code: RPCServiceClient serviceClient = new RPCServiceClient(); Options options = serviceClient.getOptions(); EndpointReference targetEPR = new EndpointReference(URL); options.setTo(targetEPR); options.setTimeOutInMilliSeconds(TIMEOUT); QName actionQ = new QName(NAMESPACE, action); Class[] returnTypes = new Class[] { Struct_cards.class }; // Class[] returnTypes = new Class[]{(Struct_cards[])} would work. also tried Struct_cards[].class Object[] results = serviceClient.invokeBlocking(actionQ, params, returnTypes); It returns an array of 1 element Struct_cards with all its values empty, below the XML response and the bean code. I saw that might be a problem of axis2 converting simple object arrays, but I didn't found any proof. Any help will be appreciated. xml returns : - get_cardsResponse xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; get_cardsReturn xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:ns1=http://icu_test.dev; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenc:arrayType=ns1:struct_cards[2] xsi:type=soapenc:Array get_cardsReturn xsi:type=ns1:struct_cards card_delegate xsi:type=xsd:stringX/card_delegate card_expire_date xsi:type=xsd:string/card_expire_date card_id xsi:type=xsd:stringX/card_id card_lfd xsi:type=xsd:string/card_lfd card_name xsi:type=xsd:stringRodrigo Asensio/card_name card_type xsi:type=xsd:string1/card_type usrfld1 xsi:type=xsd:string/usrfld1 /get_cardsReturn get_cardsReturn xsi:type=ns1:struct_cards card_delegate xsi:type=xsd:stringx/card_delegate card_expire_date xsi:type=xsd:stringx/card_expire_date card_id xsi:type=xsd:stringx/card_id card_lfd xsi:type=xsd:string/card_lfd card_name xsi:type=xsd:stringRodrigo Asensio/card_name card_type xsi:type=xsd:string1/card_type usrfld1 xsi:type=xsd:string/usrfld1 /get_cardsReturn /get_cardsReturn /get_cardsResponse bean code: (very basic) --- public class Struct_cards { protected java.lang.String card_delegate; protected java.lang.String card_expire_date; protected java.lang.String card_id; protected java.lang.String card_lfd; protected java.lang.String card_name; protected java.lang.String card_type; protected
Re: Problem with a simple Object[] in RPCServiceClient
Here is the code. Also I'm trying to generate the clients with adb or xmlbeans and I'm getting [ERROR] Part 'fault' of fault message '{http://icu_test.dev}CFCInvocationException' must be defined with 'element=QName' and not 'type=QName' this is a coldfusion axis1 ws. I found that according to the specification, fault and header message parts must be defined as document/literal, even if the body is defined as RPC style. Struct_cards -- public class struct_cards { protected java.lang.String card_delegate; protected java.lang.String card_expire_date; protected java.lang.String card_id; protected java.lang.String card_lfd; protected java.lang.String card_name; protected java.lang.String card_type; protected java.lang.String usrfld1; public struct_cards() {} public struct_cards(String card_delegate, String card_expire_date, String card_id, String card_lfd, String card_name, String card_type, String usrfld1) { this.card_delegate = card_delegate; this.card_expire_date = card_expire_date; this.card_id = card_id; this.card_lfd = card_lfd; this.card_name = card_name; this.card_type = card_type; this.usrfld1 = usrfld1; } public String getCard_delegate() { return card_delegate; } public void setCard_delegate(String card_delegate) { this.card_delegate = card_delegate; } public String getCard_expire_date() { return card_expire_date; } public void setCard_expire_date(String card_expire_date) { this.card_expire_date = card_expire_date; } public String getCard_id() { return card_id; } public void setCard_id(String card_id) { this.card_id = card_id; } public String getCard_lfd() { return card_lfd; } public void setCard_lfd(String card_lfd) { this.card_lfd = card_lfd; } public String getCard_name() { return card_name; } public void setCard_name(String card_name) { this.card_name = card_name; } public String getCard_type() { return card_type; } public void setCard_type(String card_type) { this.card_type = card_type; } public String getUsrfld1() { return usrfld1; } public void setUsrfld1(String usrfld1) { this.usrfld1 = usrfld1; } } invoke method -- public Object[] invoke() throws Exception { Object[] params = new Object() {someid}; RPCServiceClient serviceClient = new RPCServiceClient(); Options options = serviceClient.getOptions(); EndpointReference targetEPR = new EndpointReference(URL); options.setTo(targetEPR); options.setTimeOutInMilliSeconds(TIMEOUT); QName actionQ = new QName(NAMESPACE, get_cards); // Class[] returnTypes = new Class[] { returnTypeClass }; ArrayList resobj = new ArrayList(); resobj.add(struct_cards[].class); Class[] ax = (Class[])resobj.toArray(new Class[resobj.size()]); // Class[] returnTypes = new Class[]{struct_cards.class}; Object[] results = serviceClient.invokeBlocking(actionQ, params, ax); return results; } Rodrigo Asensio [EMAIL PROTECTED] http://www.rodrigoasensio.com To err is human, but to really screw up requires the root password. On Wed, Dec 10, 2008 at 2:47 PM, Deepal Jayasinghe [EMAIL PROTECTED] wrote: Can you please send me your service code, then I will give you the exact solution. Deepal Rodrigo Asensio wrote: the most accurate test for my case should be the testCompanyArray() where it converts doing something like this ArrayList resobj = new ArrayList(); resobj.add(Struct_cards[].class); (Class[])resobj.toArray(new Class[resobj.size()]) but the result is the same... below I'm posting the wsdl and extra info that might help (me :)) results Object[1] (id=83) [0] Struct_cards (id=84) card_delegate null card_expire_datenull card_id null card_lfdnull card_name null card_type null usrfld1 null ws created by Macromedia ColdFusion MX version 7,0,2,142559 import namespace=http://schemas.xmlsoap.org/soap/encoding// complexType name=Struct_cards − sequence element name=card_delegate nillable=true type=xsd:string/ element name=card_expire_date nillable