BizTalk Server Orchestration - Problem using XPATH in message assignment.

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > February 2005 > Problem using XPATH in message assignment.





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Problem using XPATH in message assignment.
jakob-ch

2005-02-21, 6: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 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
Ben Jiang

2005-02-21, 8:48 pm

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

jakob-ch@fc.dsv.su.se

2005-02-23, 7:46 am

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]

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com