osdir.com
mailing list archive F.A.Q. -since 2001!

low ad version

Subject: RE: remove xmlns attribute from xfire output xml?
- msg#00286

List: java.xfire.user

java.xfire.user Navigation:
Date: Prev Next Date Index Thread: Prev Next Thread Index

Website Speed Performance Monitoring

I'm failing to trade in xmlns attributes for prefixes using .aegis.xml
files.

Based in the doc on the web, I added:

<mappings xmlns:btrnm="urn:com.basistech.rnm">
<mapping name="btrnm:Transliteration">
</mapping>
</mappings>

However, I still get explicit xmlns attributes (and no prefixes) on the
elements on the wire.

-----Original Message-----
From: Christopher Moesel [mailto:Christopher_Moesel@xxxxxxxx]
Sent: Thursday, December 21, 2006 12:42 PM
To: user@xxxxxxxxxxxxxxxxxx
Subject: RE: [xfire-user] remove xmlns attribute from xfire output xml?

I suspect that it's setting the xmlns on each element in AttractionDTO
because there's no default ns for it to inherit from. Try declaring an
xmlns on the AttractionDTO element itself. That will probably remove
the xmlns from its children since they now have an xmlns to inherit.

The elements within physicalAddressDTO do not have xmlns specified on
them because it's already specified on the physicalAddressDTO element
itself.

-Chris

-----Original Message-----
From: Phillip Rhodes [mailto:prhodes@xxxxxxxxxxxxx]
Sent: Thursday, December 21, 2006 12:32 PM
To: user@xxxxxxxxxxxxxxxxxx
Subject: [xfire-user] remove xmlns attribute from xfire output xml?

Hello,
The consumer of my xfire service has requested that I remove the xmlns
attribute from the child elements of AttractionDTO. If you see below,
xfire is not setting the xmlns attribute for child elements of the
physicalAddressDTO.

Why would xfire set the xmlns attribute for the AttractionDTO object,
and not the physicalAddressDTO?

The reason we would like to do this is that we are doing an XSL
transformation of what xfire returns and this makes xpath expressions
easier.


Thanks, xfire is rocking for me.
Phillip

Example xfire xml:

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfAttractionDTO
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
<AttractionDTO>
<attractionId
xmlns="http://dto.dmi.reffects.com";>78059</attractionId>
<bookItUrl xsi:nil="true"
xmlns="http://dto.dmi.reffects.com"/>
<couponDtos xsi:nil="true"
xmlns="http://dto.dmi.reffects.com"/>
<diningNearbyAttractions xsi:nil="true"
xmlns="http://dto.dmi.reffects.com"/>
<emailAddress xsi:nil="true"
xmlns="http://dto.dmi.reffects.com"/>
<freeSetting xsi:nil="true"
xmlns="http://dto.dmi.reffects.com"/>
<imageDTOs xsi:nil="true"
xmlns="http://dto.dmi.reffects.com"/>
<imageGalleryDTOs xsi:nil="true"
xmlns="http://dto.dmi.reffects.com"/>
<keywords xmlns="http://dto.dmi.reffects.com";>allegheny
biking trail
bikes</keywords>
<lodgingNearbyAttractions xsi:nil="true"
xmlns="http://dto.dmi.reffects.com"/>
<mailingAddress xsi:nil="true"
xmlns="http://dto.dmi.reffects.com"/>
<otherNearbyAttractions xsi:nil="true"
xmlns="http://dto.dmi.reffects.com"/>
<paidAd xmlns="http://dto.dmi.reffects.com";>N</paidAd>
<photoUrl xsi:nil="true"
xmlns="http://dto.dmi.reffects.com"/>
<physicalAddressDTO xmlns="http://dto.dmi.reffects.com";>
<addressId>78059</addressId>
<faxNumber xsi:nil="true"/>
<handicapAccess>N</handicapAccess>
<latitude>40.457548</latitude>
<longitude>-79.741527</longitude>

