
Contributor II
2016-07-06
02:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
XPath unbound namespace exception, but only in exported job
Hi
I'm extracting the elements (updated, created, ignored, error) of a tSOAP response with tExtractCMLField. The structure of the response (sorry, I had to insert spaces in http and https, otherwise the URL seem to be deleted automatically when publishing the post):
The settings oft tExtractXMLField:
The job runs perfectly in TOS, but after exporting it as a standalone job, the command prompt reports the following error:
Exception occurred evaluting XPath: /SOAP-ENV:Envelope/SOAP-ENV:Body/ns1:massUpdateResponse/massUpdateResult. Exception: XPath expression uses unbound namespace prefix ns1
What's causing this error? And why doesn't it occur when running the job in TOS?
Thanks
Tom
I'm extracting the elements (updated, created, ignored, error) of a tSOAP response with tExtractCMLField. The structure of the response (sorry, I had to insert spaces in http and https, otherwise the URL seem to be deleted automatically when publishing the post):
<SOAP-ENV:Envelope xmlns:SOAP-ENV="h t t p://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="h t t p s://mycompany.com/soap.php/soap/profile">
<SOAP-ENV:Body>
<ns1:massUpdateResponse>
<massUpdateResult>
<updated>
<items>
<item>
<key>1687781</key>
<value>2514652</value>
</item>
<item>
<key>1687779</key>
<value>2333599</value>
</item>
<item>
<key>1687780</key>
<value>2507277</value>
</item>
<item>
<key>1687793</key>
<value>2218613</value>
</item>
</items>
</updated>
<created>
<items/>
</created>
<ignored>
<item>487841545</item>
<item>467944241</item>
</ignored>
<error/>
</massUpdateResult>
</ns1:massUpdateResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The settings oft tExtractXMLField:
The job runs perfectly in TOS, but after exporting it as a standalone job, the command prompt reports the following error:
Exception occurred evaluting XPath: /SOAP-ENV:Envelope/SOAP-ENV:Body/ns1:massUpdateResponse/massUpdateResult. Exception: XPath expression uses unbound namespace prefix ns1
What's causing this error? And why doesn't it occur when running the job in TOS?
Thanks
Tom
550 Views
4 Replies

Anonymous
Not applicable
2016-07-08
08:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Can you please upload a screenshot of your job? tSOAP returns a string response in Body column, tExtractXMLField should extract values from Body field, however, I see it is 'Soap' field in your component settings, is it a custom component?
Regards
Shong
Can you please upload a screenshot of your job? tSOAP returns a string response in Body column, tExtractXMLField should extract values from Body field, however, I see it is 'Soap' field in your component settings, is it a custom component?
Regards
Shong
550 Views

Contributor II
2016-07-08
10:05 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The first screenshot shows the whole job. As you can see, it runs without any error in TOS (i get the error only after publishing the Java files).
I don't use any custom components, just the regular ones from TOS. But I've set the tSOAP component to generate the output in a document, that's why the setting of tExtractXMLField shows 'Soap'. Actually, I didn't figure out how to extract all the wanted fields, so I use tExtractXMLField to extract the whole section <ns1:massUpdateResponse>
Afterwards I use tXMLMapOut (second screenshot) to loop through the items of <updated>, <ignored>, <created> and <error> and send each row three different tMSSqlRow components.
I guess there would be more elegant ways to do that, but it seems to work (at least when running the job in TOS...)
Kind regards
Tom
btw: everytime I'm publishing a post, all the images are deleted. Is that a known issue or am I doing something wrong?
I don't use any custom components, just the regular ones from TOS. But I've set the tSOAP component to generate the output in a document, that's why the setting of tExtractXMLField shows 'Soap'. Actually, I didn't figure out how to extract all the wanted fields, so I use tExtractXMLField to extract the whole section <ns1:massUpdateResponse>
Afterwards I use tXMLMapOut (second screenshot) to loop through the items of <updated>, <ignored>, <created> and <error> and send each row three different tMSSqlRow components.
I guess there would be more elegant ways to do that, but it seems to work (at least when running the job in TOS...)
Kind regards
Tom
btw: everytime I'm publishing a post, all the images are deleted. Is that a known issue or am I doing something wrong?
550 Views

Contributor II
2016-07-18
08:18 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This problem is still unsolved.
Any suggestions?
Any suggestions?
550 Views

Anonymous
Not applicable
2016-08-05
02:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Can you try the below options either of the one and see whether you are still getting the issue or not.
--> On the SOAP-ENV:Envelope right click and add a default names space "env" and prefix the same with "env" .
OR
--> can you change below one and see
xmlns
OAP-ENV="h t t p://schemas.xmlsoap.org/soap/envelope/" -->
xmlns
OAP-ENV="h t t p://www.w3.org/2003/05/soap-envelope"
Please let me know how it goes..
Can you try the below options either of the one and see whether you are still getting the issue or not.
--> On the SOAP-ENV:Envelope right click and add a default names space "env" and prefix the same with "env" .
OR
--> can you change below one and see
xmlns
Please let me know how it goes..
550 Views
