Problems using a Web Reference

Problems using a Web Reference

  
Hi,

I'm trying to use a commercial webservice in my OutSystems eSpace (from http://www.webservices.nl, Dutch only). The webservice itself uses the SOAP/ WSDL interface. They provide different interfaces for use with SOAP with headers and SOAP without headers, although I don't know how OutSystems handles them.
When I try to use a method I get an error, stating: "Method Webservicesnl.login can not be reflected."

The complete message in Service Center consists of 2 parts:

Message: [1] Method Webservicesnl.login can not be reflected.

Stack: at ssWebServicesNl_Test.Flows.FlowWebFlow1.ScrnResultScreen.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()

Message: [2] The header property/field Webservicesnl.HeaderAuthenticateValue is missing or not public.

Stack: at System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo methodInfo, Boolean client, XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, String defaultNs)

Does anyone have an idea about what's going wrong?

Kind regards,
Lennart Kraak
Hi Lennart,

To use those web services the easiest way would be the soap without headers interfaces (eg: https://ws1.webservices.nl/address/soapnoheaders?wsdl).
With these interfaces I believe you must first call the login web reference action to receive a token (reacid) and then send that token in all subsequent requests.

Cheers,
Tiago Simões
Hi Tiago,

Thanks for your reaction.
I already used both the 'noheaders' (with the login token) and 'soapsimple' (alway send user/pass) options of this web service. This solves the second error message about the missing soap headers.
The error about the login method which can not be reflected still exists.

I've worked around this problem by creating an extension that uses the webservice. This works fine.

Kind regards,
Lennart

Digging-up this thread...

 

OutSystems has released, a while ago, an update to extension Enhanced Web References that allows easy use of SOAP Headers in Web Service calls.

For future needs for webservices with SOAP Headers, you might want to take a look at it:

 

 

http://www.outsystems.com/networksolutions/projectdetail.aspx?projectid=27

 

Cheers,

 

Acácio

Hello,
This is an old thread but the message I received seems to fit in here: Method xxxx can not be reflected.

Attached is a Word document that contains my flow, error message, and logs. I do NOT know much about SOAP headers and web services but what I am trying to do is strictly within OutSystems.

·         Java 5.0 à Java 5.0 – works fine
·         .Net 5.1 (CE) à .Net 5.1 (CE) – works fine
·         .Net 5.1 (CE) à Java 5.0 – gets Reflect error

I have not specifically defined any logins or authentication.  Curious thing about the first error message is that it is having an problem reflecting ‘PartialResults’. The method I am invoking does NOT have such an attribute defined, it IS defined in one of the other methods of the service.

I will try to figure out the enhanced Web Reference mentioned on this post but don’t understand why a simple cross-platform OutSystems à OutSystems connection requires additional coding.

Can anyone help me figure this out and get the connection going?

Thanks,

Alex C.
I downloaded the Enhanced Web Reference solution that Acacio mentions above. Modeled my test stub to look like the solution's included eSpace. Don't know anything about SOAP headers so just used what the sample had to get the right syntax and expected some new error message or something when I ran the program.

Turned on the debugging at public espace on the WS host (provider), ran my program, and got the same can not reflect message.

What is so different with a .Net --> Java Web Service call?

Any insight to get me going again is greatly apreciated.

Alex C.
ISSUE FOUND:

I still don't understand why .Net -> .Net and Java -> Java works with my test WS but found a solution to the .NET reference -> Java service relect bug...

One of my return attributes was a Boolean (as in FileExists). Changed it to Text and all is fine now.

Alex C.
Hi Alex

Can you attach the original WSDL that you used to consume the web service (or a blank eSpace in which you just imported the WSDL)? From your description of the solution I find it very strange that the problem was just that.

Actually, looking at the DOC that you sent us, the error gets clearer:


From the [3] error, it seems that a non-nullable type was set as nullable in the WSDL. If changing a type from boolean to text solved it, it probably means that the boolean type was also nullable - which is apparently not valid in rpc/literal.

And it actually makes sense - a three-state boolean value (true/false/null)?

I can confirm that that is the case if you upload the WSDL - or you can look at it yourself and let us know your conclusions.

Cheers,
Actually I just read your previous posts better and I will send you an email on behalf of Support - getting the OMLs from the Java and the .NET environment will certainly help assert what is wrong.

Cheers,

Acácio Porta Nova wrote:
Hi Alex

Can you attach the original WSDL that you used to consume the web service (or a blank eSpace in which you just imported the WSDL)? From your description of the solution I find it very strange that the problem was just that.

Actually, looking at the DOC that you sent us, the error gets clearer:


From the [3] error, it seems that a non-nullable type was set as nullable in the WSDL. If changing a type from boolean to text solved it, it probably means that the boolean type was also nullable - which is apparently not valid in rpc/literal.

And it actually makes sense - a three-state boolean value (true/false/null)?

I can confirm that that is the case if you upload the WSDL - or you can look at it yourself and let us know your conclusions.

Cheers,
 
 
Hi

Just to add to this thread - I confirmed that there is a problem importing (in a .NET Platform Server) web-services that are created in the Java version  of the Agile Platform, if you use methods with parameters of type Boolean.

This only affects web-services created by the Agile Platform for Java and consumed in the Agile Platform for .NET. Other types of web-services with parameters of type Boolean will work correctly.

I have reported this internally to R&D. The easy workaround is to have the Boolean value inside a structure, instead of directly as the parameter type.
This happens with all current .NET versions (6.0.1.15, 5.1.1.30, 5.0.2.57).

Cheers,