You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by madppiper <pa...@mutschler.ch> on 2008/12/09 19:40:00 UTC
Simple Method String error
Hey there,
I got quite an unusual error here. I am trying to parse a url to a java
class that I created. The url is created dynamically and then parsed to
another method of mine... :
<!-- Toolset Function -->
<simple-method method-name="generateProductPriceImagesAll"
short-description="Refresh the Productprice Images for all Products">
<!-- Retrieve all Products from Entity Engine -->
<entity-condition entity-name="ProductsAndPrices"
list-name="productList">
</entity-condition>
<!-- Run through Productlist and generate the ProductPriceImages -->
<iterate entry-name="products" list-name="productList">
<if>
<condition>
<not>
<if-empty field-name="products.productName"></if-empty>
</not>
</condition>
<then>
<!-- Generate Product Map File -->
<set field="productOutMap.message"
value="imgname=${products.productId}_price.png&v1=${products.productPrice}&v2=${products.productPrice}"
type="PlainString" />
<call-service service-name="generatePriceImagesAll2"
in-map-name="productOutMap">
</call-service>
</then>
</if>
</iterate>
</simple-method>
This should work, but the following error arises on call:
Service dispatcher threw an exceptionError running simple method
[generateProductPriceImagesAll] in XML file
[org/brandsparadise/solr/SimpleMethodServices.xml]: (Could not parse XML
file (The reference to entity "v1" must end with the ';' delimiter.))
--
View this message in context: http://www.nabble.com/Simple-Method-String-error-tp20920803p20920803.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Simple Method String error
Posted by Jacques Le Roux <ja...@les7arts.com>.
http://www.w3.org/TR/REC-xml/#dt-chardata
Jacques
From: "madppiper" <pa...@mutschler.ch>
>
> Right, and how do i do that?
>
> I tried using:
>
> value="imgname=${products.productId}_price.png\&v1=${products.productPrice}\&v2=${products.productPrice}"
>
> since a backslash is the usual way of escaping. But this won't work...
>
>
> Adrian Crum wrote:
>>
>> You need to escape the & characters:
>>
>> value="imgname=${products.productId}_price.png&v1=${products.productPrice}&v2=${products.productPrice}"
>>
>> -Adrian
>>
>>
>> madppiper wrote:
>>> Hey there,
>>>
>>> I got quite an unusual error here. I am trying to parse a url to a java
>>> class that I created. The url is created dynamically and then parsed to
>>> another method of mine... :
>>>
>>> <!-- Toolset Function -->
>>> <simple-method method-name="generateProductPriceImagesAll"
>>> short-description="Refresh the Productprice Images for all Products">
>>>
>>> <!-- Retrieve all Products from Entity Engine -->
>>>
>>> <entity-condition entity-name="ProductsAndPrices"
>>> list-name="productList">
>>> </entity-condition>
>>>
>>>
>>>
>>> <!-- Run through Productlist and generate the ProductPriceImages -->
>>>
>>> <iterate entry-name="products" list-name="productList">
>>> <if>
>>> <condition>
>>> <not>
>>> <if-empty field-name="products.productName"></if-empty>
>>> </not>
>>> </condition>
>>> <then>
>>>
>>> <!-- Generate Product Map File -->
>>>
>>> <set field="productOutMap.message"
>>>
>>> value="imgname=${products.productId}_price.png&v1=${products.productPrice}&v2=${products.productPrice}"
>>>
>>> type="PlainString" />
>>>
>>>
>>> <call-service service-name="generatePriceImagesAll2"
>>> in-map-name="productOutMap">
>>> </call-service>
>>>
>>>
>>> </then>
>>> </if>
>>> </iterate>
>>>
>>>
>>>
>>> </simple-method>
>>>
>>>
>>>
>>>
>>>
>>> This should work, but the following error arises on call:
>>>
>>>
>>> Service dispatcher threw an exceptionError running simple method
>>> [generateProductPriceImagesAll] in XML file
>>> [org/brandsparadise/solr/SimpleMethodServices.xml]: (Could not parse XML
>>> file (The reference to entity "v1" must end with the ';' delimiter.))
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Simple-Method-String-error-tp20920803p20921780.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
Re: Simple Method String error
Posted by Adrian Crum <ad...@hlmksw.com>.
madppiper wrote:
> yours
> value="imgname=${products.productId}_price.png&v1=${products.productPrice}&v2=${products.productPrice}"
That was not in my reply. I repeat:
value="imgname=${products.productId}_price.png&v1=${products.productPrice}&v2=${products.productPrice}"
-Adrian
Re: Simple Method String error
Posted by Christopher Vollick <ch...@emforium.com>.
You must be using a mail client that is rendering HTML, or nabble.
In yours you had the ampersand character. He actually had the
ampersand character then amp;.
I'm not sure what my client does with escaping, so I'll try three
things.
You need to replace the ampersands with
&
&amp;
"Ampersand Character"+"amp;"
I'm not sure which of the above will appear right, but I hope I got
the idea across.
Re: Simple Method String error
Posted by BJ Freeman <bj...@free-man.net>.
I use a text based email.
I can see the difference.
madppiper sent the following on 12/9/2008 11:59 AM:
> looking really close here, but even when I go through each character one by
> one, I cannot find the darnest difference:
>
>
> yours
> value="imgname=${products.productId}_price.png&v1=${products.productPrice}&v2=${products.productPrice}"
>
> mine
> value="imgname=${products.productId}_price.png&v1=${products.productPrice}&v2=${products.productPrice}"
>
>
> ;)
Re: Simple Method String error
Posted by madppiper <pa...@mutschler.ch>.
looking really close here, but even when I go through each character one by
one, I cannot find the darnest difference:
yours
value="imgname=${products.productId}_price.png&v1=${products.productPrice}&v2=${products.productPrice}"
mine
value="imgname=${products.productId}_price.png&v1=${products.productPrice}&v2=${products.productPrice}"
;)
--
View this message in context: http://www.nabble.com/Simple-Method-String-error-tp20920803p20922240.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Simple Method String error
Posted by Adrian Crum <ad...@hlmksw.com>.
I showed you how. Look closer at my reply.
-Adrian
madppiper wrote:
> Right, and how do i do that?
>
> I tried using:
>
> value="imgname=${products.productId}_price.png\&v1=${products.productPrice}\&v2=${products.productPrice}"
>
> since a backslash is the usual way of escaping. But this won't work...
>
>
> Adrian Crum wrote:
>> You need to escape the & characters:
>>
>> value="imgname=${products.productId}_price.png&v1=${products.productPrice}&v2=${products.productPrice}"
>>
>> -Adrian
>>
>>
>> madppiper wrote:
>>> Hey there,
>>>
>>> I got quite an unusual error here. I am trying to parse a url to a java
>>> class that I created. The url is created dynamically and then parsed to
>>> another method of mine... :
>>>
>>> <!-- Toolset Function -->
>>> <simple-method method-name="generateProductPriceImagesAll"
>>> short-description="Refresh the Productprice Images for all Products">
>>>
>>> <!-- Retrieve all Products from Entity Engine -->
>>>
>>> <entity-condition entity-name="ProductsAndPrices"
>>> list-name="productList">
>>> </entity-condition>
>>>
>>>
>>>
>>> <!-- Run through Productlist and generate the ProductPriceImages -->
>>>
>>> <iterate entry-name="products" list-name="productList">
>>> <if>
>>> <condition>
>>> <not>
>>> <if-empty field-name="products.productName"></if-empty>
>>> </not>
>>> </condition>
>>> <then>
>>>
>>> <!-- Generate Product Map File -->
>>>
>>> <set field="productOutMap.message"
>>>
>>> value="imgname=${products.productId}_price.png&v1=${products.productPrice}&v2=${products.productPrice}"
>>>
>>> type="PlainString" />
>>>
>>>
>>> <call-service service-name="generatePriceImagesAll2"
>>> in-map-name="productOutMap">
>>> </call-service>
>>>
>>>
>>> </then>
>>> </if>
>>> </iterate>
>>>
>>>
>>>
>>> </simple-method>
>>>
>>>
>>>
>>>
>>>
>>> This should work, but the following error arises on call:
>>>
>>>
>>> Service dispatcher threw an exceptionError running simple method
>>> [generateProductPriceImagesAll] in XML file
>>> [org/brandsparadise/solr/SimpleMethodServices.xml]: (Could not parse XML
>>> file (The reference to entity "v1" must end with the ';' delimiter.))
>>
>
Re: Simple Method String error
Posted by madppiper <pa...@mutschler.ch>.
Right, and how do i do that?
I tried using:
value="imgname=${products.productId}_price.png\&v1=${products.productPrice}\&v2=${products.productPrice}"
since a backslash is the usual way of escaping. But this won't work...
Adrian Crum wrote:
>
> You need to escape the & characters:
>
> value="imgname=${products.productId}_price.png&v1=${products.productPrice}&v2=${products.productPrice}"
>
> -Adrian
>
>
> madppiper wrote:
>> Hey there,
>>
>> I got quite an unusual error here. I am trying to parse a url to a java
>> class that I created. The url is created dynamically and then parsed to
>> another method of mine... :
>>
>> <!-- Toolset Function -->
>> <simple-method method-name="generateProductPriceImagesAll"
>> short-description="Refresh the Productprice Images for all Products">
>>
>> <!-- Retrieve all Products from Entity Engine -->
>>
>> <entity-condition entity-name="ProductsAndPrices"
>> list-name="productList">
>> </entity-condition>
>>
>>
>>
>> <!-- Run through Productlist and generate the ProductPriceImages -->
>>
>> <iterate entry-name="products" list-name="productList">
>> <if>
>> <condition>
>> <not>
>> <if-empty field-name="products.productName"></if-empty>
>> </not>
>> </condition>
>> <then>
>>
>> <!-- Generate Product Map File -->
>>
>> <set field="productOutMap.message"
>>
>> value="imgname=${products.productId}_price.png&v1=${products.productPrice}&v2=${products.productPrice}"
>>
>> type="PlainString" />
>>
>>
>> <call-service service-name="generatePriceImagesAll2"
>> in-map-name="productOutMap">
>> </call-service>
>>
>>
>> </then>
>> </if>
>> </iterate>
>>
>>
>>
>> </simple-method>
>>
>>
>>
>>
>>
>> This should work, but the following error arises on call:
>>
>>
>> Service dispatcher threw an exceptionError running simple method
>> [generateProductPriceImagesAll] in XML file
>> [org/brandsparadise/solr/SimpleMethodServices.xml]: (Could not parse XML
>> file (The reference to entity "v1" must end with the ';' delimiter.))
>
>
--
View this message in context: http://www.nabble.com/Simple-Method-String-error-tp20920803p20921780.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Simple Method String error
Posted by Adrian Crum <ad...@hlmksw.com>.
You need to escape the & characters:
value="imgname=${products.productId}_price.png&v1=${products.productPrice}&v2=${products.productPrice}"
-Adrian
madppiper wrote:
> Hey there,
>
> I got quite an unusual error here. I am trying to parse a url to a java
> class that I created. The url is created dynamically and then parsed to
> another method of mine... :
>
> <!-- Toolset Function -->
> <simple-method method-name="generateProductPriceImagesAll"
> short-description="Refresh the Productprice Images for all Products">
>
> <!-- Retrieve all Products from Entity Engine -->
>
> <entity-condition entity-name="ProductsAndPrices"
> list-name="productList">
> </entity-condition>
>
>
>
> <!-- Run through Productlist and generate the ProductPriceImages -->
>
> <iterate entry-name="products" list-name="productList">
> <if>
> <condition>
> <not>
> <if-empty field-name="products.productName"></if-empty>
> </not>
> </condition>
> <then>
>
> <!-- Generate Product Map File -->
>
> <set field="productOutMap.message"
>
> value="imgname=${products.productId}_price.png&v1=${products.productPrice}&v2=${products.productPrice}"
>
> type="PlainString" />
>
>
> <call-service service-name="generatePriceImagesAll2"
> in-map-name="productOutMap">
> </call-service>
>
>
> </then>
> </if>
> </iterate>
>
>
>
> </simple-method>
>
>
>
>
>
> This should work, but the following error arises on call:
>
>
> Service dispatcher threw an exceptionError running simple method
> [generateProductPriceImagesAll] in XML file
> [org/brandsparadise/solr/SimpleMethodServices.xml]: (Could not parse XML
> file (The reference to entity "v1" must end with the ';' delimiter.))