BES Administration WSDL Generation Documentation Incorrect - c#

I'm trying to administer my BES 5.0 servers using C# and the following URL seems to not only tell me to generate a WSDL for an incorrect namespace (does not exist) but it also generates collisions.
http://docs.blackberry.com/en/developers/deliverables/16633/Generate_the_client_proxy_925487_11.jsp
What is the correct way to set up the WSDL for the BES admin api?

The correct way is the following command, one line, with the FQDN of the server:
wsdl.exe /sharetypes /out:C:\Temp\proxy.cs https://myFQDN/baaws/core/ws?wsdl https://myFQDN/baaws/core/wsutil?wsdl https://myFQDN/baaws/emailexchange/ws?wsdl https://myFQDN/baaws/dispatcher/ws?wsdl
Alternate WSDL for Groupwise: (append) baaws/emailgroupwise/ws?wsdl
Alternat WSDL for LotusNotes: (append) baaws/emaildomino/ws?wsdl

Related

How to hit Web Service Based on WSDL

Here is the WSDL
http://cc93161263da499cb8f0e0e0b2bcc5a9.cloudapp.net/Service1.svc?wsdl
How can I get to the GetHello service
I tried
http://cc93161263da499cb8f0e0e0b2bcc5a9.cloudapp.net/Service1.svc/GetHello
But I receive a bad request error....
Any thoughts...
Easiest would be to use VS to generate a client proxy based on the WSDL (Add a Service Reference to your project).
Regarding the error: it could be because you're not passing in an input parameter... looks like there is a blank sequence. Or that your browser is sending in accepts parameters that don't match what the server expects (soap).
See this for command line generation without VS:
http://cc93161263da499cb8f0e0e0b2bcc5a9.cloudapp.net/Service1.svc?help

Custom Tool Warning error verifying some XML Schemas during export

I have a web service that I want to consume driven by PHP and SOAP. I can add the web service just fine and I get the list of methods when I added(used add service reference when added). But now I get an error:
Warning 1 Custom tool warning: There was an error verifying some XML Schemas generated during export:
Type 'http://www.w3.org/2001/XMLSchema:struct' is not declared. localPATH:Reference.svcmap 1 1 SOAP_Webservice_Test
From what I understand, this is due to a specific type that I have in my PHP Soap API. I have googled but none of the mentioned fixes does it for me.
Any suggestions how to proceed with my debugging?
Closing this because the problem was not in the client, it was in the soap server I tried to refer to.

How to make sense of PHP WSDL

A client (company, not application) has provided a URL to a php-based web service. When I try to work from its url with SOAPUI, WCFTestClient or SvcUtil, all give various levels of non-success.
It looks very much as though there is a case-sensitivity issue. SvcUtil indicates, for example:
Error: There was an error verifying some XML Schemas generated during
export: Type 'http://www.w3.org/2001/XMLSchema:datetime' is not
declared.
Note the case of what I believe should be DateTime.
Is there a way (tool?) that can help generate the C# client side/translate from case-insensitive WSDL?
Note, my web service experience is modest and the customer's is even less so sorry for the basic question. Thanks!

Header Namespace Mismatch Issue

I have a wsdl generated from XSD using WCSF Blue. I am using the service from a console application client. I am getting the following exception (SOAP?). What’s wrong in the wsdl? How can we correct it?
Header namespace mismatch in member UserCredentials of type RestaurantService.AddRestaurant.
The header namespace found in the description is urn:thinktecture-com:demos:restaurantservice:headerdata:v1.
The element namespace deduced by the formatter is urn:thinktecture-com:demos:restaurantservice:wsdl:v1.
This mismatch can happen if the Namespace specified in XmlElementAttribute or XmlArrayAttribute does not match the namespace specified in the MessageHeaderAttribute or MessageHeaderArrayAttribute or the contract namespace.
WSDL
Header Data
I am planning to use the following approach:
Verify all things mentioned in 400 Bad Request Exception: Simple SOAP WCF service with small data
The service code is generated from wsdl using a tool (WCSF blue). Using the service, when wsdl is generated it is slightly different. So,
Try to create a client using the wsdl obtained by browsing the svc file. Refer the end point address in the config file in this new client. Verify that our client's adress is same as this client's address.

wsdl.exe with SSL/TLS

I've been trying to give more information to the provider about the error I'm getting when trying to consume one of his WS.
They asked me to use wsdl.exe to execute the following command:
wsdl.exe /l:CS /protocol:SOAP /verbose /sharetypes https:example.com/?wsdl
I did it, and got:
Error: There was an error processing 'https://example.oom?wsdl'.
- There was an error downloading 'https://example.com?wsdl'.
- The request was aborted: Could not create SSL/TLS secure channel.
Thing is that I have a cert to navigate that "https://example.com?wsdl" and I think it's properly installed.
When I try to go to that URL in IE I only need to select the cert from a list and give it a certain permission. Then the wsdl is displayed.
I asked my WS provider to tell me how can I tell the command: "use ssl. Use this cert". They told me to ask my networking team, but I've got no such thing, so I asked google, and I found: 1) enable SSL/TLS (if that means go to: IE > Internet Options > Advanced > SSL/TLS enabled, I did it) and 2) check the cert is installed and available. Which I think it is.
Can anyone tell me what can I do?
How is it that the cert is installed, but the command can't reach it?
Are you saying that you need to supply a client-side certificate to navigate to that web page? If that's the case, I'm not sure you can use the wsdl.exe tool directly to connect to it.
But you don't need to. Load the WSDL up in IE and save it as XML, then point wsdl.exe to the local copy of the file. The only difference in the output will be the default endpoint address embedded in the proxy class. You should be setting that value up at run-time anyway, but you can always just edit the auto-generated C# code and fix it. The actual service and data contracts and the implementation code will be exactly the same.
One caveat: if this WSDL is produced by WCF, you have some extra work to do. WCF produces a federated WSDL definition: often times there are a half-dozen or more separate XSD files that make up the whole WSDL definition. Typically, the connection-related information is found in one file, while the type information is pulled in from somewhere else using tags that look like this:
<wsdl:types>
<xsd:schema targetNamespace="foo">
<xsd:import schemaLocation="https://localhost/Foo.svc?xsd=xsd0" namespace="foo"/>
<xsd:import schemaLocation="https://localhost/Foo.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
<xsd:import schemaLocation="https://localhost/Foo.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/Foo.Model"/>
<xsd:import schemaLocation="https://localhost/Foo.svc?xsd=xsd3" namespace="http://schemas.datacontract.org/2004/07/System.Collections.ObjectModel"/>
</xsd:schema>
</wsdl:types>
If that's true, you will need to do two things to get the WSDL you need:
Download all of the files that are referenced; these will be either <?include> directives or <wsdl:import> tags found within the other XMLs file, which pull in a second one. You need to check each new file, as there are often second and third level imports. Put everything into one folder.
Edit all of those include references to remove the URLs and just use local file references.
Once that's done, wsdl.exe should run fine. (In .NET 4.5 there is built-in support for flattening the WSDL file out dynamically, but until then you have to do it manually.)
Download the wsdl into your browsersave it to file and then use wsdl.exe on the local file.

Categories