<longitudeLatitudeOverride>false</longitudeLatitudeOverride>
<phoneNumber>724-733-4665</phoneNumber>
<streetAddress>675 Old Frankstown
Rd.</streetAddress>
<streetAddress2 xsi:nil="true"/>
<zipCodeDTO>
<city>PITTSBURGH</city>
<state>PA</state>
<zipCode>15239</zipCode>
</zipCodeDTO>
</physicalAddressDTO>
<printAdvertisingUrl xsi:nil="true"
xmlns="http://dto.dmi.reffects.com"/>
<source xsi:nil="true"
xmlns="http://dto.dmi.reffects.com"/>
<url xsi:nil="true"
xmlns="http://dto.dmi.reffects.com"/>
<viewable
xmlns="http://dto.dmi.reffects.com";>true</viewable>
<weatherDTO xsi:nil="true"
xmlns="http://dto.dmi.reffects.com"/>
</AttractionDTO>
</ArrayOfAttractionDTO>

---------------------------------------------------------------------
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




Thread at a glance:

Previous Message by Date:

RE: remove xmlns attribute from xfire output xml?

I suspect that it's setting the xmlns on each element in AttractionDTO because there's no default ns for it to inherit from. Try declaring an xmlns on the AttractionDTO element itself. That will probably remove the xmlns from its children since they now have an xmlns to inherit. The elements within physicalAddressDTO do not have xmlns specified on them because it's already specified on the physicalAddressDTO element itself. -Chris -----Original Message----- From: Phillip Rhodes [mailto:prhodes@xxxxxxxxxxxxx] Sent: Thursday, December 21, 2006 12:32 PM To: user@xxxxxxxxxxxxxxxxxx Subject: [xfire-user] remove xmlns attribute from xfire output xml? Hello, The consumer of my xfire service has requested that I remove the xmlns attribute from the child elements of AttractionDTO. If you see below, xfire is not setting the xmlns attribute for child elements of the physicalAddressDTO. Why would xfire set the xmlns attribute for the AttractionDTO object, and not the physicalAddressDTO? The reason we would like to do this is that we are doing an XSL transformation of what xfire returns and this makes xpath expressions easier. Thanks, xfire is rocking for me. Phillip Example xfire xml: <?xml version="1.0" encoding="utf-8"?> <ArrayOfAttractionDTO xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <AttractionDTO> <attractionId xmlns="http://dto.dmi.reffects.com">78059</attractionId> <bookItUrl xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <couponDtos xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <diningNearbyAttractions xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <emailAddress xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <freeSetting xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <imageDTOs xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <imageGalleryDTOs xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <keywords xmlns="http://dto.dmi.reffects.com">allegheny biking trail bikes</keywords> <lodgingNearbyAttractions xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <mailingAddress xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <otherNearbyAttractions xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <paidAd xmlns="http://dto.dmi.reffects.com">N</paidAd> <photoUrl xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <physicalAddressDTO xmlns="http://dto.dmi.reffects.com"> <addressId>78059</addressId> <faxNumber xsi:nil="true"/> <handicapAccess>N</handicapAccess> <latitude>40.457548</latitude> <longitude>-79.741527</longitude> <longitudeLatitudeOverride>false</longitudeLatitudeOverride> <phoneNumber>724-733-4665</phoneNumber> <streetAddress>675 Old Frankstown Rd.</streetAddress> <streetAddress2 xsi:nil="true"/> <zipCodeDTO> <city>PITTSBURGH</city> <state>PA</state> <zipCode>15239</zipCode> </zipCodeDTO> </physicalAddressDTO> <printAdvertisingUrl xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <source xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <url xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <viewable xmlns="http://dto.dmi.reffects.com">true</viewable> <weatherDTO xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> </AttractionDTO> </ArrayOfAttractionDTO> --------------------------------------------------------------------- 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

Next Message by Date:

Re: WoodStox exception with XFire 1.2.3

