You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Asensio, Rodrigo" <ro...@gilbarco.com> on 2008/04/03 21:36:27 UTC

xml as response

Hello, My customer wants XML as response into the XML, he sent me his
XSD file and my response have to be compliant with that. Until now I was
returning beans as response, but, is it possible return raw XML as
response ? or an Element Bean ?? what do you think ??

 

thanks

 

Rodrigo



This message (including any attachments) contains confidential 
and/or proprietary information intended only for the addressee.  
Any unauthorized disclosure, copying, distribution or reliance on 
the contents of this information is strictly prohibited and may 
constitute a violation of law.  If you are not the intended 
recipient, please notify the sender immediately by responding to 
this e-mail, and delete the message from your system.  If you 
have any questions about this e-mail please notify the sender 
immediately. 

RE: xml as response

Posted by "Asensio, Rodrigo" <ro...@gilbarco.com>.
Thanks Anne, sure, I know that the base of SOAP is XML, but my problem
is how this XML is formatted. I was looking at Jibx, but I will give it
a try to xmlbeans ( :D I prefer apache proj)

Thanks.R


-----Original Message-----
From: Anne Thomas Manes [mailto:atmanes@gmail.com] 
Sent: Monday, April 07, 2008 1:47 PM
To: axis-user@ws.apache.org
Subject: Re: xml as response

XMLBeans should be able to handle any valid schema. The structure you
specify doesn't seem particularly unusual. I suggest using XMLBeans
for your data binding framework. SOAP sends and receives XML
regardless of how you process it on your end.

Anne

On Mon, Apr 7, 2008 at 7:31 AM, Asensio, Rodrigo
<ro...@gilbarco.com> wrote:
> Thanks Anthony.
>  Now I have more idea about what our customer wants. I did some
research about axis2 axiom OMElement and how to receive and respond
custom XML.
>
>  these guys wants something weird that I think XMLBeans cannot
fulfill.
>  in some cases they want
>
>  <Mybean property1="someValue" prop2="otherVal">
>         <property3>some val</property3>
>         <SomeInnerBean prop1="asdf" prop2="etc">
>       </SomeInnerBean>
>  </Mybean>
>
>  this is weird because into the MyBean node the have attribs and inner
nodes but also as properties. I don't know who did this, maybe the
janitor, but I have to write custom XML or XMLBeans will allow me to do
this crap ?
>
>  now, if I have to use OMElements (axiom) to write my custom xml, is
it possible to get parameter like this
>
>  public OMElement myservice1(String user, String pass, String input1,
int input2) throws Excep....
>
>  what I read is that you only can get as param 1 OMElement, and with
that I'm screwed!
>
>
>  ----------------------------------------
>
>
>  From: Anthony Bull [mailto:anthony.bull@bcsoft.co.nz]
>  Sent: Thursday, April 03, 2008 5:36 PM
>  To: axis-user@ws.apache.org
>  Subject: Re: xml as response
>
>
>  From your post I take it you are using Axis 2 and are not using a
data-binding?  E.g. XML Beans or JibX
>
>  If you use a data-binding you can convert the response in your client
code into an XML string by doing a toString() on the XML Bean (I've done
this with the XML Beans binding, am just assuming it works with the
others also).
>
>  You specify to use a databinding when you generate your service and
client side code using WSDL2Java.
>
>  Asensio, Rodrigo wrote:
>  Hello, My customer wants XML as response into the XML, he sent me his
XSD file and my response have to be compliant with that. Until now I was
returning beans as response, but, is it possible return raw XML as
response ? or an Element Bean ?? what do you think ??
>
>  thanks
>
>  Rodrigo
>
>
>
>
> --
>
>  Anthony
>  -------------------------------------
>  Anthony Bull
>  Senior Developer
>  Black Coffee Software Ltd
>  PO Box 10-192 The Terrace
>  Wellington, New Zealand
>
>  anthony.bull@bcsoft.co.nz
>  Ph  +64 4 472 8818
>  Fax +64 4 472 8811
>  -------------------------------------
>  www.bcsoft.co.nz
>  ---------------------------------------------------------------
>  This email may contain confidential or privileged information,
>  and is intended for use only by the addressee, or addressees.
>  If you are not the intended recipient please advise the sender
>  immediately and do not copy, use or disclose the contents to
>  any other person or organisation.
>  Black Coffee Software Ltd accepts no responsibility for viruses
>  received with this email, or to any changes made to the original
>  content. Any views or opinions expressed in this email may be
>  personal to the sender and are not necessarily those of Black
>  Coffee Software Ltd.
>  ---------------------------------------------------------------
>  ---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For
additional commands, e-mail: axis-user-help@ws.apache.org
>
>  This message (including any attachments) contains confidential
>  and/or proprietary information intended only for the addressee.
>  Any unauthorized disclosure, copying, distribution or reliance on
>  the contents of this information is strictly prohibited and may
>  constitute a violation of law.  If you are not the intended
>  recipient, please notify the sender immediately by responding to
>  this e-mail, and delete the message from your system.  If you
>  have any questions about this e-mail please notify the sender
>  immediately.
>
>  ---------------------------------------------------------------------
>
>
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>  For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org



