none
axis web service resposne message RRS feed

  • Question

  • I am consuming an axis web service in my orchestration. So far, I am able to make a request (which I verified is being handled appropriately in the endpoint application) but the response message which is coming back from the web service is containing multiple root nodes thus cannot be processed. 

    Please advice how to handle such response (below mentioned).

     

    Thanks,

    Anoop

     

     

    <ns1:createIssueResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://soap.rpc.jira.atlassian.com" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

    <createIssueReturn href="#id0"/>

    </ns1:createIssueResponse>

     

    <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:RemoteIssue" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://beans.soap.rpc.jira.atlassian.com">

    <affectsVersions soapenc:arrayType="ns2:RemoteVersion[0]" xsi:type="soapenc:Array"/>

    <assignee xsi:type="xsd:string">username</assignee>

    <attachmentNames soapenc:arrayType="xsd:string[0]" xsi:type="soapenc:Array"/>

    <components soapenc:arrayType="ns2:RemoteComponent[0]" xsi:type="soapenc:Array"/>

    <created xsi:type="xsd:dateTime">2011-08-16T16:16:00.000Z</created>

    <customFieldValues soapenc:arrayType="ns2:RemoteCustomFieldValue[2]" xsi:type="soapenc:Array">

    <customFieldValues href="#id1"/>

    <customFieldValues href="#id2"/>

    </customFieldValues>

    <description xsi:type="xsd:string">this is a description</description>

    <duedate xsi:type="xsd:dateTime" xsi:nil="true"/>

    <environment xsi:type="xsd:string" xsi:nil="true"/>

    <fixVersions soapenc:arrayType="ns2:RemoteVersion[0]" xsi:type="soapenc:Array"/>

    <id xsi:type="xsd:string">370887</id>

    <key xsi:type="xsd:string">ABCD-23</key>

    <priority xsi:type="xsd:string">6</priority>

    <project xsi:type="xsd:string">ABCD</project>

    <reporter xsi:type="xsd:string">reportername</reporter>

    <resolution xsi:type="xsd:string" xsi:nil="true"/>

    <status xsi:type="xsd:string">1</status>

    <summary xsi:type="xsd:string">ABCDEF_012</summary>

    <type xsi:type="xsd:string">3</type>

    <updated xsi:type="xsd:dateTime">2011-08-16T16:16:00.000Z</updated>

    <votes xsi:type="xsd:long">0</votes>

    </multiRef>

     

    <multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:RemoteCustomFieldValue" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns3="http://beans.soap.rpc.jira.atlassian.com">

    <customfieldId xsi:type="xsd:string">customfield_11540</customfieldId>

    <key xsi:type="xsd:string" xsi:nil="true"/>

    <values soapenc:arrayType="xsd:string[1]" xsi:type="soapenc:Array">

    <values xsi:type="xsd:string">ABC</values>

    </values>

    </multiRef>

     

    <multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:RemoteCustomFieldValue" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns4="http://beans.soap.rpc.jira.atlassian.com">

    <customfieldId xsi:type="xsd:string">customfield_11544</customfieldId>

    <key xsi:type="xsd:string" xsi:nil="true"/>

    <values soapenc:arrayType="xsd:string[1]" xsi:type="soapenc:Array">

    <values xsi:type="xsd:string">111449</values></values>

    </multiRef>

    Wednesday, August 17, 2011 9:50 AM

Answers

  • I was able to get this resolved by writing down a custom piece of code to handle the multi-refs in the pipeline. I could not find any direct way of doing this implicitly
    • Marked as answer by AnoopVishnoi Tuesday, August 23, 2011 3:47 PM
    Tuesday, August 23, 2011 3:47 PM

