axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alastair FETTES" <afet...@mdacorporation.com>
Subject RE: How best to transform a XML file into a message.
Date Thu, 02 Apr 2009 16:10:18 GMT
Hi Sam.
 
If you the format of the XML on the server is a different format from
that expected via the web services then I would suggest the following:
1.  Generate the service endpoint using the Axis2/C engine with no data
binding - only using OMElements for the input/output.
2.  Transform the XML into the correct data format using XSLT.  I would
highly suggest NOT doing this transformation by hand using generated C
code.  XSLT will be your easiest option though if you don't know it...
3.  Finally, load the OMElement with the data and return.
 
If the format of the XML is the same, you can simply skip steps #1 and
#2 from the previous list.
 
Really your problem isn't a SOAP/WS problem, it's a data transformation
problem.  You need to convert your data into the appropriate interface
format.  That's the real crux of your problem (it seems).
 
Cheers.
Alastair Fettes

This e-mail and any attachments are intended solely for the use of the
intended recipient(s) and may contain legally privileged, proprietary
and/or confidential information.  Any use, disclosure, dissemination,
distribution or copying of this e-mail and any attachments for any
purposes that have not been specifically authorized by the sender is
strictly prohibited.  If you are not the intended recipient, please
immediately notify the sender by reply e-mail and permanently delete all
copies and attachments.

The entire content of this e-mail is for "information purposes" only and
should not be relied upon by the recipient in any way unless otherwise
confirmed in writing by way of letter or facsimile. 

 

________________________________

From: scarleton@gmail.com [mailto:scarleton@gmail.com] On Behalf Of Sam
Carleton
Sent: Thursday, April 02, 2009 4:45 AM
To: Apache AXIS C User List
Subject: Re: How best to transform a XML file into a message.


Folks,

I know this is a free forum thus folks are free to ignore questions.  On
the question below, the big question I have comes from my ignorance of
the plumbing of Web Services.  Any feedback, even feedback such as, "Sam
go learn more about the SOAP envelope to find out your own confort
level, fore this is something only you can answer." would be much
appreciated.

Sam

P.S.  I am starting to talk to WSO2 about some paid support, I am hoping
to get some feedback on this sooner rather then later, though ;)


On Wed, Apr 1, 2009 at 7:34 AM, Sam Carleton
<scarleton@miltonstreet.com> wrote:


	My first operation I need to implement with Axis2/C is sort of
interesting...  I have an XML file on the server that needs to be
transformed and returned to the client.  The question is how best to do
this transformation?  
	
	A: Do I use the code generated by WSDL2C and in the call to the
operation populate the response using all the generated code and
allowing the generated code to serialize it into the SOAP message?
	
	B: Do I write some XSLT (which I do know) to do the
transformation in the services Invoke method?  
	
	I like option B better, but I have a feeling there is some
namespace and endpoint data that is magically done for me in option A.
Myself being new to this whole thing, which would be faster for me to
implement?  I am thinking A, but would the learning experience of
implementing B end up making my life a lot easier down the road?  As I
just posed, I have a lot more to learn about the whole WS-* stuff and to
figure out where and/or if that will fit into my solution, would option
B prevent me from using the other WS-* or do those things kick in
before/after the services invoke?
	
	Sam
	



Mime
View raw message