on 2007 Feb 22 2:01 AM
Hello everyone,
I'm currently trying to set up an xMII BLS transaction as a web service provider, but have run into an issue with the WSDL generated by xMII. We're using an unpatched install of xMII 11.5.2 b64.
The transaction takes a single numeric input parameter and generates a sample Rowset with three columns (ID, Item, Value) and as many Rows as specified in the input parameter. In the XML output, a typical Row node thus looks like this:
<Row>
<ID>1</ID>
<Item>Item1</Item>
<Value>6</Value>
</Row>
In my opinion, the WSDL obtained via http://<servername>/Lighthammer/WSDLGen/<transaction>; seems to be malformed. In the WSDL's <schema> section, the <Row> node of the service response is specified as follows:
<s:complexType name="Row">
<s:sequence id="RowSequence">
<s:element maxOccurs="1" minOccurs="1" name="OutRowsetsXML" type="s:string"/>
</s:sequence>
</s:complexType>
To me, this says that the <Row> node of the XML output should contain a XML element with a name of "OutRowsetsXML" and string content. (Coincidentally(?), OutRowsetsXML is the name of the Transaction Output property). In my opinion, this is incorrect.
As a result of this, our web services consumer fails to validate the SOAP response against the schema in the WSDL and fails. Using the soapUI diagnostic tool, I can see that the transaction does indeed return the output I expect - but validation again fails because the schema of the SOAP response does not match the schema in the WSDL.
If I manually change the WSDL to properly describe the output document, everything works and the SOAP response is validated properly (see below for the modified WSDL segment).
<s:complexType name="Row">
<s:sequence id="RowSequence">
<s:element maxOccurs="1" minOccurs="1" name="ID" type="s:string"/>
<s:element maxOccurs="1" minOccurs="1" name="Item" type="s:string"/>
<s:element maxOccurs="1" minOccurs="1" name="Value" type="s:string"/>
</s:sequence>
</s:complexType>
Has anyone come across this issue before, or knows what needs to be done so that the schema in the WSDL accurately describes the output? I've tried to assign a Reference Document to the transaction output property in BLS Editor but this didn't resolve the issue either....
Thanks in advance for any input
Request clarification before answering.
Hello, Sascha.
In your transaction, what is the data type of the output parameter OutRowsetsXML? Make certain that it is of type "XML" - it seems to me that it is defined as a "String" at present.
Best regards,
Rick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sascha,
While defining the output parameter of the BLS transaction add the sample output XML structure in the corresponding value field. To get the sample output XML structure create a Xacute query and specify the transaction and test the query with output type text/XML. Copy the output XML and paste it in the value field of the output parameter of the BLS transaction in the BLS editor. Save the transaction and generate the WSDL by running WSDLGen service.
You can refer the first few pages of this document where I've explained this : <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0e74673-718f-2910-c4a7-bbae959d1e5a">How to Integrate SAP xMII Services with Web Dynpro Java</a>
Hope this will help.
Thanks,
Dipankar
Hi, Sascha and Dipankar.
In most cases, the best way to do this is to assign a reference document. In this way, if the "source" document that is ultimately copied to the transaction output changes, it will automatically be reflected in the WSDL "dynamically".
If you know that the structure is static and will never change, however, you can certainly assign an explict value (as long as it is an xMII XML document structure).
Best regards,
Rick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Sascha.
To get it to work properly using reference document, you'll need to assign a document that "looks" like the output document. How are you assigning XML to the transaction output? If you are using an AssignXML link, use the same "source" when assigning a reference to the output. This gives xMII a hint as to what the output structure is.
Best regards,
Rick
Hi Rick,
I loaded a blank xMII XML document (one Rowset, 3 Rows) using the Reference Document Loader action block and assigned the action's output using an AssignXML link to the transaction's output property. I then created the payload (a dummy xMII XML document) and assigned it to the transaction's output parameter using an AssignXML link again. Is this the correct way of dealing with ref docs?
Thanks for your help on this,
Sascha
Hi, Sascha.
How are you creating the "payload"?
Also, it is important for xMII to have a full document (including the Columns/Column elements) in order to function properly. I assume that is the case, but just wanted to check.
You don't need an actual "reference document" (e.g. saved on disk) to use the "assign reference" menu option. You can point it to any XML structure anywhere in your transaction (e.g. an xMII document action, the output of a query or a calculated columns action, etc...). It does not perform a "copy" when you assign a reference, but keeps a "pointer" to the original structure.
Best regards,
Rick
Hi Rick,
sorry for the delayed response.
The transaction generates an Illuminator XML document with as many rows as given in the transaction's single integer input parameter. The sample document I was using had three rows, which caused the correct WSDL to be generated (min. occurrence = 1, max. occurrence = unbound), and did include Column nodes.
Don't worry about the issue - I got the transaction to work in the end. Thanks very much for your help on this though.
Sascha
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.