Fn-bea:inlinedXML
Hi. I'm having problems trying to convert a string to a XML document in order to validate it.
This is my XML document:
<soa:execute xmlns:soa="http://com/accenture/tim/soa">
<soa:data><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<customer>
<name>customer name</name>
</customer>
]]>
</soa:data>
</soa:execute>
That is actually inside a SOAP Body and I'm trying to use the following XPath
fn-bea:inlinedXML($body/soa:execute/soa:data/text())
to create de XML based on the element 'soa:data' (which it is defined as string) but it's not working.
Does anyone have an idea of how to do that?
I do not have the error string right now but it's something complaining about a wrong type.
That function accepts only xs:string as argument.
Thank you!
Edited by filipems at 08/20/2007 4:20 PM
Edited by filipems at 08/20/2007 4:21 PM
Edited by filipems at 08/21/2007 2:14 PM
Hi,
I am facing the same kind of error. Can you share how this issue is solved.Your reply is very helpful.
Thanks in advance.
Similar Messages
-
Using fn-bea:inlinedXML and I have no result
Hello everyone:
I´m using with OEPE PS3 and testing a Proxy (with Biz, wsdl, xsd, and xquery etc).
I´m developing a proxy and into Message Flow , My Request Action is OK, but in Response Action I´m using a Replace action with values:
XPATH: +./executeResponse/executeReturn+
In variable: anyType1*
Expression: I map to xquery file --> PERSON_RESPONSE.xq,
I have one parameter (variable name) called: anyType1 and value: fn-bea:inlinedXML(data($anyType1/node()))
I have been a request and receive this:
+<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">+
+<soapenv:Body>+
+<executeResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">+
+<executeReturn xsi:type="xsd:string"><![CDATA[<?xml version="1.0" encoding="UTF-8"?><person></person>]]></executeReturn>+
+</executeResponse>+
+</soapenv:Body>+
+</soapenv:Envelope>+
My PERSON_RESPONSE.xq is:
declare namespace ns1 = "http://www.domain.com/XSD/ABCD";
declare namespace ns3 = "http://www.domain.com/XSD/1234";
declare namespace ns0 = "http://www.domain.com/XSD/PERSONS";
declare namespace xf = "http://tempuri.org/PROJECT/XQUERY/XQ_DETAIL_PERSON_RESPONSE/";
declare namespace ns1 = "http://www.domain.com/XSD/ABCD";
declare namespace ns3 = "http://www.domain.com/XSD/1234";
declare namespace ns0 = "http://www.domain.com/XSD/PERSONS";
declare namespace xf = "http://tempuri.org/PROJECT/XQUERY/XQ_DETAIL_PERSON_RESPONSE/";
declare function xf:XQ_DETAIL_PERSON_RESPONSE($anyType1 as element(*))
as element(ns0:processDetailPersonResponse) {
<ns0:processDetailPersonResponse>
<ns0:bodyResponse>
<ns0:person>
<ns0:data>
<ns0:id>{ *$anyType1/ns3:person/ns3:data* }</ns0:id>
</ns0:data>
</ns0:person>
</ns0:bodyResponse>
</ns0:processDetailPersonResponse>
declare variable $anyType1 as element(*) external;
xf:XQ_DETAIL_PERSON_RESPONSE($anyType1)
Finally my result in Response Action is not correct, because my Xquery function not receive a correct value. I´m using from Replace Action:
fn-bea:inlinedXML(data($anyType1/node()))
Why? What is the problem,
Someone can give me any help, please ?
Thanks in advanceHi
I am also facing the same problem.
for me default namespace is getttin added but not sure how to remove.
Following is the message we are getting in OSB to send
<Notification>
<Type>Data</Type>
<Channel>webservice</Channel>
<Security>NONSSL</Security>
<Message>
<type>Transfer</type>
<msg><![CDATA[<Transfer></Transfer>]]></msg>
</Message>
<Destination>XXXXXX</Destination>
<Priority>HIGH</Priority>
</Notification>>
Ideally what we are sending in our CDATA there should not be any change.
but when we are printing out body variable after inlinedxml() function.
its adding default namespace in Transfer tag.
<Body xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Transfer xmlns=""></Transfer>
</Body>>
why OSB is putting xmlns="" in Transfer tag.
Edited by: abhishek on Sep 11, 2012 12:51 AM
Edited by: abhishek on Sep 11, 2012 1:03 AM -
Bea-inlinedxml + OSB 11.1.1.7
Hi-
Looks like bea-inlinedxml() is not working as expected on 11.1.1.7
I used to use bea-inlinedxml() to return a CDATA into a XML node but now OSB is returning it empty.
OSB 11.1.1.7 ChangeLog shows:
+13902323 - The bea-inlinedxml() function trims whitespace when parsing text to XML+
Assign Activity Produces an Empty Message Body if a New Line Character Exists
Bug: 16205232
Added: 07-March-2013
Platform: All
The resulting message body is empty if a proxy service processes an XML string with a newline character after the XML declaration (<?xml version="1.0" encoding="UTF-8"?>), the message flow includes an Assign activity that uses fn-bea:inlinedXML() to assign that XML string to a variable, and the message flow uses the variable to replace the contents of $body. This is related to issue 13902323, caused by the fn-bea:inlinedxml() function trimming whitespace when parsing text to XML.
Maybe this fix broke inlinedXML behavior??
Please help.Hi,
We are also facing the same issue. Do we have any suggested patch from Oracle yet ?
In the mean time, we have worked around the issue by doing the following
<soap-env:Body>{fn-bea:inlinedXML($xmlParseResult)}</soap-env:Body>
regards. -
OSB: fn-bea:inlinedXML format my signed XML
Hello.
I'm trying to replace my output xml message with the same message, but digitally signed.
My proxy flow looks like:
1. Call to BS.
2. In response, take the output from BS and digitally sign it (Service callout to a signing service).
3. Take the output from that service (it returns the signed xml into a "CDATA" section).
4. Extract the xml (CDATA), and call to fn-bea:inlinedXML
5. Substitute the output message with the xml in point 4).
But "inlinedXML" seems to format the xml string (whitespace, line breaks,...), so the sign is no longer valid.
¿Can OSB convert from string to xml without formatting?.
Thanks.Hello.
Does anyone knows how to tell OSB to stop formatting my XML?.
Thanks. -
OSB: Strip CDATA while sending to email
Hi
My idea is user will receive html in his email with our dynamic text via OSB 11g.
I am sending an HTML code through OSB email.
HTML file has a template.
I insert dynamic text (text+xml actually) at a specific location in HTML.
business service has input type = text, output type = none and protocol is email. Content-Type of business service is changed to "text/html" at run time by replace action for transport header in Route action.
Issue is: In mail, in message body intial tags of dynamic text is missing and I can see find ]]> at the end in my email message body. When I right click on received HTML and click on "view source", I see <![CDATA and ]]> encapsulates my dynamic text.
I can not see <![CDATA and ]]> in my message flow though it must exist since when I tried fn-bea:serialize() with email body content OSB gave me error of unbalanced tag metadata for <![CDATA.
Is there a way to strip <![CDATA and ]]> ?? I don't wish my end user to see ]]> in message body.
Thanks and Regards
Swapnil KharwadkarI think the below function will do the job,
If the InputString=<![CDATA[
<AddressLine1>UNIT 21 WINDSOR PARK</AddressLine1>
<AddressLine2>50 WINDSOR AVENUE</AddressLine2>
fn-bea:inlinedXML($InputString)
wll provide out put as
Simple XML tag
+<?xml version="1.0" encoding="UTF-8" ?>+
+<AddressLine1>UNIT 21 WINDSOR PARK</AddressLine1>+
+<AddressLine2>50 WINDSOR AVENUE</AddressLine2>+
Please let me know, how you go.
Thanks,
Vijay -
How to remove SOAP tag from request going from OSB flow
Hi,
I need to send message to external party...I am using OSB for that. ...But the external party said they dont want any soap tag in the message as they need only required information .
*<?xml version=”1.0” encoding=”UTF-8” ?>
<soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope /”>
<soapenv:Header/>
<soap-env:Body xmlns:soap-env=”http://schemas.xmlsoap.org/soap/envelope /”>
<TransactionAcknowledgement xmlns="">
<TransactionId>HELLO EXTERNAL</TransactionId>
<UserId>MC</UserId>
<SendingPartyType>SE</SendingPartyType>
</TransactionAcknowledgement>
</soap-env>
</soap-Envelope>*
but they need only following message.
* <TransactionAcknowledgement xmlns="">
<TransactionId>HELLO EXTERNAL</TransactionId>
<UserId>MC</UserId>
<SendingPartyType>SE</SendingPartyType>
</TransactionAcknowledgement>*
Following are the log message printing in my log.
Following message we have to send
<TransactionAcknowledgement><TransactionId>HELLO EXTERNAL</TransactionId><UserId>MC</UserId><SendingPartyType>SE</SendingPartyType></TransactionAcknowledgement>>
Then we are applying inlinedXML() on above message and getting following message
After function fn-bea:inlinedXML
EMCMSSL Body ::::::
<Body xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<TransactionAcknowledgement xmlns="">
<TransactionId>HELLO EXTERNAL</TransactionId>
<UserId>MC</UserId>
<SendingPartyType>SE</SendingPartyType>
</TransactionAcknowledgement>
</Body>
Finally we are printing the outbound variable
Outbound variable:
<con:endpoint name="BusinessService$EMCNotification$BusinessService$external$PushDataBS" xmlns:con="http://www.bea.com/wli/sb/context">
<con:service>
<con:operation>advisory123</con:operation>
</con:service>
<con:transport>
<con:uri>https://XXXX.sg:50001/XISOAPAdapter/MessageServlet</con:uri>
<con:mode>request-response</con:mode>
<con:qualityOfService>exactly-once</con:qualityOfService>
<con:request xsi:type="http:HttpRequestMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tran:headers xsi:type="http:HttpRequestHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">
<tran:user-header name="JMSType" value="Transaction Acknowledgement"/>
<http:Content-Type>text/xml</http:Content-Type>
<http:SOAPAction>""</http:SOAPAction>
</tran:headers>
</con:request>
</con:transport>
<con:security>
<con:doOutboundWss>false</con:doOutboundWss>
</con:security>
</con:endpoint>>
But I am not getting how the client is receiving soap header.
please suggest for the same.Hi All.
For removing the namespace from header I found following function but not sure how tom implement it for my requirement.
Pleae help if possible.
I need a XQuery function to remove name space from my xml message.
my message is
<Body xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<TransactionAcknowledgement xmlns="">
<TransactionId>HELLO MSSL</TransactionId>
<UserId>MC</UserId>
<SendingPartyType>SE</SendingPartyType>
</TransactionAcknowledgement>
</Body>
I need
<Body xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<TransactionAcknowledgement xmlns="">
<TransactionId>HELLO MSSL</TransactionId>
<UserId>MC</UserId>
<SendingPartyType>SE</SendingPartyType>
</TransactionAcknowledgement>
</Body>
Function I found is
declare namespace xf = "http://tempuri.org/vijfhuizen/com/myMessage/";
declare function xf:strip-namespace($e as element())
as element()
element { xs:QName(local-name($e)) }
for $child in $e/(@*,node())
return
if ($child instance of element())
then xf:strip-namespace($child)
else $child
declare variable $e as element() external;
xf:strip-namespace($e)
I have created the function but not suire how to execute it. -
OSB-how to pass xml to another proxy Service
Hi
i am getting a xml as string after java call out and then i am using "fn-bea:inlinedXML($iso2xml_31)" for converting the string to XML,but when i am passing the inlinexml variable to another Proxy service by servicecallout i am not getting it.
grateful if anyone can throw some light in this matter.
thankspassing the inlinexml variable to another Proxy serviceMake sure the assign in the service callout is passing the right content to the other proxy service... Use OSB Test console to check the content of the variables...
Cheers,
Vlad -
Need Help:Handling CLOB in OSB Proxy Service
Hello All-
We have created an AQ in Oracle DB which will have the following message Structure:
CREATE OR REPLACE TYPE enqueue_payload AS OBJECT
( field1 VARCHAR2(100),
field2 VARCHAR2(100),
field3 DATE,
field4 VARCHAR2(100),
field5 NUMBER,
payload CLOB,
In the Payload field we are enqueing an XML message.
We have to use a OSB proxy service to dequeue the message from the AQ, transform it to another format and send to a SOA Composite.
We created a AQ Adapter in Jdeveloper 11g and imported the WSDL, XSD and .jca jca binding file into the OSB project. And configured the OSB proxy service using the WSDL imported.
However in OSB proxy service message flow when I try to create an XQUERY transformation, I see that the Payload field does not expose the structure of the XML message that is being enqueued. I even changed the message structure definition to have the payload field as XMLType. But it didn't help.
On analyzing the XSD created by AQ Adapter, I see that the payload is being defined as "string" in the XSD.
Inputs Needed
=========
1. How can we parse the payload field defined as CLOB/XMLType in OSB so that I can see the structure of the XML message it holds ?
2. Is there any in-built function in OSB to convert it to XML ?
3. Any other inputs in order to transform the XML message coming in the payload field as CLOB/XMLType
Please provide your inputs and I hope that I have clearly explained my use case.
Thanks in advance for your time and help!!
Regards,
DibyaHi Atheek-
Please find the logs below:
Payload:: Indicates the actual payload with all the headers fields coming from AQ
Payload After Applying the Function:: Indicates the data that is logged after applying the fn-bea:inlinedXML function.
The function fn-bea:inlinedXML is extracting the data from the XML tags :(
####<Dec 20, 2010 12:14:26 PM GMT+05:30> <Info> <ALSB Logging> <vhydaiavm-03> <osb_server1> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-000A464703C2C06A4338> <6751713a0ce9f61d:-6e70b631:12d02855fef:-7ff4-0000000000000002> <1292827466595> <BEA-000000> < [PipelinePairNode1, PipelinePairNode1_request, stage1, REQUEST] Payload:: <apps:ORA_FUSION_LOAD_XMLTYPE xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:apps="http://xmlns.oracle.com/xdb/APPS">
*<RICE_ID>PRJ_INT_30</RICE_ID>*
*<SOURCE_SYSTEM>ORACLE</SOURCE_SYSTEM>*
*<DATETIME>2010-12-20T10:49:17.000Z</DATETIME>*
*<TRANSACTION_ID>PRJ_INT_30-1</TRANSACTION_ID>*
*<RECORD_COUNT>1</RECORD_COUNT>*
*<PAYLOAD><![CDATA[<ALTPPSEGHIERARCHY><sgmt_name>Company</sgmt_name><include_parent_child>C</include_parent_child><parent_flex_value>P</parent_flex_value><child_flex_value_low>03</child_flex_value_low><child_flex_value_high>03</child_flex_value_high><start_date_active></start_date_active><end_date_active></end_date_active></ALTPPSEGHIERARCHY>]]></PAYLOAD>*
*<ATTRIBUTE1 NULL="TRUE"/>*
*<ATTRIBUTE2 NULL="TRUE"/>*
*<ATTRIBUTE3 NULL="TRUE"/>*
*<ATTRIBUTE4 NULL="TRUE"/>*
*<ATTRIBUTE5 NULL="TRUE"/>*
*</apps:ORA_FUSION_LOAD_XMLTYPE>>*
####<Dec 20, 2010 12:14:26 PM GMT+05:30> <Info> <ALSB Logging> <vhydaiavm-03> <osb_server1> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-000A464703C2C06A4338> <6751713a0ce9f61d:-6e70b631:12d02855fef:-7ff4-0000000000000002> <1292827466595> <BEA-000000> < [PipelinePairNode1, PipelinePairNode1_request, stage1, REQUEST] Payload After Applying the Function:: PRJ_INT_30ORACLE2010-12-20T10:49:17.000ZPRJ_INT_30-11>
####<Dec 20, 2010 12:14:26 PM GMT+05:30> <Info> <JDBC> <vhydaiavm-03> <osb_server1> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <6751713a0ce9f61d:-6e70b631:12d02855fef:-7ff4-0000000000000002> <1292827466688> <BEA-001128> <Connection for pool "EBS_DHAARA_DataSource" closed.> -
Namespace replace/rename issue in ALSB
Hi,
As part of our project we have been using ALSB3.0. In one of our outbound Proxy flows we have configured transform stage which intern executing XQuery transormation. Post transformation it publish message on BEA JMSTopic in following format.
*<?xml version="1.0" encoding="UTF-8" ?>
<ref:ABCMessage xmlns:ref="http://www.indteur.org/abc/2.1/reference">
<ref:FromEANNumber>NA</ref:FromEANNumber>
<ref:SenderIdentifier>
<ref:SenderIDType></ref:SenderIDType>
<ref:IDValue></ref:IDValue>
</ref:SenderIdentifier>
<ref:SentDate>2009-10-10T18:41:27.870-04:00</ref:SentDate>
<ref:Product>
<ref:RecordReference></ref:RecordReference>
<ref:NotificationType>04</ref:NotificationType>
<ref:RecordSourceName></ref:RecordSourceName>
</ref:Product>
</ref:ABCMessage>*
Please help us in rename/replace namespace prefix from 'ref:' to 'ns1:' at post transformation and before publishing the saem to JMS Topic.
Thanks in advance........Personally I would mandate that what ever is the consumer of the JMSQ should be compatible with XML name space constructs. If it is not under our control then one solution would be
1) Convert the xml to string
let $strContent := fn-bea:serialize($body)
2) Replace the ref: with ns1:
return fn-bea:inlinedXML(fn:replace( $strContent, "ref:", "ns1:") )
This is a very bad solution but should solve your issue if XML is not huge (huge XML will consume lot of cpu for this transformation ) .Ideally I would recommend changing the behavior of the message consumer.
Also you can try defining name space for http://www.indteur.org/abc/2.1/reference as ns1 in sbconsole proxy name space definitions. I believe even this will work but never tried.Let me know if this works for you.
My two cents
Manoj
Edited by: mneelapu on Oct 13, 2009 9:18 AM -
How to handle xml CDATA string element when OSB calling a webservice
Hi
Right, I'm new to OSB so bear with me.
The following is a response from am operation in a webservice.
As you can see there is a CDATA string in "<m:return>" element. I want to transform the CDATA string to XML.
I have searched the forum and found a couple of similar queries and tried following the answers and this is what I'm getting.
Please advise as to where I have gone wrong and how I can correct it.
<env:Body xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<m:ReservationCancelResponse xmlns:m="http://domain/jws">
<m:return>
<![CDATA[<?xml version="1.0" encoding="UTF-8"?><ReservationCancelNegativeAck><MessageId>HGv2OWS6hq</MessageId><ReservationNum>1234</ReservationNum><CsrId></CsrId><ErrorCode>02</ErrorCode><ErrorMessage>Reservation '1234' does not exist.</ErrorMessage></ReservationCancelNegativeAck>]]>
</m:return>
</m:ReservationCancelResponse>
</env:Body>
In my response pipeline I have an Assign and Replace action.
My Assign is:
Expression: fn-bea:inlinedXML($body)
Variable: reservationCancelReponse
When I log $reservationCancelReponseI get... so this bit is OK.
<ReservationCancelNegativeAck>
<MessageId>HGv2OWS6hq</MessageId>
<ReservationNum>1234</ReservationNum>
<CsrId/>
<ErrorCode>02</ErrorCode>
<ErrorMessage>Reservation '1234' does not exist.</ErrorMessage>
</ReservationCancelNegativeAck>
My Replace
XPath: executeResponse/executeReturn/text()
In Variable: body
Expression: responseTransform.xq (binding with $reservationCancelReponse)
Replace Node Contents is checked
When I test the operation using the proxy service I get the following:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<m:ReservationCancelResponse xmlns:m="http://com/ventyx/abws/jws">
<m:return>
<?xml version="1.0" encoding="UTF-8"?><ReservationCancelNegativeAck><MessageId>HGv2OWS6hq</MessageId><ReservationNum>1234</ReservationNum><CsrId></CsrId><ErrorCode>02</ErrorCode><ErrorMessage>Reservation &apos;1234&apos; does not exist.</ErrorMessage></ReservationCancelNegativeAck>
</m:return>
</m:ReservationCancelResponse>
</env:Body>
</env:Envelope>
The CDATA string hasn't been transformed.
Please help. What I have I missed.
Thanks in advance.
MIOK
I have made some amendments to the original process and made some progress but still isn't quite right.
I have created a schema:
<complexType name="ReservationCancelNegativeAckType">
<sequence>
<element name="MessageId" minOccurs="0">
<annotation>
<documentation>
</documentation>
</annotation>
<simpleType>
<restriction base="string" />
</simpleType>
</element>
<element name="ReservationNum" minOccurs="0">
<annotation>
<documentation>
</documentation>
</annotation>
<simpleType>
<restriction base="string" />
</simpleType>
</element>
<element name="CsrID" minOccurs="0">
<annotation>
<documentation>
</documentation>
</annotation>
<simpleType>
<restriction base="string" />
</simpleType>
</element>
<element name="ErrorCode" minOccurs="0">
<annotation>
<documentation>
</documentation>
</annotation>
<simpleType>
<restriction base="string" />
</simpleType>
</element>
<element name="ErrorDescription" minOccurs="0">
<annotation>
<documentation>
</documentation>
</annotation>
<simpleType>
<restriction base="string" />
</simpleType>
</element>
</sequence>
</complexType>
<element name="ReservationCancelNegativeAckType"
type="tns:ReservationCancelNegativeAckType">
</element>
I have amended the earlier Assign action to use an XQ to extract the CDATA string into the schema
My Assign is:
Expression: responseToSchema.xq
Variable: reservationCancelReponse
When I log $reservationCancelReponse variable I get... so this bit is OK.
<ReservationCancelNegativeAck>
<MessageId>HGv2OWS6hq</MessageId>
<ReservationNum>1234</ReservationNum>
<CsrId/>
<ErrorCode>02</ErrorCode>
<ErrorMessage>Reservation '1234' does not exist.</ErrorMessage>
</ReservationCancelNegativeAck>
I have also changed my Replace, this time I am using an XQ which will map the schema to the XSD WSDL "ReservationCancelResponse"operation.
XPath: .
In Variable: body
Expression: responseFromSchemaToService.xq (binding with $reservationCancelReponse)
Replace Node Contents is checked
XSD WSDL is:
<xsd:element name="ReservationCancelResponse"
type="tns:ReservationCancelResponseType">
</xsd:element>
<xsd:complexType name="ReservationCancelResponseType">
<xsd:sequence>
<xsd:element name="ResponseCode"
type="xsd:string">
</xsd:element>
<xsd:element name="ResponseDescription"
type="xsd:string">
</xsd:element>
<xsd:element name="MessageID" type="xsd:string">
</xsd:element>
<xsd:element name="ReservationNum" type="xsd:string">
</xsd:element>
<xsd:element name="CsrId" type="xsd:string">
</xsd:element>
<xsd:element name="ErrorCode" type="xsd:string"
minOccurs="0">
</xsd:element>
<xsd:element name="ErrorDescription" type="xsd:string" minOccurs="0"></xsd:element>
</xsd:sequence>
</xsd:complexType>
This time the response is better but not right.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"/>
<env:Body xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<app:ReservationCancelResponse xmlns:app="http://www.example.org/AppointmentService/">
<ResponseCode>0</ResponseCode>
<ResponseDescription/>
<MessageID/>
<ReservationNum/>
<CsrId/>
</app:ReservationCancelResponse>
</env:Body>
</soapenv:Envelope>
As you can see the tags are empty. (For info: The "ResponseCode" and "ResponseDescription" are constants)
Where have I gone wrong? -
How to receive a xml CDATA in string element when OSB calling a webservice?
How to receive a xml CDATA in string element when OSB calling a webservice?
I have a business service (biz) that route to operation of a webservice.
A example of response to this webservice legacy:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eg="example">
<soapenv:Header/>
<soapenv:Body>
<ex:executeResponse>
<ex:arg><![CDATA[<searchCustomerByDocumentNumberResponse>
<name>John John</name>
</searchCustomerByDocumentNumberResponse>]]></ex:arg>
</ex:executeResponse>
</soapenv:Body>
</soapenv:Envelope>
the type of ex:arg is a string.
How to receive this CDATA structure to webservice in OSB?Similiar to the answer How to pass a xml CDATA in string element when OSB calling a webservice?
Use the xquery function fn-bea:inlinedXML rather than fn-ben:serialize
Steps to solve this problem:
1. Create a XML Schema. E.g.:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified">
<xs:complexType name="searchCustomerByDocumentNumberResponse">
<xs:sequence>
<xs:element name="name" minOccurs="0">
<xs:annotation>
<xs:documentation>
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string" />
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:element name="searchCustomerByDocumentNumberResponse" type="searchCustomerByDocumentNumberResponse"></xs:element>
</xs:schema>
2. Create a XQuery to create a searchCustomerByDocumentNumber ComplexType. E.g.:
3. Create a XQuery Transformation (XQ) to get the CDATA response to the webservice legacy. E.g.:
declare namespace ns0 = "novosiaws";
declare function xf:getReponse($searchCustomerByDocumentNumberResponse as element(ns0:searchCustomerByDocumentNumberResponse))
as element(searchCustomerByDocumentNumberResponse) {
fn-bea:inlinedXML($searchCustomerByDocumentNumberResponse/ns0:arg)
For more information about xquery function:
fn-bea:inlinedXML
The fn-bea:inlinedXML() function parses textual XML and returns an instance of the XQuery 1.0 Data Model.
The function has the following signature:
fn-bea:inlinedXML($text as xs:string) as node()*
where $text is the textual XML to parse.
Examples:
fn-bea:inlinedXML(“<e>text</e>”) returns element “e”.
fn-bea:inlinedXML(“<?xml version=”1.0”><e>text</e>”) returns a document with root element “e”.
Source: http://docs.oracle.com/cd/E13162_01/odsi/docs10gr3/xquery/extensions.html -
OSB invoking RESTful webservices:issue with relative-URI instead of
Hi,
We have a requirement where we need to pass the request content as string in the URL.
we need to send the request in the URL like:
http://abc.com/rest/xvf/nas<Employee><name>abc</name><empid>1234</empid>...<Employee>
we have used a servicecallout action which is invoking a business service which has the base uri value like:
http://abc.com/rest
and in the insert action we are trying to appened the remaining uri in the rest command i.e
<http:relative-URI>/xvf/nas{fn-bea:serialize($xmldata)}</http:relative-URI>
here $xmldata is <Employee><name>abc</name><empid>1234</empid>...<Employee>
while trying to invoke the service we are getting the error like:
BEA-380000: General runtime error: Illegal character in path at index 36: http://abc.com/rest/xvf/nas& lt ; Employee>& lt ; name>abc& lt ; /name>& lt ; empid>1234>...& lt ; Employee>
before to that we used fn-bea:inlinedXML and fn:bea:serialize functions on the retrieved xml and stored it into the xmldata variable and this variable is displaying the request in the proper xml file, but while appending it to the relative URI method the xml data is changing as like shown above i.e instead of < it is coming as & lt ; and at the end with out invoking the servie it is stoppeing at the OSB with the above error as illegal character, please advice..
how to append the proper xml to the URL/URI in the relative-URI method in the proxy transport??
as here it is coming & lt ; (combined with out space) as < i am changing it as like & lt ; for better understanding
Thanks..
Edited by: user12679330 on May 13, 2010 9:36 AM
Edited by: user12679330 on May 13, 2010 9:40 AM
Edited by: user12679330 on May 13, 2010 9:40 AMNot sure what you are trying to do but if I am not wrong, you are trying to use HTTP get with REST. You may refer -
http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/httppollertransport/transports.html#wp1083292
http://blogs.oracle.com/jeffdavies/2009/06/restful_services_with_oracle_s_1.html
http://blogs.oracle.com/jamesbayer/2008/07/using_rest_with_oracle_service.html
http://blogs.oracle.com/woa/2009/04/restify_your_world_and_put_it.html
Regards,
Anuj -
Dear All,
I have an OSB service which returns an xml form of output in string.
I am calling this OSB service in BPEL but it fails due to this string format recieved by BPEL.
How can I avoid it. I am also trying to convert string to xml but failing to do so.
Any pointers to this would be helpful
Thanks and Regards,
Mitstry setting the Outbound Response HTTP transport header
http:Content-Type=text/xml
or application/xml (even better)
(and of course you should make sure you have fn-bea:inlinedXml() function to turn the String into a XmlObject) -
Receive xml as string from OSB and pass it to Bpel
I was given xml and DTD by our external partners. I need to receive this xml, parse this and insert some of the
values of the elements into DB.
Question1:
Since I don't have WSDL, can I receive xml in string and pass it on to OSB BS which calls Bpel process?
If yes, how and can I get any example?
How do I set up osb bs service to talk to bpel?
I have installed oracle soa suite 10g with patch set 4. This runs with Oracle AS. I have my Bea weblogic 10.3 with OSB installed.
Both the servers are running seperately.If I use
string to xml --- fn-bea:inlinedXML()
How do I extract a value of an element? When I log the xml that got extracted from a string, I only see the values of elements with no element names:
eg: if incoming string format of xml is:
<Customer>
<name>aaa</name>
<address>bb</address>
</Customer>
After fn-bea:inlinedXML($body)
I see:
aaa
bbb
in the log, but with no element names -
Prefix namespace OSB, SOAP response
Hi!
I'm doing a web service in OSB 11g.
An application is parsing the SOAP response after calling my WS, and they are expecting that my SOAP response have hardcode prefixes.
My SOAP response is like this:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
XXXX
</soapenv:Body>
</soapenv:Envelope>
They want another prefix (soap instead of env or other prefix). Something like this:
<soap:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
XXXX
</soap:Body>
</soap:Envelope>
Do you know how can I fix it? I know this is a problem of the application who is calling my WS, but if I can do this, I can solve them a problem.
Thanks!!mybe the valid one is something like this,...please refer to the namespace,it sould be "xmlns:soap" than "xmlns:env" because you trying to use soap prefix .
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
XXXX
</soap:Body>
</soap:Envelope>
you can change the soap message in many way...for example you can use message processing actions such as 'replace action':
you can replace xpath . on variable $body with expression fn-bea:inlinedXML('<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
</soap:Body>
</soap:Envelope>')
hope it will helping you
Maybe you are looking for
-
Time Machine backup behavior erratic, now not working at all
[ Using Lion 10.7.2 on a Macbook Pro 15" with 2.53GHz Intel Core 2 Duo processor, 4GB RAM. ] The Macbook is connected to our home LAN, and I have been using (since September) a Synology NAS drive on the network which is set up as the Time Machine bac
-
Is there any way to upload songs from iPod to iTunes?
My old computer broke,so all of my songs from my old iTunes are gone. Is there any way that I could upload the songs from my iPod, to my iTunes? Is there any type of software I'd have to download, that could do this?
-
Error Installing patch 6272725 on Windows 2003 server
Hi all, I am trying to install the RUP3 patch on Windows 2003 server. I am getting the following error when installing patch 6272715 which is required to be installed before installing patch 6141000. If i continue installing patch 6141000 after ignor
-
My Mac Mini is running on iOS 10.6.8 can it be loaded with 7.0 or higher?
My Mac Mini is running on iOS 10.6.8 can it be loaded with 7.0 or higher?
-
Net value is not reflecting from order to Invoice
Hi, I need some clarification here: I can able to see the Net value in the sales order but the same thing is not reflecting in to the invoice. What could be the reason and Error message is : Pricing error in ITEM 000010 in Invoice. Your suggestions