I use an SAP OData (v2) service and request the EDMX service definition by calling
https://service-url/$metadata.
The service definition is quite complex and I have trouble to understand it the XML format.
It starts with:
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:sap="http://www.sap.com/Protocols/SAPData">
<edmx:DataServices m:DataServiceVersion="2.0">
<Schema Namespace="XYZ_SRV" xml:lang="de" sap:schema-version="1" xmlns="http://schemas.microsoft.com/ado/2008/09/edm">
To make it better readable, I would like to download or convert the definition as (into) the YAML format. Like the YAMLs provided for the services on the SAP hub (eg. https://api.sap.com/api/BusinessPartners/overview)
How can I reach this?
Unlikely you will be able to do that if you do not own this service.
You can try, however, utilize Swagger-based SAP API Designer, which is a part of CloudFoundry service SAP API Management
You must buy subscription to it (or try in trial mode), then enable API Management in dashboard and in finally Designer you can parse the service metadata and then download it in the suitable format
I notice that I didn't try it myself, but just heard that such facility exists, so rather try to read API Management documentation, than asking me.
Related
Can quickbooks libraries be integrated into genexus? I have no knowledge
Applications generated with GeneXus can be integrated with QuickBooks.
Depending on the version of QuickBooks (desktop or online) you have different methods to integrate with QuickBooks.
For QuickBooks desktop, including all versions (Standard, Premier, Enterprise), you can use either the QuickBooks SDK or you will use QuickBooks Web Connector.
You will have to select your method early in the development process, the two methods are very different. The defining factor will be if QB and the interface application will be running on the same computer. If they are not, then you will have to use QB Web Connector. If you are generating Java, you will also have to use QB Web Connector.
QB Web Connector initiates all the communications, so you will have to respond to the pre defined requests that QB Web Connector will trigger.
To send/receive messages, you use qbXML, which uses XML (SOAP) messages.
In GeneXus, we created a main object with call protocol set to HTTP.
Create a variable &HttpRequest of type HttpRequest.
Here is an example of the code in GeneXus
&strRequest = &HttpRequest.ToString()
&CompletePercent = 0
if &HTTPRequest.Method = HttpMethod.Post
&strRequest = &HTTPRequest.ToString()
Every API call returns a message, so you will have to check for errors.
Internally, QB uses identifications that look like GUIDs called List ID and transaction ID. You will get these in the response and will want to save them for future use.
The API documentation is here:
https://developer.intuit.com/app/developer/qbdesktop/docs/get-started/get-started-with-quickbooks-web-connector
This example creates a vendor.
<?xml version="1.0" encoding="utf-8" ?>
<?qbxml version="12.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<VendorAddRq requestID="2">
<VendorAdd>
<Name>Gildan</Name>
<CompanyName>123456</CompanyName>
<VendorAddress>
<Addr1>Gildan</Addr1>
<Addr2>524 Main Street</Addr2>
<City>SANTA ROSA</City>
<State>CA</State>
<PostalCode>95401</PostalCode>
</VendorAddress>
<Phone>555-555-5555</Phone>
</VendorAdd>
</VendorAddRq>
</QBXMLMsgsRq>
</QBXML>
I am trying to integrate Salesforce with SAP HCI and for that I am using Eclipse. I am following this guide and the WSDL I am using was generated in the Salesforce portal. The problem is that when I deploy the integration flow, I get the following error: "The operation defined in the WSDL must not define an output, only one-way operations are allowed". This doesn't make sense. To test this, I create my own WSDL with just input parameters and I still get the same error. What am I not getting?
That sounds weird, SAP HCI (now CPI) supports not only one way operations but it might be due to a setting you had in your SOAP channel (e.g. Reliable), how does your channel settings and WSDL look like?
I have been playing around with the RPC package in Dart which makes it easy to add a Document Discovery service to Dart server.
After a bit of Googling I found out about the API Discovery Service https://developers.google.com/discovery/ which explained how to create client code for a given Discovery Document.
I then found Google Cloud Endpoint which looks like the server end of the a Document Discovery service. Is this true.
My real question is that I would like to use the Document Discovery service on a standard web site that is based on (say) Spring and running (say) an embedded Jetty server? Is this possible or would my application be intertwined with the App Engine Technology?
You application just needs to provide a Document Discovery service.
It shouldn't be to hard to get the information what is expected out of the source of https://pub.dartlang.org/packages/discovery_api_client_generator which is the Dart client which generates Dart client code from discovery documents. As far as I know your service doesn't even need to provide the discovery documents. The discovery_api_client_generator package can also use discovery documents stored locally but the service is of course the preferred way if you want to make it available to everyone.
I would see it as equivalent to SOAP which also allows to create client code from meta-information provided as XML.
Also the shelf_rpc package doesn't need to run on AppEngine or Managed VM. You can run it locally or on any server you want.
I'm calling a web service, and I'm suspecting its response is not according to its specification. I'm not a WSL specification expert, so I'd like to ask if someone knows a tool that can be used to perform a validation between a WSDL file and a sample XML response. Does anyone know a tool that can validate if a sample XML response is according to WSDL specification?
Also, if you know a tool which I can provide the WSDL file and it generates a sample XML response it would work too.
Thanks,
SOAP UI is the perfect tool for this. Create a Test Case and add 'schema compliance' assertion. This would validate whether the SOAP response is compliant with the WSDL specification or not.
Detailed instruction can be found here: https://www.soapui.org/soap-and-wsdl/validating-soap-services.html
Thanks,
Sandeep
I have encountered a problem with my WCF data service. One of tables contains too many data to return(about 80 fields) so that the size limit would be exceeded by only one record(above 60k by estimation, I can't tell accurately because the message can't be seen as a result of interruption of message outputting).
So far I have found that it can be worked around by two means.
To raise the message size limit.
To change the data transfer format to Json.
For both solution are there some problems to overcome.
There are a lot of articles on web explaining how to configure WCF service to change the buffer size or reader quota. But I don't know how WCF data service works because the official documents didn't show how to configure WCF data service declaratively. Does WCF data service support the same configuration metaphors? And how to achieve it?
The WCF data service client library seems not to support json format out of box. I have to implement the same functions by myself. My question here is that is any odata json parser existing out there in C#?
For problem #1, check out the topic Streaming Provider (WCF Data Services), which includes this WCF configuration to enable large messages to and from an OData service using WCF Data Services:
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
<services>
<!-- The name of the service -->
<service name="PhotoService.PhotoData">
<!--you can leave the address blank or specify your end point URI-->
<endpoint binding="webHttpBinding"
bindingConfiguration="higherMessageSize"
contract="System.Data.Services.IRequestHandler"></endpoint>
</service>
</services>
<bindings>
<webHttpBinding>
<!-- configure the maxReceivedMessageSize value to suit the max size of
the request (in bytes) you want the service to receive-->
<binding name="higherMessageSize" transferMode="Streamed"
maxReceivedMessageSize="2147483647"/>
</webHttpBinding>
</bindings>
For problem #2, the WCF Data Services client doesn't support JSON, only Atom XML. Have you tried the post Using System.Json for non-Silverlight projects? which seems to have some helpful info on other alternatives for parsing JSON from a data service on the client.
To use JSON with WCF Data Services, you need the WCF Data Services Toolkit, downloadable for free at http://wcfdstoolkit.codeplex.com.
This enables the option to tack on "$format=json" to the end of your REST queries, as in:
http://myservice/Products?$format=json