Topic
  • 20 replies
  • Latest Post - ‏2014-05-02T18:49:46Z by nkollipara
GregoryHodgkinson
GregoryHodgkinson
2 Posts

Pinned topic WSDL import WSDL, and the REST API

‏2013-02-22T10:44:40Z |
Hi

I'm experimenting with using the REST API to upload WSDL documents to WSRR and have hit a snag.

If I have two WSDLs named StockQuoteInterface.wsdl and StockQuoteBinding.wsdl, where the binding imports the interface...

1) I can POST the StockQuoteInterface.wsdl file with no problems, getting a bsrURI value back for the newly uploaded document.

2) The POST of the StockQuoteBinding.wsdl file fails.

The response message for the failure (2 above) is as follows:


<error><code>GSR1350E</code><message>GSR0008E: Document StockQuoteBinding.wsdl was unable to 

import the referenced document "StockQuoteInterface.wsdl".</message><causemessage>GSR0049E: The url "StockQuoteInterface.wsdl" is malformed.</causemessage><stacktrace>com.ibm.serviceregistry.ServiceRegistryImportResolutionException: GSR0008E: Document StockQuoteBinding.wsdl was unable to 

import the referenced document &amp;quot;StockQuoteInterface.wsdl&amp;quot;. com.ibm.sr.api.SRXMLHelperImpl.loadFromUrl(SRXMLHelperImpl.java:491) com.ibm.sr.api.SRXMLHelperImpl.loadFromUri(SRXMLHelperImpl.java:436) com.ibm.sr.api.SRXMLHelperImpl.loadFromUri(SRXMLHelperImpl.java:424) com.ibm.sr.api.impl.ApiDocumentImpl.findModelledDocument(ApiDocumentImpl.java:762) com.ibm.sr.api.impl.ApiDocumentImpl.findModelledDocument(ApiDocumentImpl.java:596) com.ibm.sr.api.impl.ApiWSDLDocumentImpl.resolveModelledRelationships(ApiWSDLDocumentImpl.java:317) com.ibm.sr.api.impl.SimpleApiSDOGraphImpl.resolveModelledRelationships(SimpleApiSDOGraphImpl.java:1080) com.ibm.sr.api.ServiceRegistryImpl.doCreate(ServiceRegistryImpl.java:1047) com.ibm.sr.api.ServiceRegistryImpl.createOriginalObject(ServiceRegistryImpl.java:449) com.ibm.sr.api.ServiceRegistryImpl.create(ServiceRegistryImpl.java:373) com.ibm.serviceregistry.ServiceRegistrySessionBean.create(ServiceRegistrySessionBean.java:113) com.ibm.serviceregistry.ServiceRegistrySessionBean.create(ServiceRegistrySessionBean.java:70) com.ibm.serviceregistry.EJSLocalStatelessServiceRegistrySession_1728ff25.create(EJSLocalStatelessServiceRegistrySession_1728ff25.java:187) com.ibm.sr.data.servlet.DocumentHandler.loadContentPost(DocumentHandler.java:402) com.ibm.sr.data.servlet.DocumentHandler.doPost(DocumentHandler.java:108) com.ibm.sr.data.servlet.Content.doPost(Content.java:219) javax.servlet.http.HttpServlet.service(HttpServlet.java:738) javax.servlet.http.HttpServlet.service(HttpServlet.java:831) com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657) com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939) com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502) com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181) com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91) com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864) com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592) com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186) com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452) com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511) com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305) com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83) com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1784) com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1646) </stacktrace></error>


It tells me that it is unable to import the StockQuoteInterface.wsdl even though that has been successfully uploaded just moments before.

Any ideas as to why it wouldn't be able to see the previously imported StockQuoteInterface.wsdl? Any help or guidance much appreciated!

The two files look as follows...

StockQuoteInterface.wsdl


<?xml version=
"1.0"?> <definitions name=
"StockQuote" targetNamespace=
"http://com.ibm.wsrr.samples/" xmlns:tns=
"http://com.ibm.wsrr.samples/" xmlns:xsd1=
"http://com.ibm.wsrr.samples/" xmlns:soap=
"http://schemas.xmlsoap.org/wsdl/soap/" xmlns=
"http://schemas.xmlsoap.org/wsdl/">   <types> <schema targetNamespace=
"http://com.ibm.wsrr.samples/" xmlns=
"http://www.w3.org/2001/XMLSchema"> <element name=
"TradePriceRequest"> <complexType> <all> <element name=
"tickerSymbol" type=
"string"/> </all> </complexType> </element> <element name=
"TradePrice"> <complexType> <all> <element name=
"price" type=
"float"/> </all> </complexType> </element> </schema> </types>   <message name=
"GetLastTradePriceInput"> <part name=
"body" element=
"xsd1:TradePriceRequest"/> </message>   <message name=
"GetLastTradePriceOutput"> <part name=
"body" element=
"xsd1:TradePrice"/> </message>   <portType name=
"StockQuotePortType"> <operation name=
"GetLastTradePrice"> <input message=
"tns:GetLastTradePriceInput"/> <output message=
"tns:GetLastTradePriceOutput"/> </operation> </portType>   </definitions>


StockQuoteBinding.wsdl


<?xml version=
"1.0"?> <definitions name=
"StockQuote" targetNamespace=
"http://com.ibm.wsrr.samples/" xmlns:tns=
"http://com.ibm.wsrr.samples/" xmlns:xsd1=
"http://com.ibm.wsrr.samples/" xmlns:soap=
"http://schemas.xmlsoap.org/wsdl/soap/" xmlns=
"http://schemas.xmlsoap.org/wsdl/">   <