You probably try to send data which contains character which isn't allowed in xml document. Maybe try to check your objects values with debugger. On 12/21/06, Steve T <steven.terrell@xxxxxxxxxxxxxxxx> wrote: I am trying to expose an existing class as a web service using XFire 1.2.3. XFire is integrated into my current application, which runs under Tomcat 5.5. I generated the WSDL, and used that to generate client code using XFire again. I called my service, but on the server side I get this exception: MIT: 36973 [http-8080-Processor25] ERROR org.codehaus.xfire.handler.DefaultFaultHandler - Fault occurred! org.codehaus.xfire.XFireRuntimeException: Error writing document.. Nested exception is com.ctc.wstx.exc.WstxIOException: Invalid null character in text to output com.ctc.wstx.exc.WstxIOException: Invalid null character in text to output at com.ctc.wstx.sw.BaseStreamWriter.writeCharacters (BaseStreamWriter.java:444) at org.codehaus.xfire.aegis.stax.ElementWriter.writeValue (ElementWriter.java:138) at org.codehaus.xfire.aegis.AbstractMessageWriter.writeValueAsCharacter (AbstractMessageWriter.java:76) at org.codehaus.xfire.aegis.type.basic.CharacterType.writeObject (CharacterType.java:20) Does anyone have any clue as to what my problem is? All help would be greatly appreciated! --Steve --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email -- ----- When one of our products stops working, we'll blame another vendor within 24 hours. --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email

Previous Message by Thread:

RE: remove xmlns attribute from xfire output xml?

I suspect that it's setting the xmlns on each element in AttractionDTO because there's no default ns for it to inherit from. Try declaring an xmlns on the AttractionDTO element itself. That will probably remove the xmlns from its children since they now have an xmlns to inherit. The elements within physicalAddressDTO do not have xmlns specified on them because it's already specified on the physicalAddressDTO element itself. -Chris -----Original Message----- From: Phillip Rhodes [mailto:prhodes@xxxxxxxxxxxxx] Sent: Thursday, December 21, 2006 12:32 PM To: user@xxxxxxxxxxxxxxxxxx Subject: [xfire-user] remove xmlns attribute from xfire output xml? Hello, The consumer of my xfire service has requested that I remove the xmlns attribute from the child elements of AttractionDTO. If you see below, xfire is not setting the xmlns attribute for child elements of the physicalAddressDTO. Why would xfire set the xmlns attribute for the AttractionDTO object, and not the physicalAddressDTO? The reason we would like to do this is that we are doing an XSL transformation of what xfire returns and this makes xpath expressions easier. Thanks, xfire is rocking for me. Phillip Example xfire xml: <?xml version="1.0" encoding="utf-8"?> <ArrayOfAttractionDTO xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <AttractionDTO> <attractionId xmlns="http://dto.dmi.reffects.com">78059</attractionId> <bookItUrl xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <couponDtos xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <diningNearbyAttractions xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <emailAddress xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <freeSetting xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <imageDTOs xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <imageGalleryDTOs xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <keywords xmlns="http://dto.dmi.reffects.com">allegheny biking trail bikes</keywords> <lodgingNearbyAttractions xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <mailingAddress xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <otherNearbyAttractions xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <paidAd xmlns="http://dto.dmi.reffects.com">N</paidAd> <photoUrl xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <physicalAddressDTO xmlns="http://dto.dmi.reffects.com"> <addressId>78059</addressId> <faxNumber xsi:nil="true"/> <handicapAccess>N</handicapAccess> <latitude>40.457548</latitude> <longitude>-79.741527</longitude> <longitudeLatitudeOverride>false</longitudeLatitudeOverride> <phoneNumber>724-733-4665</phoneNumber> <streetAddress>675 Old Frankstown Rd.</streetAddress> <streetAddress2 xsi:nil="true"/> <zipCodeDTO> <city>PITTSBURGH</city> <state>PA</state> <zipCode>15239</zipCode> </zipCodeDTO> </physicalAddressDTO> <printAdvertisingUrl xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <source xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <url xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> <viewable xmlns="http://dto.dmi.reffects.com">true</viewable> <weatherDTO xsi:nil="true" xmlns="http://dto.dmi.reffects.com"/> </AttractionDTO> </ArrayOfAttractionDTO> --------------------------------------------------------------------- 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

Next Message by Thread:

RE: remove xmlns attribute from xfire output xml?

More information: If I use the following, I get the prefix I want for the transliterations element, but not for the others. Is this 'as designed'? <mappings xmlns:btrnm="urn:com.basistech.rnm"> <mapping name="btrnm:Name"> <property name='script' ignore='true'/> <property name='language' ignore='true'/> <!-- without this, the XML must contain an array, even if the array is zero-length. --> <property name='transliterations' minOccurs='0' nillable='true' mappedName='btrnm:name' /> </mapping> </mappings> --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email

Home | News | Sitemap | FAQ | advertise | OSDir is an Inevitable website. GBiz is too!