WCF: SvcUtil.exe with imports issue - import

One of the requirement in our project is as follows:
We got from client WSDL and XSD files only. Our task is to generate SOAP messages based on these WSDL and XSD files and extract SOAP bodies.
First step we should undertake is to generate client proxy files from given WSDL and XSD files. Main WSDL file has mulitple imports and imported XSD files also have some imports. I've tried to accomplish client proxy files generation by using SvcUtil.exe utility, but the error came up.
I ran SvcUtil.exe in this way:
E:\Projekti\WCF\XSD>svcutil /noconfig rosrazna.ru.xsd.SmevUnifoService.wsdl roskazna.ru.xsd.ResponseTemplate.xsd roskazna.ru.xsd.PGU_ImportRequest.xsd roskazna.ru.xsd.PGU_DataRequest.xsd roskazna.ru.xsd.PGU_ChargesResponse.xsd roskazna.ru.xsd.ExportPaymentsResponse.xsd roskazna.ru.xsd.ExportIncomesResponse.xsd roskazna.ru.xsd.ExportQuittanceResponse.xsd roskazna.ru.xsd.Ticket.xsd
But, this error came up:
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.2152]
Copyright (c) Microsoft Corporation. All rights reserved.
Generating files...
Warning: No code was generated.
If you were trying to generate a client, this could be because the metadata docu
ments did not contain any valid contracts or services
or because all contracts/services were discovered to exist in /reference assembl
ies. Verify that you passed all the metadata documents to the tool.
Warning: If you would like to generate data contracts from schemas make sure to
use the /dataContractOnly option.
I have to mention I did not put imports from XSD files imported in main WSDL file in SvcUtil.exe command. I don't know how to put them.
So, how to solve this?
Thank you in advance.
Goran

#Goran, copy all the referenced xsd files to the same location as the wsdl. Then, when using the svcutil from command prompt, list all the xsds there, or put a *.xsd, like this:
E:\Projekti\WCF\XSD>svcutil /noconfig goransWsdl.wsdl *.xsd
PS: You already seem to be mentioning all the xsds though.

Related

How to create stub/services files with MATLAB grpc plugin?

I'm using MatlabWithProtoV3 to create protoc.exe with matlab_out in Windows environment.
I was able to create protoc and when I use
protoc.exe user.proto --matlab_out=./
It only creating matlab files for proto messages (files can be found in the bottom attachment) and it is not creating matlab files for services(client and server)
Then, I read about plugins and included the generator and plugin files to gRPC Source to create Matlab plugin and created the grpc_matlab_plugin.exe successfully.
Now, when I execute
protoc.exe user.proto --matlab_out=./ --grpc_out=./ --plugin=protoc-gen-grpc="D:\grpc\cmake\build\Debug\grpc_matlab_plugin.exe
I'm getting
pb_descriptor_LoginRequest.m: Tried to write the same file twice.
pb_read_LoginRequest.m: Tried to write the same file twice.
pb_descriptor_APIResponse.m: Tried to write the same file twice.
pb_read_APIResponse.m: Tried to write the same file twice.
pb_descriptor_Empty.m: Tried to write the same file twice.
pb_read_Empty.m: Tried to write the same file twice.
error message and no files are getting created.
in gRPC repo, for C++ compiler i could find cpp_plugin.h has some codes to create service related files but similar file is not available for Matlab in here or here
Can you please let me know how to create Matlab files for services?
Attached the files created when I execute the above mentioned commands,
sample_files.zip
Github issue
Thanks
protobuf-matlab is just a protobuf plugin - it generates code to read/write protocol buffer.
Unfortunately it does not implement a gRPC plugin which would build the client stub and server.
If you are able to call your matlab code from another language, you could host the gRPC server externally, e.g. create a gRPC server in dotnet and use COM to call your matlab code.

PostgreSQL doesn't contain some required header files

I have installed pycparser that parses C code.
Using pycparser I want to parse an open source project, namely PostgreSQL . However, during compilation it cannot found some header files, namely
pg_config_ext.h and pg_config_os.h.
While looking at the directory structure of PostgreSQL, I find that it does not have these header files. How to fix this issue?
These header files are generated from the respective .in files when configure is run.
This will allow conditional compilation depending on the operating system and its configuration.
To compile PostgreSQL, you need what is called a configured source tree in PostgreSQL jargon.
Also note that the build process is somewhat different on Windows, see the documentation for details.

Export OSB resources without using export wizard on JDeveloper