import namespace=
"http://com.ibm.wsrr.samples/" location=
"StockQuoteInterface.wsdl"/>   <binding name=
"StockQuoteSoapBinding" type=
"tns:StockQuotePortType"> <soap:binding style=
"document" transport=
"http://schemas.xmlsoap.org/soap/http"/> <operation name=
"GetLastTradePrice"> <soap:operation soapAction=
"http://com.ibm.serviceregisty.samples/GetLastTradePrice"/> <input> <soap:body use=
"literal"/> </input> <output> <soap:body use=
"literal"/> </output> </operation> </binding>   </definitions>
Updated on 2013-03-22T13:30:54Z at 2013-03-22T13:30:54Z by MarkSTaylor
  • MarkSTaylor
    MarkSTaylor
    15 Posts

    Re: WSDL import WSDL, and the REST API

    ‏2013-02-22T16:48:50Z  
    Hi!

    The error and stack trace you are receiving indicates that WSRR has already failed to resolve the import with existing documents in the repository and is attempting to load from the document location URI (which in this case is just the name of the WSDL file).

    WSRR will only resolve the import with existing documents that have an empty version: Did you give StockQuoteInterface.wsdl a version before you attempted to load StockQuoteBinding.wsdl?

    Also, what name and location did you specify within the URL that you used to load StockQuoteInterface.wsdl?

    Regards,
    Mark
  • GregoryHodgkinson
    GregoryHodgkinson
    2 Posts

    Re: WSDL import WSDL, and the REST API

    ‏2013-02-22T20:39:35Z  
    Hi Mark - thanks for the response!

    And that helps - I was uploading all the documents with a version.

    So I've changed that, and I'm no longer getting the GSR0008E error. But I am getting a different error now...

    
    <error><code>GSR1350E</code><message>GSR0909E: Unable to modify the relationship of an object because of business model constraints.</message><causemessage>GSR0909E: Unable to modify the relationship of an object because of business model constraints.</causemessage><stacktrace>com.ibm.serviceregistry.ServiceRegistryModificationException: GSR0909E: Unable to modify the relationship of an object because of business model constraints. com.ibm.sr.servicemodel.correlator.SMCorrelatorModifier.create(SMCorrelatorModifier.java:358) com.ibm.sr.servicemodel.correlator.SMCorrelatorModifierDisableOnImport.create(SMCorrelatorModifierDisableOnImport.java:70) com.ibm.sr.api.ServiceRegistryModifierImpl.invokeModifiers(ServiceRegistryModifierImpl.java:156) com.ibm.sr.api.ServiceRegistryModifierImpl.create(ServiceRegistryModifierImpl.java:215) com.ibm.sr.api.ServiceRegistryImpl.invokeModification(ServiceRegistryImpl.java:745) com.ibm.sr.governance.api.ServiceRegistryGovernanceImpl.invokeModification(ServiceRegistryGovernanceImpl.java:1299) com.ibm.sr.api.ServiceRegistryImpl.createOriginalObject(ServiceRegistryImpl.java:452) com.ibm.sr.api.ServiceRegistryImpl.create(ServiceRegistryImpl.java:373) com.ibm.serviceregistry.ServiceRegistrySessionBean.create(ServiceRegistrySessionBean.java:113) com.ibm.serviceregistry.ServiceRegistrySessionBean.create(ServiceRegistrySessionBean.java:70) com.ibm.serviceregistry.EJSLocalStatelessServiceRegistrySession_1728ff25.create(EJSLocalStatelessServiceRegistrySession_1728ff25.java:187) com.ibm.sr.data.servlet.DocumentHandler.loadContentPost(DocumentHandler.java:402) com.ibm.sr.data.servlet.DocumentHandler.doPost(DocumentHandler.java:108) com.ibm.sr.data.servlet.Content.doPost(Content.java:219) javax.servlet.http.HttpServlet.service(HttpServlet.java:738) javax.servlet.http.HttpServlet.service(HttpServlet.java:831) com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657) com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939) com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502) com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181) com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91) com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864) com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592) com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186) com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452) com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511) com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305) com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276) com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:1049) com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyReadCompletedCallback.complete(SSLConnectionLink.java:643) com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1784) com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1646) </stacktrace><diagnosticMessages>  <diagnosticMessage>ERROR GSR0909E: Unable to modify the relationship of an object because of business model constraints.</diagnosticMessage></diagnosticMessages></error>
    


    So that might be a step forward. Any ideas on how to find out more on what business model constraint has been violated?

    Much appreciate the help!

    Thanks,
    Greg
  • MarkSTaylor
    MarkSTaylor
    15 Posts

    Re: WSDL import WSDL, and the REST API

    ‏2013-02-25T09:34:52Z  
    Hi Mark - thanks for the response!

    And that helps - I was uploading all the documents with a version.

    So I've changed that, and I'm no longer getting the GSR0008E error. But I am getting a different error now...

    <pre class="jive-pre"> <error><code>GSR1350E</code><message>GSR0909E: Unable to modify the relationship of an object because of business model constraints.</message><causemessage>GSR0909E: Unable to modify the relationship of an object because of business model constraints.</causemessage><stacktrace>com.ibm.serviceregistry.ServiceRegistryModificationException: GSR0909E: Unable to modify the relationship of an object because of business model constraints. com.ibm.sr.servicemodel.correlator.SMCorrelatorModifier.create(SMCorrelatorModifier.java:358) com.ibm.sr.servicemodel.correlator.SMCorrelatorModifierDisableOnImport.create(SMCorrelatorModifierDisableOnImport.java:70) com.ibm.sr.api.ServiceRegistryModifierImpl.invokeModifiers(ServiceRegistryModifierImpl.java:156) com.ibm.sr.api.ServiceRegistryModifierImpl.create(ServiceRegistryModifierImpl.java:215) com.ibm.sr.api.ServiceRegistryImpl.invokeModification(ServiceRegistryImpl.java:745) com.ibm.sr.governance.api.ServiceRegistryGovernanceImpl.invokeModification(ServiceRegistryGovernanceImpl.java:1299) com.ibm.sr.api.ServiceRegistryImpl.createOriginalObject(ServiceRegistryImpl.java:452) com.ibm.sr.api.ServiceRegistryImpl.create(ServiceRegistryImpl.java:373) com.ibm.serviceregistry.ServiceRegistrySessionBean.create(ServiceRegistrySessionBean.java:113) com.ibm.serviceregistry.ServiceRegistrySessionBean.create(ServiceRegistrySessionBean.java:70) com.ibm.serviceregistry.EJSLocalStatelessServiceRegistrySession_1728ff25.create(EJSLocalStatelessServiceRegistrySession_1728ff25.java:187) com.ibm.sr.data.servlet.DocumentHandler.loadContentPost(DocumentHandler.java:402) com.ibm.sr.data.servlet.DocumentHandler.doPost(DocumentHandler.java:108) com.ibm.sr.data.servlet.Content.doPost(Content.java:219) javax.servlet.http.HttpServlet.service(HttpServlet.java:738) javax.servlet.http.HttpServlet.service(HttpServlet.java:831) com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657) com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939) com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502) com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181) com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91) com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864) com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592) com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186) com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452) com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511) com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305) com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276) com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:1049) com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyReadCompletedCallback.complete(SSLConnectionLink.java:643) com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1784) com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1646) </stacktrace><diagnosticMessages> <diagnosticMessage>ERROR GSR0909E: Unable to modify the relationship of an object because of business model constraints.</diagnosticMessage></diagnosticMessages></error> </pre>

    So that might be a step forward. Any ideas on how to find out more on what business model constraint has been violated?

    Much appreciate the help!

    Thanks,
    Greg
    Hi Greg,

    The new error is coming from the Service Model Correlator. This is a plug-in included with WSRR that is enabled by default. An overview of what it does is available here:

    http://pic.dhe.ibm.com/infocenter/sr/v8r0/topic/com.ibm.sr.doc/cwsr_correlator_modifier_R5.html

    I suspect what has happened is the following:

    1. You loaded the WSDL with a version and the correlator generated a set of Business Model objects for the WSDL.
    2. You deleted the WSDL, but did not delete the objects generated by the correlator.
    3. When you attempt to load the WSDL again without a version, the correlator is attempting to create relationships to the existing objects that it previously generated rather than creating new objects. This is fine until it attempts to set too many or too few targets on a relationship that has strict cardinality constraints in the business model.

    I would recommend that you try and delete the WSDL and all of the correlator generated objects before you then attempt to loads the WSDL again.

    The SystemOut.log should contain more clues about what relationship constraint is being violated.

    Kind regards,
    Mark
  • GregHodgkinson
    GregHodgkinson
    4 Posts

    Re: WSDL import WSDL, and the REST API

    ‏2013-02-26T13:10:49Z  
    Thanks Mark - that has helped me resolve my problem.

    I had objects of the following types that I had to remove before I could successfully complete the transaction:
    • Schema, Service Port, Service Binding, Service Interface, Service.

    Once I'd removed these and removed the previous WSDLs and XSDs I'd created it worked fine.

    Many thanks for your help on this. Hopefully this thread will be useful to anyone else that is trying to use the REST API.
  • MarkSTaylor
    MarkSTaylor
    15 Posts

    Re: WSDL import WSDL, and the REST API

    ‏2013-02-26T13:21:12Z  
    Thanks Mark - that has helped me resolve my problem.

    I had objects of the following types that I had to remove before I could successfully complete the transaction:
    • Schema, Service Port, Service Binding, Service Interface, Service.

    Once I'd removed these and removed the previous WSDLs and XSDs I'd created it worked fine.

    Many thanks for your help on this. Hopefully this thread will be useful to anyone else that is trying to use the REST API.
    You're very welcome Greg. Glad to hear that you resolved the problem! :)

    Are you able to mark the forum thread as 'answered'?
  • GregHodgkinson
    GregHodgkinson
    4 Posts

    Re: WSDL import WSDL, and the REST API

    ‏2013-02-26T13:31:40Z  
    I tried to do that but I don't seem to be given the option. Any ideas on how to mark something as resolved/answered?
  • GregHodgkinson
    GregHodgkinson
    4 Posts

    Re: WSDL import WSDL, and the REST API

    ‏2013-02-27T10:34:11Z  
    I do have a further question that is relevant to this thread...

    I am now able to successfully upload all of my WSDLs and XSDs using the REST API.

    However when I try to run a command to update the version numbers on the documents it fails. Checking the documentation, this is because the version number can only be set when you create the document.

    I seem to be in a catch-22 now as I need to have these documents uploaded with the version number set:

    1) If I set the version number as I create them, it won't handle imports.
    2) If I create them without the version number I can't update it afterwards.

    Any advice on how to handle this?

    Thanks!
  • MarkSTaylor
    MarkSTaylor
    15 Posts

    Re: WSDL import WSDL, and the REST API

    ‏2013-02-28T09:57:54Z  
    I do have a further question that is relevant to this thread...

    I am now able to successfully upload all of my WSDLs and XSDs using the REST API.

    However when I try to run a command to update the version numbers on the documents it fails. Checking the documentation, this is because the version number can only be set when you create the document.

    I seem to be in a catch-22 now as I need to have these documents uploaded with the version number set:

    1) If I set the version number as I create them, it won't handle imports.
    2) If I create them without the version number I can't update it afterwards.

    Any advice on how to handle this?

    Thanks!
    Regarding how to mark the thread as answered: I'm not too sure. I don't have an obvious option to do so and it sounds like you don't either! Perhaps this happens automatically somehow.

    Regarding your catch-22 situation: You are correct. This is a limitation of the REST API, which was originally intended to primarily be a query API for integrating software.

    I would recommend using one of the other APIs provided to load document graphs. However, if you have a requirement to load document graphs with versions via the REST API, you could submit a Request for Enhancement here: http://www.ibm.com/developerworks/rfe/

    Kind regards,
    Mark
  • GregHodgkinson
    GregHodgkinson
    4 Posts

    Re: WSDL import WSDL, and the REST API

    ‏2013-03-04T12:58:35Z  
    I've created an RFE: http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=31819

    Is there no workaround for the REST API? I'm loathe to reimplement this using an alternative API.

    If the answer is no, will the Web Services API be able to upload a set of interrelated WSDLs with their version numbers set?

    If so, can you point me to a good example? All I could find was a general outline for how to do this here: http://publib.boulder.ibm.com/infocenter/sr/v7r0/topic/com.ibm.sr.doc/programguide46.html

    Thanks for the continued help.
  • MarkSTaylor
    MarkSTaylor
    15 Posts

    Re: WSDL import WSDL, and the REST API

    ‏2013-03-22T13:30:54Z  
    I've created an RFE: http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=31819

    Is there no workaround for the REST API? I'm loathe to reimplement this using an alternative API.

    If the answer is no, will the Web Services API be able to upload a set of interrelated WSDLs with their version numbers set?

    If so, can you point me to a good example? All I could find was a general outline for how to do this here: http://publib.boulder.ibm.com/infocenter/sr/v7r0/topic/com.ibm.sr.doc/programguide46.html

    Thanks for the continued help.
    There is a workaround you could use for the REST API. This is to generate a DataGraph which is XML where you can use an HTTP Client to POST a Web service request. It means you don't have to have the whole web service stack, and you can create a template for the message, then just add new documents in as required.

    This is the format of the URL to send the message to a v7.5 WSRR, for example:

    http://host:port/WSRR7_5/services/WSRRCoreSDOPort

    The SOAP message format is as follows:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header/><soapenv:Body><p244:create xmlns:p244="http://www.ibm.com/xmlns/prod/serviceregistry/6/0/ws/sdo"><sdo:datagraph xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sdo="commonj.sdo"
    xmlns:sdo_1="http://www.ibm.com/xmlns/prod/serviceregistry/6/0/sdo">
    <sdo_1:WSRR>
    <sdo_1:root>_1</sdo_1:root>
    <sdo_1:artefacts xsi:type="sdo_1:GenericObject" bsrURI="_1"
    name="Collection">
    <sdo_1:userDefinedRelationships name="docs" targets="_2 a3d6c3a3-dfe6-464c.8b67.8c16358c67e3"/>
    </sdo_1:artefacts>
    <sdo_1:artefacts xsi:type="sdo_1:XSDDocument" bsrURI="a3d6c3a3-dfe6-464c.8b67.8c16358c67e3" namespace="http://test" location="test.xsd">
    </sdo_1:artefacts>
    <sdo_1:artefacts xsi:type="sdo_1:XSDDocument" bsrURI="_2"
    name="wsaBus.xsd"
    version="1"
    content="base64 encoded content"
    encoding="UTF-8" location="aaa.xsd" contentSize="1799">
    </sdo_1:artefacts>
    </sdo_1:WSRR>
    </sdo:datagraph>
    </p244:create></soapenv:Body></soapenv:Envelope>

    You will also need to add an HTTP Header as follows:

    name=SOAPAction value=create

    The first part of the XML given above is the Web services call wrapper information. The key part is the graph we send in.

    What we are doing is creating a GenericObject with a relationship called "docs" that has a target of aaa.xsd with version "1" and a target of the test.xsd which is already stored in WSRR with a version "1".

    The graph is just a list of objects that are linked together:

    <sdo_1:WSRR>
    <sdo_1:root>_1</sdo_1:root>
    <!-- This is the collection GenericObject. We set the bsrURI to an id beginning with "_" which tells WSRR that this is a new object. In this case "_1". When it
    is created it will have a proper bsrURI. -->
    <sdo_1:artefacts xsi:type="sdo_1:GenericObject" bsrURI="_1"
    name="Collection">
    <!-- The relationship has 2 targets. The bsrURI of the document in WSRR and "_2" which represents the new document you are trying to create"
    <sdo_1:userDefinedRelationships name="docs" targets="_2 a3d6c3a3-dfe6-464c.8b67.8c16358c67e3"/>
    </sdo_1:artefacts>

    <!-- This is the document in WSRR.-->
    <sdo_1:artefacts xsi:type="sdo_1:XSDDocument" bsrURI="a3d6c3a3-dfe6-464c.8b67.8c16358c67e3" namespace="http://test" location="test.xsd">
    </sdo_1:artefacts>

    <!-- This is the document that you are creating. You can specify location, name and version. The content is base64 encoded, and the contentSize would be that of
    the original document, rather than the base64 encoded content -->
    <sdo_1:artefacts xsi:type="sdo_1:XSDDocument" bsrURI="_2"
    name="aaa.xsd"
    version="1"
    content="base64 encoded content"
    encoding="UTF-8" location="aaa.xsd" contentSize="1799">
    </sdo_1:artefacts>
    </sdo_1:WSRR>
    This will result in a GenericObject being created, but the call will return the bsrURI of that object which you could then use to delete it via the REST interface.

    There's some more info here about setting up documents to specfic versions

    http://publib.boulder.ibm.com/infocenter/sr/v7r5/index.jsp?topic=%2Fcom.ibm.sr.doc%2Fprogramguide47.html

    Alternatively, there is a DeveloperWorks article will help with using the Web Services API available here:

    http://www.ibm.com/developerworks/websphere/library/techarticles/0612_colgrave/0612_colgrave.html

    It was written based on the 6.0 API but applies to all releases.

    I hope you find this information helpful :)
  • nkollipara
    nkollipara
    7 Posts

    Re: WSDL import WSDL, and the REST API

    ‏2014-04-08T02:13:15Z  
    There is a workaround you could use for the REST API. This is to generate a DataGraph which is XML where you can use an HTTP Client to POST a Web service request. It means you don't have to have the whole web service stack, and you can create a template for the message, then just add new documents in as required.

    This is the format of the URL to send the message to a v7.5 WSRR, for example:

    http://host:port/WSRR7_5/services/WSRRCoreSDOPort

    The SOAP message format is as follows:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header/><soapenv:Body><p244:create xmlns:p244="http://www.ibm.com/xmlns/prod/serviceregistry/6/0/ws/sdo"><sdo:datagraph xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sdo="commonj.sdo"
    xmlns:sdo_1="http://www.ibm.com/xmlns/prod/serviceregistry/6/0/sdo">
    <sdo_1:WSRR>
    <sdo_1:root>_1</sdo_1:root>
    <sdo_1:artefacts xsi:type="sdo_1:GenericObject" bsrURI="_1"
    name="Collection">
    <sdo_1:userDefinedRelationships name="docs" targets="_2 a3d6c3a3-dfe6-464c.8b67.8c16358c67e3"/>
    </sdo_1:artefacts>
    <sdo_1:artefacts xsi:type="sdo_1:XSDDocument" bsrURI="a3d6c3a3-dfe6-464c.8b67.8c16358c67e3" namespace="http://test" location="test.xsd">
    </sdo_1:artefacts>
    <sdo_1:artefacts xsi:type="sdo_1:XSDDocument" bsrURI="_2"
    name="wsaBus.xsd"
    version="1"
    content="base64 encoded content"
    encoding="UTF-8" location="aaa.xsd" contentSize="1799">
    </sdo_1:artefacts>
    </sdo_1:WSRR>
    </sdo:datagraph>
    </p244:create></soapenv:Body></soapenv:Envelope>

    You will also need to add an HTTP Header as follows:

    name=SOAPAction value=create

    The first part of the XML given above is the Web services call wrapper information. The key part is the graph we send in.

    What we are doing is creating a GenericObject with a relationship called "docs" that has a target of aaa.xsd with version "1" and a target of the test.xsd which is already stored in WSRR with a version "1".

    The graph is just a list of objects that are linked together:

    <sdo_1:WSRR>
    <sdo_1:root>_1</sdo_1:root>
    <!-- This is the collection GenericObject. We set the bsrURI to an id beginning with "_" which tells WSRR that this is a new object. In this case "_1". When it
    is created it will have a proper bsrURI. -->
    <sdo_1:artefacts xsi:type="sdo_1:GenericObject" bsrURI="_1"
    name="Collection">
    <!-- The relationship has 2 targets. The bsrURI of the document in WSRR and "_2" which represents the new document you are trying to create"
    <sdo_1:userDefinedRelationships name="docs" targets="_2 a3d6c3a3-dfe6-464c.8b67.8c16358c67e3"/>
    </sdo_1:artefacts>

    <!-- This is the document in WSRR.-->
    <sdo_1:artefacts xsi:type="sdo_1:XSDDocument" bsrURI="a3d6c3a3-dfe6-464c.8b67.8c16358c67e3" namespace="http://test" location="test.xsd">
    </sdo_1:artefacts>

    <!-- This is the document that you are creating. You can specify location, name and version. The content is base64 encoded, and the contentSize would be that of
    the original document, rather than the base64 encoded content -->
    <sdo_1:artefacts xsi:type="sdo_1:XSDDocument" bsrURI="_2"
    name="aaa.xsd"
    version="1"
    content="base64 encoded content"
    encoding="UTF-8" location="aaa.xsd" contentSize="1799">
    </sdo_1:artefacts>
    </sdo_1:WSRR>
    This will result in a GenericObject being created, but the call will return the bsrURI of that object which you could then use to delete it via the REST interface.

    There's some more info here about setting up documents to specfic versions

    http://publib.boulder.ibm.com/infocenter/sr/v7r5/index.jsp?topic=%2Fcom.ibm.sr.doc%2Fprogramguide47.html

    Alternatively, there is a DeveloperWorks article will help with using the Web Services API available here:

    http://www.ibm.com/developerworks/websphere/library/techarticles/0612_colgrave/0612_colgrave.html

    It was written based on the 6.0 API but applies to all releases.

    I hope you find this information helpful :)

    I am getting similar error when i try to upload the wsdl through java api. The wsdl has an xsd import.

    GSR0166E: An error occurred while trying to invoke the Web service: GSR0008E: Document Test-1.0.wsdl was unable to import the referenced document "Test-1.0.xsd".

    Any one has idea how to resolve this.

    Any help.

    Naga.

    Updated on 2014-04-08T02:14:46Z at 2014-04-08T02:14:46Z by nkollipara
  • MarkSTaylor
    MarkSTaylor
    15 Posts

    Re: WSDL import WSDL, and the REST API

    ‏2014-04-08T09:27:04Z  

    I am getting similar error when i try to upload the wsdl through java api. The wsdl has an xsd import.

    GSR0166E: An error occurred while trying to invoke the Web service: GSR0008E: Document Test-1.0.wsdl was unable to import the referenced document "Test-1.0.xsd".

    Any one has idea how to resolve this.

    Any help.

    Naga.

    Hello Naga,

    It looks like you are using the Web Services API to upload a WSDL, is that correct?

    Has Test-1.0.xsd already been loaded into WSRR?

    Also, can you provide the section of your WSDL that imports the XSD so I can see the location it is trying to use, etc.

    Finally, if you could copy in more of the exception stack information as was done in the first post on this thread, that would be helpful.

    Many thanks and kind regards,

    Mark

  • nkollipara
    nkollipara
    7 Posts

    Re: WSDL import WSDL, and the REST API

    ‏2014-04-08T13:16:08Z  

    Hello Naga,

    It looks like you are using the Web Services API to upload a WSDL, is that correct?

    Has Test-1.0.xsd already been loaded into WSRR?

    Also, can you provide the section of your WSDL that imports the XSD so I can see the location it is trying to use, etc.

    Finally, if you could copy in more of the exception stack information as was done in the first post on this thread, that would be helpful.

    Many thanks and kind regards,

    Mark

    Thanks for your response mike.

    Yes, i am using the web services api to upload the wsdls and Test-1.0.xsd already been loaded to WSRR server.

    import piece in wsdl:

    <wsdl:types>
    <xsd:schema>
    <xsd:import namespace="http://www.services.com/emm/1" schemaLocation="Test-1.0.xsd">
    </xsd:import>
    </xsd:schema>
    </wsdl:types>

    Exception log:

    GSR0166E: An error occurred while trying to invoke the Web service: GSR0008E: Document Test-1.0.wsdl was unable to import the referenced document "Test-1.0.xsd".
    com.ibm.serviceregistry.ServiceRegistryWebserviceException: GSR0166E: An error occurred while trying to invoke the Web service: GSR0008E: Document Test-1.0.wsdl was unable to import the referenced document "Test-1.0..xsd".
    at com.ibm.serviceregistry.ws.WSRRCoreSDOClient.handleServiceRegistryWebServiceException(Unknown Source)
    at com.ibm.serviceregistry.ws.WSRRCoreSDOClient.create(Unknown Source)
    at com.wsrrclient.dataload.WSDLDocumentLoader.createDocument(WSDLDocumentLoader.java:235)
    at com.wsrrclient.dataload.WSDLDocumentLoader.saveDocument(WSDLDocumentLoader.java:89)
    at com.webService.WSRRDocumentLoader.loadWSDLs(WSRRDocumentLoader.java:154)
    at com.webService.WSRRDocumentLoader.loadDocuments(WSRRDocumentLoader.java:95)
    at com.webService.WSRRStandalone.testWsrr(WSRRStandalone.java:20)
    at com.webService.WSRRStandalone.main(WSRRStandalone.java:15)
    Caused by: com.ibm.serviceregistry.ws.ServiceRegistryWebServiceException: GSR0008E: Document Test-1.0.wsdl was unable to import the referenced document "Test-1.0.xsd".
    at com.ibm.serviceregistry.ws.ServiceRegistryWebServiceException_DeserProxy.convert(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at com.ibm.ws.webservices.engine.encoding.ser.BeanDeserializer.valueComplete(BeanDeserializer.java:924)
    at com.ibm.ws.webservices.engine.encoding.Deserializer.endElement(Deserializer.java:694)
    at com.ibm.ws.webservices.engine.events.P2DConverter.endElement(P2DConverter.java:517)
    at com.ibm.ws.webservices.engine.xmlsoap.SOAPElement.toEvents(SOAPElement.java:2332)
    at com.ibm.ws.webservices.engine.xmlsoap.SOAPElement.toContainedEvents(SOAPElement.java:2353)
    at com.ibm.ws.webservices.engine.xmlsoap.SOAPElement.toEvents(SOAPElement.java:2330)
    at com.ibm.ws.webservices.engine.xmlsoap.SOAPElement.toContainedEvents(SOAPElement.java:2353)
    at com.ibm.ws.webservices.engine.xmlsoap.SOAPElement.toEvents(SOAPElement.java:2330)
    at com.ibm.ws.webservices.engine.xmlsoap.builders.WebServicesFaultProcessor.createFault(WebServicesFaultProcessor.java:301)
    at com.ibm.ws.webservices.engine.xmlsoap.SOAPFault.getFault(SOAPFault.java:838)
    at com.ibm.ws.webservices.engine.SOAPPart.getFault(SOAPPart.java:1157)
    at com.ibm.ws.webservices.engine.SOAPPart.getFault(SOAPPart.java:778)
    at com.ibm.ws.webservices.engine.Message.getFault(Message.java:1010)
    at com.ibm.ws.webservices.engine.Message.ifFaultThrowSelf(Message.java:990)
    at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:282)
    at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:229)
    at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:229)
    at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:336)
    at com.ibm.ws.webservices.engine.client.Connection.invokeEngine(Connection.java:930)
    at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:724)
    at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:675)
    at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:497)
    at com.ibm.ws.webservices.engine.client.Stub$Invoke.invoke(Stub.java:948)
    at com.ibm.serviceregistry.ws.WSRRCoreSDOSoapBindingStub.create(Unknown Source)
    ... 7 more
     

    Thanks

    Naga

  • MarkSTaylor
    MarkSTaylor
    15 Posts

    Re: WSDL import WSDL, and the REST API

    ‏2014-04-09T12:32:42Z  

    Thanks for your response mike.

    Yes, i am using the web services api to upload the wsdls and Test-1.0.xsd already been loaded to WSRR server.

    import piece in wsdl:

    <wsdl:types>
    <xsd:schema>
    <xsd:import namespace="http://www.services.com/emm/1" schemaLocation="Test-1.0.xsd">
    </xsd:import>
    </xsd:schema>
    </wsdl:types>

    Exception log:

    GSR0166E: An error occurred while trying to invoke the Web service: GSR0008E: Document Test-1.0.wsdl was unable to import the referenced document "Test-1.0.xsd".
    com.ibm.serviceregistry.ServiceRegistryWebserviceException: GSR0166E: An error occurred while trying to invoke the Web service: GSR0008E: Document Test-1.0.wsdl was unable to import the referenced document "Test-1.0..xsd".
    at com.ibm.serviceregistry.ws.WSRRCoreSDOClient.handleServiceRegistryWebServiceException(Unknown Source)
    at com.ibm.serviceregistry.ws.WSRRCoreSDOClient.create(Unknown Source)
    at com.wsrrclient.dataload.WSDLDocumentLoader.createDocument(WSDLDocumentLoader.java:235)
    at com.wsrrclient.dataload.WSDLDocumentLoader.saveDocument(WSDLDocumentLoader.java:89)
    at com.webService.WSRRDocumentLoader.loadWSDLs(WSRRDocumentLoader.java:154)
    at com.webService.WSRRDocumentLoader.loadDocuments(WSRRDocumentLoader.java:95)
    at com.webService.WSRRStandalone.testWsrr(WSRRStandalone.java:20)
    at com.webService.WSRRStandalone.main(WSRRStandalone.java:15)
    Caused by: com.ibm.serviceregistry.ws.ServiceRegistryWebServiceException: GSR0008E: Document Test-1.0.wsdl was unable to import the referenced document "Test-1.0.xsd".
    at com.ibm.serviceregistry.ws.ServiceRegistryWebServiceException_DeserProxy.convert(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at com.ibm.ws.webservices.engine.encoding.ser.BeanDeserializer.valueComplete(BeanDeserializer.java:924)
    at com.ibm.ws.webservices.engine.encoding.Deserializer.endElement(Deserializer.java:694)
    at com.ibm.ws.webservices.engine.events.P2DConverter.endElement(P2DConverter.java:517)
    at com.ibm.ws.webservices.engine.xmlsoap.SOAPElement.toEvents(SOAPElement.java:2332)
    at com.ibm.ws.webservices.engine.xmlsoap.SOAPElement.toContainedEvents(SOAPElement.java:2353)
    at com.ibm.ws.webservices.engine.xmlsoap.SOAPElement.toEvents(SOAPElement.java:2330)
    at com.ibm.ws.webservices.engine.xmlsoap.SOAPElement.toContainedEvents(SOAPElement.java:2353)
    at com.ibm.ws.webservices.engine.xmlsoap.SOAPElement.toEvents(SOAPElement.java:2330)
    at com.ibm.ws.webservices.engine.xmlsoap.builders.WebServicesFaultProcessor.createFault(WebServicesFaultProcessor.java:301)
    at com.ibm.ws.webservices.engine.xmlsoap.SOAPFault.getFault(SOAPFault.java:838)
    at com.ibm.ws.webservices.engine.SOAPPart.getFault(SOAPPart.java:1157)
    at com.ibm.ws.webservices.engine.SOAPPart.getFault(SOAPPart.java:778)
    at com.ibm.ws.webservices.engine.Message.getFault(Message.java:1010)
    at com.ibm.ws.webservices.engine.Message.ifFaultThrowSelf(Message.java:990)
    at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:282)
    at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:229)
    at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:229)
    at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:336)
    at com.ibm.ws.webservices.engine.client.Connection.invokeEngine(Connection.java:930)
    at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:724)
    at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:675)
    at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:497)
    at com.ibm.ws.webservices.engine.client.Stub$Invoke.invoke(Stub.java:948)
    at com.ibm.serviceregistry.ws.WSRRCoreSDOSoapBindingStub.create(Unknown Source)
    ... 7 more
     

    Thanks

    Naga

    Not a problem Naga.

    Assuming that Test-1.0.xsd has a version set, then you will need to follow the procedure for creating a document that depends on a specific version that is documented here:

    http://pic.dhe.ibm.com/infocenter/sr/v8r0/index.jsp?topic=%2Fcom.ibm.sr.doc%2Fprogramguide47.html

    Let me know if you need any help with this.

    Kind regards,

    Mark

  • nkollipara
    nkollipara
    7 Posts

    Re: WSDL import WSDL, and the REST API

    ‏2014-04-09T12:47:10Z  

    Not a problem Naga.

    Assuming that Test-1.0.xsd has a version set, then you will need to follow the procedure for creating a document that depends on a specific version that is documented here:

    http://pic.dhe.ibm.com/infocenter/sr/v8r0/index.jsp?topic=%2Fcom.ibm.sr.doc%2Fprogramguide47.html

    Let me know if you need any help with this.

    Kind regards,

    Mark

    Thank you Mark, actually i found the same link y'day and tried that.

    It works fine for me.

    Do you know the relationships where we can find the all available relationships?

    Trying to add the objects to the custom relationships but i am not sure what is the relationship name for that.

     

    Thanks

    Naga 

  • MarkSTaylor
    MarkSTaylor
    15 Posts

    Re: WSDL import WSDL, and the REST API

    ‏2014-04-09T14:48:27Z  

    Thank you Mark, actually i found the same link y'day and tried that.

    It works fine for me.

    Do you know the relationships where we can find the all available relationships?

    Trying to add the objects to the custom relationships but i am not sure what is the relationship name for that.

     

    Thanks

    Naga 

    I'm not sure if I understand your question, Naga, but it sounds like you're not sure what name you need to give to the user defined relationships that must join the Generic Object to the WSDL and XSD.

    If so, it really doesn't matter what name you give to those relationships. I have tested it using 'rel1' and 'rel2' as relationship names and it worked fine.

    Kind regards,

    Mark

  • nkollipara
    nkollipara
    7 Posts

    Re: WSDL import WSDL, and the REST API

    ‏2014-04-09T15:17:18Z  

    I'm not sure if I understand your question, Naga, but it sounds like you're not sure what name you need to give to the user defined relationships that must join the Generic Object to the WSDL and XSD.

    If so, it really doesn't matter what name you give to those relationships. I have tested it using 'rel1' and 'rel2' as relationship names and it worked fine.

    Kind regards,

    Mark

    Is the 'rel1' or 'rel2' relationship type which we can see under 'Relationships' in the UI screen (login wsrr -> search for wsdl --> under details tab --> there is one relationships portion)?

    I am trying to add some objects under this portion, thats the reason i am asking.

  • MarkSTaylor
    MarkSTaylor
    15 Posts

    Re: WSDL import WSDL, and the REST API

    ‏2014-04-09T15:35:12Z  

    Is the 'rel1' or 'rel2' relationship type which we can see under 'Relationships' in the UI screen (login wsrr -> search for wsdl --> under details tab --> there is one relationships portion)?

    I am trying to add some objects under this portion, thats the reason i am asking.

    What the UI refers to as a 'Custom relationship' you might see referred to as a 'User defined relationship' in the documentation; they are the same thing. You can name them however you like and they will then appear in the 'Relationships' section of the detail page in the UI.

    You can use the following helper method in your Java code to add a user defined relationship with any name you choose:

    BSRSDOHelper.INSTANCE.addRelationship(<source_object>, <relationship_name>, <target_object>);

    I hope that helps.

    Kind regards,
    Mark

  • nkollipara
    nkollipara
    7 Posts

    Re: WSDL import WSDL, and the REST API

    ‏2014-04-09T15:49:25Z  

    What the UI refers to as a 'Custom relationship' you might see referred to as a 'User defined relationship' in the documentation; they are the same thing. You can name them however you like and they will then appear in the 'Relationships' section of the detail page in the UI.

    You can use the following helper method in your Java code to add a user defined relationship with any name you choose:

    BSRSDOHelper.INSTANCE.addRelationship(<source_object>, <relationship_name>, <target_object>);

    I hope that helps.

    Kind regards,
    Mark

    Yes, i was doing the same way only. I was trying to pull the existing relationships & target objects. I got that now. Pulled the target objects there i saw all the info. Thanks Mark.

  • nkollipara
    nkollipara
    7 Posts

    Re: WSDL import WSDL, and the REST API

    ‏2014-05-02T18:49:46Z  

    Yes, i was doing the same way only. I was trying to pull the existing relationships & target objects. I got that now. Pulled the target objects there i saw all the info. Thanks Mark.

    Mark,

    I am trying to add the newly created wsdl object to the another concept object under relationships. Its taking lot time when i am doing with code but though WebUI its really quick.In my code logic  is  

    BaseObject sbaseObject = wsrr.retrieve(wsdl_bsrURI);
    BaseObject doc = (GenericObject) wsrr.retrieve(conceptBsrURI);
                    BSRSDOHelper.INSTANCE.setTargetObject(doc, "services", sbaseObject, false);
               wsrr.update(doc);
    But the existing concept object has lot of wsdl objects are there under relationship, trying to add the new wsdl to the existing list. its taking lot of time for that and getting outofMemory exception. 

    Do you have any easy way to do this?