I am trying to use SVCUTIL from the SDK to generate the common types in several web services. When I try to generate code I get the errors (shown at the bottom)- these suggest the WSDL is broken. However, if I import the service in ServiceReferences Visual Studio does not complain. Is SVCUTIL broken?
The WSDLs are public and are:
http://test.wlr3.net/empws/services/WLR3AssuranceServices?wsdl
http://test.wlr3.net/empws/services/WLR3BillingServices?wsdl
http://test.wlr3.net/empws/services/WLR3DialogueServices?wsdl
http://test.wlr3.net/empws/services/WLR3FulfillmentServices?wsdl
http://test.wlr3.net/empws/services/WLR3InventoryServices?wsdl
http://test.wlr3.net/empws/services/WLR3InventoryOrderServices?wsdl
http://test.wlr3.net/empws/services/WLR3InventoryTroubleReportServices?wsdl
http://test.wlr3.net/empws/services/WLR3InventoryWorkItemServices?wsdl
http://test.wlr3.net/empws/services/WLR3IssueServices?wsdl
http://test.wlr3.net/empws/services/WLR3ReportingServices?wsdl
http://test.wlr3.net/empws/services/WLR3SecurityServices?wsdl
If you check these out you'll see a lot of common types and several namespaces. I've tried sending these to SVCUTIL to generate the code but it doesn't like the FulfillmentServices and the InventoryServices ones:
Error: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporter
Error: Cannot import invalid schemas. Compilation on the XmlSchemaSet failed.
XPath to Error Source: //wsdl:definitions[#targetNamespace='http://imperatives.co.uk/V20']/wsdl:portType[#name='WLR3FulfilmentServices']
Error: Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[#targetNamespace='http://imperatives.co.uk/V20']/wsdl:portType[#name='WLR3FulfilmentServices']
XPath to Error Source: //wsdl:definitions[#targetNamespace='http://imperatives.co.uk/V20']/wsdl:binding[#name='WLR3FulfillmentServicesHttpBinding']
Error: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[#targetNamespace='http://imperatives.co.uk/V20']/wsdl:binding[#name='WLR3FulfillmentServicesHttpBinding']
XPath to Error Source: //wsdl:definitions[#targetNamespace='http://imperatives.co.uk/V20']/wsdl:service[#name='WLR3FulfillmentServices']/wsdl:port[#name='WLR3FulfillmentServicesHttpPort']
As per comments to the question, there is a small difference in the two problem WSDLs. I compared these with older versions and found there is a type in these based on a virtual base type called "Dto".
This is applied to only two types - one in the Fulfillment Services and one in the Inventory Services, and these are also found in other WSDLs but without the base - the WSDL files are not consistent.
So I can exponerate SVCUTIL here and give the supplier a kick..
Thanks to John Saunders for looking at it
Related
I am trying to understand how to read and write data on text files using path_provider plugin.
I've read an example on how to use it on Flutter from here. Then I saw this line of code which I don't understand:
import "package:flutter/foundation.dart";
I tried to comment it out from the code and ran "flutter run":
//import "package:flutter/foundation.dart";
And to my surprise, it ran perfectly. Although it raised some errors like:
E/DartVM (23127): 'dart:core/runtime/libintegers.dart': error: Unexpected tag 0 (Nothing) in ?, expected expression
E/DartVM (23127): ../../third_party/dart/runtime/vm/compiler/intrinsifier.cc: 153: error: Intrinsifier failed to find method ~ in class _Smi
and
E/DartVM (23237): 'dart:typed_data': error: Unexpected tag 15 (DirectPropertyGet) in ?, expected type
E/DartVM (23237): ../../third_party/dart/runtime/vm/compiler/intrinsifier.cc: 153: error: Intrinsifier failed to find method get:x in class _Float32x4
But it ran well. I don't know why. When should I use it? What method from the code did the foundation.dart was used?
I would appreciate any kind of enlightment. Thanks in advance.
[UPDATE]
I think I understand why foundation library was used in the example code. Maybe because the example code used the "required" constant from the foundation library.
I'm running the prebuilt Windows Agda version 2.4.2.2. In Emacs/Agda2 Include Dirs I have identified c:/agda-stdlib-0.13/src and the folders one level below.
Upon loading a module which consists only these two lines, I get an error message.
module test1 where
open import Integer
The error message:
C:\agda-stdlib-0.13\src\Data\Empty.agda:13,5-5
C:\agda-stdlib-0.13\src\Data\Empty.agda:13,5: Parse error
HASKELL<ERROR> data AgdaEmpty #-} {-# COMPIL...
Is something missing from the proper installation of the library?
Your Agda is old. See this page for library compatibility. You need Agda 2.5.2 for this library.
How do I subscribe to an event implemented in F# from a C# client?
I have the following code:
_dispatcher.SignInRequested += StartActivity(typeof(SignInActivity));
This line results in the following error:
Error CS0012 The type 'FSharpHandler<>' is defined in an assembly that
is not referenced. You must add a reference to assembly 'FSharp.Core,
Version=3.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
I attempted to troubleshoot and found this:
However, I do not understand the answer. My events are defined under a namespace and not a module. Hence, me not understanding the reasoning of that discussion.
I then tried adding the following reference to my C# project:
FSharp.Core 4.0.0.1
and
FSharp.Core 3.1.2.5
However, I still receive the same error.
When managing Nuget packages, I do not see the version "3.3.1.0" listed as an option.
Implementation Details:
The signature of the signin event from the C# client is the following:
public event FSharpHandler<Unit> SignInRequested;
I actually declare the event as the following:
let signInRequested = new Event<_>()
Any suggestions?
You need to have a look at the CLIEventAttribute . Events declared from F# cannot be used from C# unless they are declared with this attribute.
I am trying port to Dart this nice paper-datatable implementation using custom_element_apigen.
Some problems occurred and sought to find solutions according to my understanding (perhaps included more problems!).
However, still an error is thrown and not been able to move on. I need some help about how port to Dart!!! I will briefly describe the steps, errors and solutions that gave and a link to source code of the project test:
1) I following the steps, accord to https://github.com/dart-lang/custom-element-apigen. I had problems on Windows, but I got to resolve after (custom_element_apigen: gives an error importing paper-datatable to Dart)
2) apigen.yaml used with custom_element_apigen does not clear how to configuration.
I used the "trial-and-error" method until no more error occur. It was so:
files_to_generate:
- paper-datatable\paper-datatable.html
- paper-datatable\paper-datatable-column.html
- paper-datatable\paper-datatable-edit-dialog.html
- paper-datatable\paper-datatable-card.html
- paper-datatable\paper-datatable-styles.html
- paper-datatable\datatable-icons.html
files_to_load:
- package:polymer_elements/src/paper-material/paper-material.html
- package:polymer_elements/src/iron-ajax/iron-request.html
- package:polymer_elements/src/iron-ajax/iron-ajax.html
- package:polymer_elements/src/iron-form/iron-form.html
- package:polymer_elements/src/iron-meta/iron-meta.html
- package:polymer_elements/src/iron-icon/iron-icon.html
- package:polymer_elements/src/iron-iconset-svg/iron-iconset-svg.html
- package:polymer_elements/src/paper-ripple/paper-ripple.html
- package:polymer_elements/src/paper-checkbox/paper-checkbox.html
- package:polymer_elements/src/neon-animation/animations/opaque-animation.html
- package:polymer_elements/src/neon-animation/animations/fade-in-animation.html
- package:polymer_elements/src/neon-animation/animations/fade-out-animation.html
- package:polymer_elements/src/paper-tooltip/paper-tooltip.html
- package:polymer_elements/src/iron-resizable-behavior/iron-resizable-behavior.html
- package:polymer_interop/src/js/debug/src/lib/template/templatizer.html
Some paths imports were wrongs on paper-datatable*.(html and dart) files. p.e. : import 'packages\polymer_interop\src\js\debug\src\lib\template\templatizer.dart'; I changed to import 'package:polymer_interop/src/behaviors/templatize.dart';
on paper_datatable_column.dart.
I changed reserved Dart word default to defaultx on get defaultx => jsElement[r'default']; and set defaultx(value) { jsElement[r'default'] = (value is Map || (value is Iterable && value is! JsArray)) ? new JsObject.jsify(value) : value;} instructions on paper_datatable_column.dart and paper_datatable_card.dart;
After the following erros were occuring in several polymer componentes. P.e.: Failed to execute 'registerElement' on 'Document': Registration failed for type 'iron-meta'. A type with that name is already registered.
I changed all paths into paper-datatable*.* files to get official package (pub.dartlang) of the polymer and polymer elements. P.e.: <link rel="import" href="paper_icon_button_nodart.html"> to <link rel="import" href="../../packages/polymer_elements/paper_icon_button_nodart.html">. The register problem does not occur more!
But now, the following problem is occuring and I don't know how to resolve it: On debug console appear the following message: Uncaught SyntaxError: Unexpected token =>. The web app works on browser, but the paper-datatable does not appear.
My complete test project (webstorm) is on https://github.com/supermuka/paper_datatable_port_dart_demo
Is there some wrong in how I used Dart custom_element_apigen (and apigen.yaml)? Did I some things wrong on paths changed? I also need to change some other source?
Thanks!
Most likely you just created a syntax error when editing the files. That being said there are options built in to do most of the things you manually did, and that also makes it easier to update in the future.
omit_imports: This is used on individual items in the files_to_generate section. It can be used to get rid of the templatizer import entirely, resolving issue #3. See example here.
name_substitutions: This is used on individual items in the files_to_generate section, and allows you to rename fields. You can use this to resolve issue #4, example here.
stubs_to_generate: This option allows you to generate stubs which actually import elements from a different package, this should resolve issue #5 you listed above. See example usage here.
Hopefully that helps, and applying those options will just resolve your issues.
I am using analyzer_experimental to parse a Dart file into a CompilationUnit:
import 'package:analyzer_experimental/analyzer.dart';
var unit;
try {
unit = parseDartFile(path);
} on AnalyzerErrorGroup catch(e){
print(e);
}
The above code will catch any parsing errors encountered.
I am also interested in seeing any warnings associated with the file (e.g. 'Undefined name "foo"'). I know that the experimental_analyzer library has the capability to generate these warnings when running from the command line but it does not seem to be possible to get the warnings programmatically, without directly referencing classes in the src folder (which seems like a bad idea).
Is there any way to achieve this?
It's likely this package was very incomplete at the time.
There's now an analyzer package on pub and also a (work-in-progress) STDIN/STDOUT Analyzer Service aimed to help making tooling support easier for IDE extension authors.