Using JDeveloper in order to create and manage Oracle Service Bus 12c resources, I am able to export the required resources into a .jar file using the Resources Export Wizard of JDeveloper, selecting one by one those needed, under the tree of each project.
What I want to do though is find a way to export a .jar file based on resources list, given in a file of a commonly used format (JSON, CSV etc), as it can be time saving for a large number of resources. My first thought was to search if JDeveloper provides such way or attempt do this programmatically, yet my search on this has not given me any information of how-to.
Is there an alternative way of doing this?
If you have Oracle OSB 11.1.1.7.0 or higher you can automate the compilation process for OSB at project level using configjar, here's a whole example of an implementation which include: compilation using configjar, automating the task retrieving the code from GIT using Jenkins and a python script.
You can also do it using ANT, here's a good document of Oracle explaining that. (I've tried it, but found easier to use configjar, this is the only option for versions below 11.1.1.7.0).
After creating any of those compilation methods you can create a CSV file, parse it with python and loop the compilation.

Where does the Xml Serializer store its dynamically generated code?

The XML serializer in System.Xml.Serialization namespace generates the XmlSerializationReader and XmlSerializationWriter classes dynamically using CodeDOM.
I want to have a look at these classes in the disassembler.
Where does the serializer store the temporary assembly file that has this dynamically generated code? I have been trying to find it out for the last 30 minutes in Reflector but to no avail.
All I gather from Reflector is that it stores it in some temp directory. I looked up C:\temp but there's no .dll there. I looked up C:\tmp and there are some PNG files there that seem like they are not really PNG's but some binary files generated by Windows for storing temporary data.
If you know, please tell me.
Alright, these two threads out of the dozen or so pertaining to this issue that I looked up reveal the answer.
This thread says it is the folder C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp
http://snavin.wordpress.com/2013/04/01/xmlserializer-is-running-does-not-have-sufficient-permission-to-access-the-temp-directory/
But from the stack trace posted in the original question on this thread, it appears that the temp folder of the windows environment, which can be found out by calling System.IO.Path.GetTempPath() is where the dll is saved.
ASP.NET Access to the temp directory is denied
There is an easy way: use sgen.exe to generate necessary assembly by yourself.
On my machine it looks like:
C:>"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\sgen.exe" "C:\Projects\BIN\My.dll"
Microsoft (R) Xml Serialization support utility
[Microsoft (R) .NET Framework, Version 4.6.1055.0]
Copyright (C) Microsoft Corporation. All rights reserved.
Serialization Assembly Name: My.XmlSerializers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
Generated serialization assembly for assembly c:\projects\bin\My.dll --> 'c:\projects\bin\My.XmlSerializers.dll'.

Can't correct deploy infopath 2010 form with formcode

I'm new in Infopath developing, please help. :(
So I'm developing work-flow with custom task edit form.
I designed infopath form CustomApprovalForm.xsn in Infopath Designer 2010 and then I published this form to Workflow project in Module folder which named Form(ApproveWF/Form/).
Then I configured all needed properties for correct deploying. After deploying all works ok and form appears as it should be.
But when I come back to Infopath designer 2010 and add some formcode to CustomApproval.xsn and then I press quick publish to Module folder which I use above and then I deploy the workflow to SP server.
After this the form doesn't appear.
In logs I saw exception:
"Solution deserialization failed with unhandled exception
System.IO.FileNotFoundException: Could not load file or assembly
'file:///C:\Program Files\Common Files\Microsoft Shared\Web Server
Extensions\14\Template\Features\ApproveWF_Feature1\CustomApprovalForm.dll'
or one of its dependencies. The system cannot find the file
specified...."
I suppose, that I'm not correct making publishing infopath form with code behind.
How to correct do publishing infopath 2010 form with code behind to my ApproveWF project which then deploy to SP server?
Where should I place the CustomApproval.dll?
Please help me!!!!
I believe, but I'll have to double-check, that what happened is that you did a full publish first with no code behind the form - this registered the manifest, which did not include a reference to a .dll, since there wasn't one.
You then added code, which gets compiled into a dll, listed in the manifest for the form.
I think when you do a quick-publish, the form files are copied up to the server, but the manifest isn't re-registered. So the form xml/xsl will have calls to the dll, but the manifest won't know where to find it, since it wasn't updated.
tl;dr: when you publish a form then add code to it, you have to run a full publishing cycle again to update the installed manifest.
Post a follow-up if this doesn't work.
I've found the solution.
I have to add new item to Workflow project which named Empty Element. And then I've added dll of xsn CustomForm to it. And then I've deployed this dll with xsn form like feature to sharepoint.