This XSL will transform from the AttractionDTO to AttractionDTO, basiically copy by way of xsl transformation Used a code generator for this xslt hence the bad coding style.
It at least gives you a working copy of what I was talking about in the previous posting. Here "n1" is being used instead of "base". Cheers, Dave ======================================== <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:n1="http://dmi.reffects.com" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://dmi.reffects.com" exclude-result-prefixes="n1 xs"> <xsl:output method="xml" encoding="UTF-8" indent="yes"/> <xsl:template match="/AttractionDTO"> <AttractionDTO> <xsl:for-each select="@attractionId"> <xsl:attribute name="attractionId"><xsl:value-of select="."/></xsl:attribute> </xsl:for-each> <xsl:for-each select="@createDate"> <xsl:attribute name="createDate"><xsl:value-of select="."/></xsl:attribute> </xsl:for-each> <xsl:for-each select="@emailAddress"> <xsl:attribute name="emailAddress"><xsl:value-of select="."/></xsl:attribute> </xsl:for-each> <xsl:for-each select="@keywords"> <xsl:attribute name="keywords"><xsl:value-of select="."/></xsl:attribute> </xsl:for-each> <xsl:for-each select="@paidAd"> <xsl:attribute name="paidAd"><xsl:value-of select="."/></xsl:attribute> </xsl:for-each> <xsl:for-each select="@viewable"> <xsl:attribute name="viewable"><xsl:value-of select="."/></xsl:attribute> </xsl:for-each> <xsl:for-each select="n1:couponDtos"> <couponDtos> <xsl:value-of select="."/> </couponDtos> </xsl:for-each> <xsl:for-each select="n1:diningNearbyAttractions"> <diningNearbyAttractions> <xsl:for-each select="n1:NearbyDTO"> <NearbyDTO> <xsl:for-each select="n1:appalacian"> <appalacian> <xsl:value-of select="."/> </appalacian> </xsl:for-each> <xsl:for-each select="n1:attractionId"> <attractionId> <xsl:value-of select="."/> </attractionId> </xsl:for-each> </NearbyDTO> </xsl:for-each> </diningNearbyAttractions> </xsl:for-each> </AttractionDTO> </xsl:template> </xsl:stylesheet> ========================================================== On Mon, 02 Apr 2007 15:04:32 -0400, Dave <[EMAIL PROTECTED]> wrote: >>3) Dotnet client serializes the array of objects as an xml string >Is the output of this the AttractionDTO XML data structure? > >If so in your xsl try this > ><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:i="http://www.w3.org/2001/XMLSchema-instance" > xmlns:base="http://dmi.reffects.com" > <=================================== > > ><xsl:variable name="tmp" select="//base:AttractionDTO/ <rest of line> ><=================================== > > >Cheers, >Dave > > > >On Mon, 2 Apr 2007 11:50:40 -0400 (EDT), Phillip Rhodes <[EMAIL PROTECTED]> >wrote: > >>David, >>Thanks for responding. >> >><< >>You are doing a transformation with the data that you received and then >>returning it to the Java Service??? >>>> >> >>No, I am keeping the transformation results in my dotnet client >>1) Dotnet client calls xfire web service: xfirewebservice.search(String >>keywords) >>2) Xfire does the search and returns an array of objects >>3) Dotnet client serializes the array of objects as an xml string >>4) Dotnet does a xsl transformation of serialized xml >> >> >>It sounds like we are trying to do opposite things. >> >>You (dotnet developer) writing a java client to DOTNET service >>Me (java developer) writing a dotnet client to JAVA service. >> >>Kind of funny! >>Phillip >> >> >>----- Original Message ----- >>From: "David Elliott" <[EMAIL PROTECTED]> >>To: [email protected] >>Sent: Friday, March 30, 2007 10:44:50 AM (GMT-0500) America/New_York >>Subject: RE: [xfire-user] xfire and dotnet, dotnet adds xmlns attrs >> >> >>Being a .NET developer, I understand your frustration as I am trying >>to figure out consuming a .NET service with a Java Client. >> >>I don't know that I fully understand the issue but if you provide a little >>more information I might be able to help. You said that you are consuming >>a Java Service using a .NET client. The next part is where I am not clear. >> >>You are doing a transformation with the data that you received and then >>returning it to the Java Service??? >> >>It appears with the XML that you provided that the transformation was >>successful >>by the creation of the AttractionDTO structure. >> >>Is the issue... >>1) with transforming the XML <out ...> to <AttractionDTO ...> >>2) transformation was successful but <AttractionDTO ...> contains the extra >>namespaces. >>3) other >> >>The other question I have is the Java Web method that is being consumed by >>.NET take >>the form of: >>public string MyMethod ( string xmlToTransform ); >>or >>public MyClass MyMethod ( MyClass clazzToTransform ); >> >> >> >>Cheers, >>Dave >> >> >>> Date: Thu, 29 Mar 2007 16:50:18 -0400 >>> From: [EMAIL PROTECTED] >>> To: [email protected] >>> Subject: [xfire-user] xfire and dotnet, dotnet adds xmlns attrs >>> >>> Hi, >>> I have an xfire service that I am consuming in dotnet. The dotnet consumer >>> is just doing an xsl transformation of the results from the xfire service. >>> >>> My problem is that the dotnet consumer is adding xmlns attributes to the >>> response. I know, I know, this is a xfire forum, but I was hoping that >>> there are other xfire/dotnet users out there that could point me to the >>> right solution. >>> >>> I have the axis tcpmon running, so I know that it's on the dot net side. I >>> trimmed out the xml from both sides. The extra xmlns=" >>> http://dmi.reffects.com " on the diningNearbyAttractions array is causing >>> me xsl tranformation hell. Still trying to figure out how to do a >>> tranformation of this stuff with all the xmlns=" http://dmi.reffects.com " >>> all over the place. >>> >>> Thanks for your help! Phillip >>> >>> Wire: >>> <out xmlns=" http://dmi.reffects.com " attractionId=" 238173 " >>> createDate="2005-12-16T15:21:50-05:00" >>> emailAddress=" [EMAIL PROTECTED] " >>> keywords="pittsburgh crafts pottery art squirrel hill forbes art design >>> clay" >>> paidAd="N" viewable="true"><couponDtos /> >>> <diningNearbyAttractions><NearbyDTO><appalacian>false</appalacian><attractionId>77645</attractionId></NearbyDTO> >>> >>> </diningNearbyAttractions> >>> </out> >>> >>> Dotnet: >>> <?xml version="1.0" encoding="utf-8"?> >>> <AttractionDTO xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance " >>> xmlns:xsd=" http://www.w3.org/2001/XMLSchema " >>> attractionId=" 238173 " createDate="2005-12-16T15:21:50-05:00" >>> emailAddress=" [EMAIL PROTECTED] " keywords="pittsburgh crafts pottery art >>> squirrel hill forbes art design clay" paidAd="N" viewable="true"> >>> <couponDtos xmlns=" http://dmi.reffects.com " /> >>> <diningNearbyAttractions xmlns=" http://dmi.reffects.com "> >>> <NearbyDTO><appalacian>false</appalacian><attractionId>77645</attractionId></NearbyDTO> >>> >>> </diningNearbyAttractions> >>> </AttractionDTO> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >> >> >> >>Take a break and play crossword puzzles - FREE! Play Now! >> >>--------------------------------------------------------------------- >>To unsubscribe from this list please visit: >> >> http://xircles.codehaus.org/manage_email >> > > >--------------------------------------------------------------------- >To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