This message (including any attachments) contains confidential 
and/or proprietary information intended only for the addressee.  
Any unauthorized disclosure, copying, distribution or reliance on 
the contents of this information is strictly prohibited and may 
constitute a violation of law.  If you are not the intended 
recipient, please notify the sender immediately by responding to 
this e-mail, and delete the message from your system.  If you 
have any questions about this e-mail please notify the sender 
immediately. 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: xml as response

Posted by Anne Thomas Manes <at...@gmail.com>.
XMLBeans should be able to handle any valid schema. The structure you
specify doesn't seem particularly unusual. I suggest using XMLBeans
for your data binding framework. SOAP sends and receives XML
regardless of how you process it on your end.

Anne

On Mon, Apr 7, 2008 at 7:31 AM, Asensio, Rodrigo
<ro...@gilbarco.com> wrote:
> Thanks Anthony.
>  Now I have more idea about what our customer wants. I did some research about axis2 axiom OMElement and how to receive and respond custom XML.
>
>  these guys wants something weird that I think XMLBeans cannot fulfill.
>  in some cases they want
>
>  <Mybean property1="someValue" prop2="otherVal">
>         <property3>some val</property3>
>         <SomeInnerBean prop1="asdf" prop2="etc">
>       </SomeInnerBean>
>  </Mybean>
>
>  this is weird because into the MyBean node the have attribs and inner nodes but also as properties. I don't know who did this, maybe the janitor, but I have to write custom XML or XMLBeans will allow me to do this crap ?
>
>  now, if I have to use OMElements (axiom) to write my custom xml, is it possible to get parameter like this
>
>  public OMElement myservice1(String user, String pass, String input1, int input2) throws Excep....
>
>  what I read is that you only can get as param 1 OMElement, and with that I'm screwed!
>
>
>  ----------------------------------------
>
>
>  From: Anthony Bull [mailto:anthony.bull@bcsoft.co.nz]
>  Sent: Thursday, April 03, 2008 5:36 PM
>  To: axis-user@ws.apache.org
>  Subject: Re: xml as response
>
>
>  From your post I take it you are using Axis 2 and are not using a data-binding?  E.g. XML Beans or JibX
>
>  If you use a data-binding you can convert the response in your client code into an XML string by doing a toString() on the XML Bean (I've done this with the XML Beans binding, am just assuming it works with the others also).
>
>  You specify to use a databinding when you generate your service and client side code using WSDL2Java.
>
>  Asensio, Rodrigo wrote:
>  Hello, My customer wants XML as response into the XML, he sent me his XSD file and my response have to be compliant with that. Until now I was returning beans as response, but, is it possible return raw XML as response ? or an Element Bean ?? what do you think ??
>
>  thanks
>
>  Rodrigo
>
>
>
>
> --
>
>  Anthony
>  -------------------------------------
>  Anthony Bull
>  Senior Developer
>  Black Coffee Software Ltd
>  PO Box 10-192 The Terrace
>  Wellington, New Zealand
>
>  anthony.bull@bcsoft.co.nz
>  Ph  +64 4 472 8818
>  Fax +64 4 472 8811
>  -------------------------------------
>  www.bcsoft.co.nz
>  ---------------------------------------------------------------
>  This email may contain confidential or privileged information,
>  and is intended for use only by the addressee, or addressees.
>  If you are not the intended recipient please advise the sender
>  immediately and do not copy, use or disclose the contents to
>  any other person or organisation.
>  Black Coffee Software Ltd accepts no responsibility for viruses
>  received with this email, or to any changes made to the original
>  content. Any views or opinions expressed in this email may be
>  personal to the sender and are not necessarily those of Black
>  Coffee Software Ltd.
>  ---------------------------------------------------------------
>  --------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org
>
>  This message (including any attachments) contains confidential
>  and/or proprietary information intended only for the addressee.
>  Any unauthorized disclosure, copying, distribution or reliance on
>  the contents of this information is strictly prohibited and may
>  constitute a violation of law.  If you are not the intended
>  recipient, please notify the sender immediately by responding to
>  this e-mail, and delete the message from your system.  If you
>  have any questions about this e-mail please notify the sender
>  immediately.
>
>  ---------------------------------------------------------------------
>
>
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>  For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: xml as response

Posted by "Asensio, Rodrigo" <ro...@gilbarco.com>.
Thanks Anthony.
Now I have more idea about what our customer wants. I did some research about axis2 axiom OMElement and how to receive and respond custom XML.

these guys wants something weird that I think XMLBeans cannot fulfill.
in some cases they want

<Mybean property1="someValue" prop2="otherVal">
	<property3>some val</property3>
	<SomeInnerBean prop1="asdf" prop2="etc">
      </SomeInnerBean>
</Mybean>

this is weird because into the MyBean node the have attribs and inner nodes but also as properties. I don't know who did this, maybe the janitor, but I have to write custom XML or XMLBeans will allow me to do this crap ?

now, if I have to use OMElements (axiom) to write my custom xml, is it possible to get parameter like this

public OMElement myservice1(String user, String pass, String input1, int input2) throws Excep....

what I read is that you only can get as param 1 OMElement, and with that I'm screwed!


----------------------------------------


From: Anthony Bull [mailto:anthony.bull@bcsoft.co.nz] 
Sent: Thursday, April 03, 2008 5:36 PM
To: axis-user@ws.apache.org
Subject: Re: xml as response

>From your post I take it you are using Axis 2 and are not using a data-binding?  E.g. XML Beans or JibX

If you use a data-binding you can convert the response in your client code into an XML string by doing a toString() on the XML Bean (I've done this with the XML Beans binding, am just assuming it works with the others also).

You specify to use a databinding when you generate your service and client side code using WSDL2Java.

Asensio, Rodrigo wrote: 
Hello, My customer wants XML as response into the XML, he sent me his XSD file and my response have to be compliant with that. Until now I was returning beans as response, but, is it possible return raw XML as response ? or an Element Bean ?? what do you think ??
 
thanks
 
Rodrigo


-- 

Anthony
------------------------------------- 
Anthony Bull
Senior Developer
Black Coffee Software Ltd
PO Box 10-192 The Terrace
Wellington, New Zealand
 
anthony.bull@bcsoft.co.nz
Ph  +64 4 472 8818
Fax +64 4 472 8811
------------------------------------- 
www.bcsoft.co.nz
--------------------------------------------------------------- 
This email may contain confidential or privileged information, 
and is intended for use only by the addressee, or addressees. 
If you are not the intended recipient please advise the sender 
immediately and do not copy, use or disclose the contents to 
any other person or organisation.
Black Coffee Software Ltd accepts no responsibility for viruses 
received with this email, or to any changes made to the original 
content. Any views or opinions expressed in this email may be
personal to the sender and are not necessarily those of Black 
Coffee Software Ltd.
--------------------------------------------------------------- 
--------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org 

This message (including any attachments) contains confidential 
and/or proprietary information intended only for the addressee.  
Any unauthorized disclosure, copying, distribution or reliance on 
the contents of this information is strictly prohibited and may 
constitute a violation of law.  If you are not the intended 
recipient, please notify the sender immediately by responding to 
this e-mail, and delete the message from your system.  If you 
have any questions about this e-mail please notify the sender 
immediately. 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org