This is a branchout of Thread: Some more complex sample of invokin WS needed_
We are working on a project that involves a outbound SALT Web service call that includes complex elements with attributes..We are looking for options of how to use FML API's to pass these attribute values from the application code.
We opened a ticket with oracle where we were suggested to frame the entire xml and pass the xml using the FML32 of the complex element. But when we framed the xml for Service and put the entire XML which includes the attributes using the FML ID of Service.
Please find a sample Schema and XML similar to the one we are working on...its associated code
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="Service" type="Service_Type" nillable="true">
<xs:documentation>Comment describing your root element</xs:documentation>
<xs:element name="DateTime" type="xs:dateTime" nillable="true">
<xs:element name="UUID" nillable="true">
<xs:element name="Status" type="xs:string" nillable="true" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="Version" type="xs:string" use="required">
<xs:attribute name="Name" type="xs:string" use="required">
The sample XML is :
___<?xml version="1.0" encoding="UTF-8"?>___
___<!--Sample XML file generated by XMLSpy v2010 rel. 2 (http://www.altova.com)-->___
___<Service Name="TestService" Version="1.1" xsi:noNamespaceSchemaLocation="Untitled6.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">___
___</Service>___ wsdlcvt generated the mif file with Service as a FML32 type and all its child elements as "mbstring". We tried to leave as it is and we also tried to replace all the child elements and just had a mif entry for "Service" as a mbstring neither produced a different output...Tried to dump using Ferror32 which did not dump any..._ The sample C/C++ code as per suggestions were to do the following...
_1) Have a string with the entire XML for Service_ xmldata="<Service Name=\"TestService"\ Version="1.1\"_ xsi:noNamespaceSchemaLocation=\"Untitled6.xsd\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">_
_2) Use Fmbpack32 to create a mbstring data_
_Fmbpack32(mbcodeName,reqmbptr,len, packdata,(FLDLEN32 *)&packedlen,0);_
userlog("Size of packedlen is %d",packedlen);
3) Add the packed data to the output buffer
Fadd32(fmlbuffer,Service, packdata,packedlen );
But we do not see the Service tag populated in the GWWS outbound request.Everything else makes it....any help on how to move ahead would be appreciated...
It seems you switch to the 10gR3 GA and now the whole XML data is mapped to FLD_MBSTRING.
I will forward my sample to you by mail, but this sample is not offical sample, it is just QA test case. You can refere it and check what's the difference.
Please let me know your mail address.