Problem using XPATH in message assignment.
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server Orchestration > Problem using XPATH in message assignment.




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

jakob-ch is offline     Problem using XPATH in message assignment.  
jakob-ch


View Ip Address Report This Message To A Moderator Edit/Delete Message


Click Here to See the Profile for jakob-ch Click here to Send jakob-ch a Private Message Find more posts by jakob-ch Add jakob-ch to your buddy list
 
02-21-05 11:49 AM

Hi!

In my orchestration I have a simple xsd schema looking like this:
   
  ...
  <xs:element name="InboundPO">
   <xs:complexType>
    <xs:sequence>
     <xs:element name="customerid" type="xs:string" /> 
    </xs:sequence>
   </xs:complexType>
  </xs:element>
  ...

I have a webservice that has a method looking like this:
  ...
  public class InboundPO
  { 
    ...//info about a customer tec.
    public string customerid;
  }
  
  [WebMethod]
  public InboundPO checkcustomer(InboundPO inb)
  {
   ...//simple control of customerid etc.
   return inb;
  }
  ...

In the orchestration I create a message whith a message assignment shape and
 then I send it to the web service.
When I try this the message gets stuck in the web service, and according to 
HAT there is an error in the xml document. I checked the xml document and th
ere is nothing wrong with it because if I send it to a non-webservice port e
verything runs smoothly.

Additional information: Yes, I´m aware that the prefered way to do this is t
o use the transform shape, and then it is a simple task of correlating the n
odes and elements in the xsd's with each other. But what if that is not an a
lternative(transform doesn´t work with BPEL). My limited knowledge within th
is area has led me to use Xpath but either I am doing it wrong or this simpl
y can not be done.

This is what I tried in the expression area in the message assignment shape:

Message_to_web_service.inb = xpath(InboundPO_message, "/*[local-name()='Inbo
undPO' and namespace-uri()='http://BPELProjectBTS.InboundPO']");

Where InboundPO_message is an XML document conforming to the XSD as above an
d the .inb is what the web service wants.

Do anyone know how to solve this or have hints of pages where addresing simu
lar issues?

Cincerly 

Jakob




[ Post a follow-up to this message ]



    RE: Problem using XPATH in message assignment.  
Ben Jiang


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-22-05 01:48 AM

Check your web method input message type? - The Web method input parameter
needs to declare as XmlNode, and in orchestration send as Xml.XmlDocument.

Look like you pass string in your orchestration and web method input param
as xml document.

Hope this may help.

Cheers
Ben Jiang

"jakob-ch" wrote:

>
> Hi!
>
> In my orchestration I have a simple xsd schema looking like this:
>
> 	...
> <xs:element name="InboundPO">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="customerid" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> 	...
>
> I have a webservice that has a method looking like this:
> 	...
> public class InboundPO
> {
> 	...//info about a customer tec.
> public string customerid;
> }
>
> [WebMethod]
> public InboundPO checkcustomer(InboundPO inb)
> {
> 	...//simple control of customerid etc.
> return inb;
> }
> 	...
>
> In the orchestration I create a message whith a message assignment
> shape and then I send it to the web service.
> When I try this the message gets stuck in the web service, and
> according to HAT there is an error in the xml document. I checked the
> xml document and there is nothing wrong with it because if I send it to
> a non-webservice port everything runs smoothly.
>
> Additional information: Yes, I´m aware that the prefered way to do this
> is to use the transform shape, and then it is a simple task of
> correlating the nodes and elements in the xsd's with each other. But
> what if that is not an alternative(transform doesn´t work with BPEL).
> My limited knowledge within this area has led me to use Xpath but
> either I am doing it wrong or this simply can not be done.
>
> This is what I tried in the expression area in the message assignment
> shape:
>
> Message_to_web_service.inb = xpath(InboundPO_message,
> "/*[local-name()='InboundPO' and
> namespace-uri()='http://BPELProjectBTS.InboundPO']");
>
> Where InboundPO_message is an XML document conforming to the XSD as
> above and the .inb is what the web service wants.
>
> Do anyone know how to solve this or have hints of pages where addresing
> simular issues?
>
> Cincerly
>
> Jakob
>
>
>
> --
> jakob-ch
> ------------------------------------------------------------------------
> Posted via http://www.webservertalk.com
> ------------------------------------------------------------------------
> View this thread: http://www.webservertalk.com/message927614.html
>
>





[ Post a follow-up to this message ]



    Re: Problem using XPATH in message assignment.  
jakob-ch@fc.dsv.su.se


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-23-05 12:46 PM

Of course your right. I have made so many changes in my orchestration i
was really lost:-)

Thanks for the help

/Jakob


Ben Jiang wrote:
> Check your web method input message type? - The Web method input
parameter
> needs to declare as XmlNode, and in orchestration send as
Xml.XmlDocument.
>
> Look like you pass string in your orchestration and web method input
param[vbcol=seagreen]
> as xml document.
>
> Hope this may help.
>
> Cheers
> Ben Jiang
>
> "jakob-ch" wrote:
> 
the[vbcol=seagreen] 
it to[vbcol=seagreen] 
this[vbcol=seagreen] 
But[vbcol=seagreen] 
BPEL).[vbcol=seagreen] 
assignment[vbcol=seagreen] 
addresing[vbcol=seagreen] 
------------------------------------------------------------------------[vbcol=seagreen] 
------------------------------------------------------------------------[vbcol=seagreen] 






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:26 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register