XML Iterator Question

Hi all,

I am using version 7.1 and try to interator a incoming xml document. My problem is the document and the document list under it, can not be interated with a loop step in developer. Can anybody show me some ideas or directions?

Thanks in advance!

tang

The attached wsdl is what I am using in my webservice. My question is how to loop over the incoming document?

When I test my flow service, it works as expected. But when I send a soap request from a soap ui, the incoming document can not be iterated over.

Please help.

Thanks in advance!
rkjh.wsdl (5.22 KB)

A couple of questions:

  1. You say that your service does not loop over the document list when you make a webService call - how do you know that it doesn’t?
  2. Are you submitting the same data (i.e. a document list of “ItemData”) in both - i.e. webservice call and when invoking IS service directly from developer?

I would suggest the following to troubleshoot - if you have already tried this, please share your findings:

Put a savePipelineToFile as the first step in your target service, send the soap request, then use the restorePipelineFromFile in the target service and trace through it. This will help you determine whether the target service is at all being invoked by the webservice client. And if the service is indeed invoked, the restorePipeline… will give you the data that is being received by this service.

Roh

Thank you very much for your quick response and questions.

I create the following steps in the service:
A) Create a WSDL file as attached previously in this thread,
B) Import this WSDL to create a web service provider. And the Developer 7.1 automatically created a flow service to implement some possible operations for the web service.
C) I create a loop step which loops over the array “/tns1:Rkjh/tns1:ItemData”. For debugging purpose I created a java service simply type in “System.out.println(“hello”);” to see if the loop would work.

I also created savePilelineToFile and restoreFileFromPipeline. The first time I send a request from soapui, and the loop did not work. I restored the pipeline, executed it step by step, I saw that the loop is ignored like no matching. The pipleline file is attached as “p_soap_ui.txt”.

But when I test it from developer, the loop works properly and the pipeline file looks as attached “p_developer.txt”

I also attached the package, please install it and test on it to see the problem like what I am facing now. Thanks a lot!

And another problem about this test is:
I expected to get a response as the Response schema, but I got a soap response like this:

<SOAP-ENV:Envelope xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:SOAP-ENC=“http://schemas.xmlsoap.org/soap/encoding/” xmlns:xsd=“XML Schema” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>
SOAP-ENV:Header/
SOAP-ENV:Body
<ser-root:OperationResponse xmlns:ser-root=“http://new.webservice.namespace”>
<tns1:Response xmlns:tns1=“http://www.hz-eai-project.com/Response” xmlns:ArrayOftns1=“http://www.hz-eai-project.com/Response”>
<tns1:success processedCount=“1” rejectedCount=""/>
</tns1:Response>
</ser-root:OperationResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The root OperationResponse is not what I wanted, how to remove this, and to get a response without this element and just the tns1:Response as the root element?

Thanks and Best Regards,

tang
loop.zip (13.6 KB)
p_developer.txt (563 Bytes)
p_soap_ui.txt (508 Bytes)

again, can anybody help me with this again? am i missing any basic concepts? I am new one to wm. any tips is appreciated!

first of all, to iterate on xml document, we don’t use loop.

You need to use two xml services(getxmlNodeIterator and getNextXmlNode) and use a REPEAT step if u want to fetch something out of ur xml.

as far as the wsdl is concerned, using the built in feature of Developer 7.1, using web service descriptors is a gud option and the document type would be empty untill the connector service runs successfully. The response of the service call is defined in the web service ur tring to call.

Thank you very much for the iterator answer. I followed it and solved the problem.

About the response, I am sorry I am not clear about what you mean. So far, the service provider end is created in the Webmethods IS. I called this service from a SOAPUI tool, which sends sopa request and gets response. I see the response from my webservice is not what I wanted, that is, the IS adds a new root element, which is called “ser-root:OperationResponse”. My question is, how to make the Webmethods to response as the document type “Response” specified?

Thanks and Best Regards,

Tang

As you mentioned, the server is 6.1 which i have never worked with. I am working with ver 7.1 and this is how we do things in it.

  1. We create a web service descriptor/connector(for 6.5) using the wsdl provide (which you have already done).
  2. If you see the schema of the descriptor, it has Request and Response document type already created. So you need to change over there.
  3. In the connector service, under branch on “/binding” you see a call to service soapClient(for version 7.1 which may be soapHTTP in your case) and see at after you get a response back then after some processing the body is mapped to some docType as “service_nameOutput” in the same folder as of your connector service.
  4. If you want to manupulate it change the structure of the document.

Sorry, maybe my mistake, but the IS is 7.1.

I am sure that the document type I created for web service descriptor is what I wanted. But the webmethods produced a reponse which has an additional root element called “ser-root:OperationResponse”. Would you please give some more detailed information on how to remove this to let it response as the document type?

Thanks and Best Regards

can u give me the address of the service you are tring to call, i want to test it on my end with the wsdl u provided here.

sorry, the service is not available on Internet.

But I create it via wsdl-importing, just as previously metioned and I did nothing special to it. And then I test it, I got the response.

Are you using a IS 7.1 version? If so, you can easily re-find this.

Thanks again for your continuous help. This is really difficult for me because I read a lot of the document shipped with the products and found no even a tip.

Best Regards,

tang

I failed to find any reference of the extra root element.

What i suspect is either there is a bug in 7.1 as per this post:
http://www.wmusers.com/forum/showthread.php?p=59213

or the wsdl you are using is not proper. Try replicating the implementation of the auto generated feature by web service descriptor and still you face the same issue, report it to the admins, as i am also just a member over here :).

Also, we are using 7.1.1 so I never came across such problem.

Thank you very much. We decided to switch all of our staffs to the version 7.1.1. We really have tests over kinds of wsdl, some of which really works well for other imlementations, and no similar problems found for them, but the same problem for webmethos.

Thanks!