All replies

  • In the schema generated by web refernce you can specify the createIssueResponse element as root element and can try. You might refer to this post for help.


    Don't forget to mark the post as answer or vote as helpful if it does, Regards -Rohit Sharma (http://rohitbiztalk.blogspot.com)
    Wednesday, August 17, 2011 10:35 AM
    Moderator
  • How have you configured the client for this web service, how does the response schema look like? If you are getting the message in the orchestration then you can easily loop through the multiple nodes.

    Cheers


    --------------------------------------
    Mark As Answer or Vote As Helpful if this helps.
    Wednesday, August 17, 2011 10:41 AM
  • Hi Rohit,

     

    The generated instance of the schema that I have already (generated through consuming WCF service) looks like below.

    My original schema isn't having multiple root nodes etc. as mentioned in the blog you provided.

     

    <ns0:createIssueResponse xmlns:ns0="http://soap.rpc.jira.atlassian.com">

      <createIssueReturn>

        <id>id_0</id>

        <affectsVersions ns1:arrayType="arrayType_0" ns1:offset="offset_1" id="id2" href="http://www.example.com" xmlns:ns1="http://schemas.xmlsoap.org/soap/encoding/" />

        <assignee>assignee_0</assignee>

        <attachmentNames ns1:arrayType="arrayType_0" ns1:offset="offset_1" id="id2" href="http://www.example.com" xmlns:ns1="http://schemas.xmlsoap.org/soap/encoding/" />

        <components ns1:arrayType="arrayType_0" ns1:offset="offset_1" id="id2" href="http://www.example.com" xmlns:ns1="http://schemas.xmlsoap.org/soap/encoding/" />

        <created>1999-05-31T13:20:00.000-05:00</created>

        <customFieldValues ns1:arrayType="arrayType_0" ns1:offset="offset_1" id="id2" href="http://www.example.com" xmlns:ns1="http://schemas.xmlsoap.org/soap/encoding/" />

        <description>description_0</description>

        <duedate>1999-05-31T13:20:00.000-05:00</duedate>

        <environment>environment_0</environment>

        <fixVersions ns1:arrayType="arrayType_0" ns1:offset="offset_1" id="id2" href="http://www.example.com" xmlns:ns1="http://schemas.xmlsoap.org/soap/encoding/" />

        <key>key_0</key>

        <priority>priority_0</priority>

        <project>project_0</project>

        <reporter>reporter_0</reporter>

        <resolution>resolution_0</resolution>

        <status>status_0</status>

        <summary>summary_0</summary>

        <type>type_0</type>

        <updated>1999-05-31T13:20:00.000-05:00</updated>

        <votes>10</votes>

      </createIssueReturn>

    </ns0:createIssueResponse>

     

    --Anoop

    Wednesday, August 17, 2011 10:41 AM
  • Please note the href in the response message, my understanding is, these need to be handled to make it work. How ?? I dont' know :(

     

    --Anoop

    Wednesday, August 17, 2011 10:43 AM
  • I was able to get this resolved by writing down a custom piece of code to handle the multi-refs in the pipeline. I could not find any direct way of doing this implicitly
    • Marked as answer by AnoopVishnoi Tuesday, August 23, 2011 3:47 PM
    Tuesday, August 23, 2011 3:47 PM
  • Hello Anoop,

    I have to write a BizTalk webservice that will be consumed by Apache axis. Can you share the piece of the code, that you have written in the pipeline to solve the issue. ?

    Shankar

    Thursday, September 22, 2011 3:41 PM
  • Hi Shankar,

     

    Share your email id, I'll send it across to you.

    However, I wonder that code might be of any help to you. It was used for receiving a response from axis web service which contained multi-refs. As multi-ref are not understood well in the xml document, I had to write down this code

     

     

    --Anoop

    Friday, September 23, 2011 4:52 AM
  • Anoop,

    Even though I have to write a webservice which accepts multiref inputs and do also need to send the response back in a multiref fashion. I have used a custom SOAPExtension to work on the incoming stream. However I want to see how you have done within your code. If there is any takeaways from that , it would be great for me.

    My email id is Shankar.Balaji@investec.co.uk

    Shankar.

     

    Friday, September 23, 2011 7:57 AM