Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8040445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:53:56+00:00 2026-06-05T03:53:56+00:00

I have defined a Proxy Service on my WSO2 ESB that transforms incoming messages

  • 0

I have defined a Proxy Service on my WSO2 ESB that transforms incoming messages using XQuery (I am following Sample 390).

The problem is that the ESB transforms the variable payload, which is defined as ELEMENT, into an XQuery vairable defined as document-node(). But, my XQuery accepts only element() :

declare variable $payload as element(ns:payload) external;

Is there any way howto define the ESB variable or modify the variable expression so that the input into the XQuery is element?

I tried :

<xquery key="xquery-key-req">
<variable xmlns:nms="http://my.nms.com" name="payload" expression="$body/nms:payload" type="ELEMENT" />
</xquery>

But this returns the following error:

Required item type of first argument of xf:xqueryRequest() is element({http://my.nms.com}payload); supplied value has item type document-node(element({http://my.nms.com}payload)) 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T03:53:58+00:00Added an answer on June 5, 2026 at 3:53 am

    Well, you either have to change your query to expect a document node, or you have to change the client of the query to supply an element. I don’t know ESB so I don’t know how to make the change there, but changing the query is easy enough:

    declare variable $payloadDoc as document-node(element(ns:payload)) external;
    declare variable $payload as element(ns:payload) := $payloadDoc/ns:payload;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have set up a pass through proxy service in WSO2 ESB which connects
I have some code that runs fine when I have a web proxy defined
As per the following article, I have defined my service contract as http://blogs.msdn.com/b/endpoint/archive/2010/11/13/simplified-asynchronous-programming-model-in-wcf-with-async-await.aspx [ServiceContract]
I have defined a config section in my app.config in the following way: <?xml
I have defined a custom IPrincipal and custom IIdentity based on a website that
I have defined a fieldset in HTML, and applied the following (simple) CSS rules
I have defined a small DSL that is mostly written in the form of
I have an apache server that works as a reverse proxy in our DMZ.
My computer have a proxy server defined globally (in internet options configuration). I have
I have WCF bassicHttpBiding service . My web functions are returning some custom defined

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.