简体   繁体   中英

IBM Worklight Http Adapters

I am using IBM worklight and would like to consume a .NET web service using http adapters. getting the error: "errors": ["Runtime:Runtime: Http request failed: java.net.UnknownHostException:

domain inside the xml typed it in full as [http://localhost/Service/Service1.asmx]

function HelloWorld() { var input = { method : 'get', returnedContentType : 'xml', path : "HelloWorld", transformation : { type : 'xslFile', xslFile : 'filtered.xsl' } }; return WL.Server.invokeHttp(input); }

In adapter's XML

<protocol>http</protocol>

<host>localhost</host>

<port>80</port>

In adapters JS use path:"Service/Service1.asmx"

Also, make sure that your service returns XML and your filtered.xsl contains a valid transformation for returned XML (otherwise just remote transformation property).

I think you are doing the same mistake I was doing few minutes ago. Your HelloWorld function is incomplete. I suggest if you refer to the way the client is constructing the message as per this question: IBM Worklight HTTP Adapter SOAP response: XSL transformation failed

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM