GKN

I am consuming a java webservice from a smart client windows application .Net CF 1.0. I included the web reference url for java webservice while i compile the application. the auto generated code gives an error.

Here is the autogenerated code:

<System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace:="http://ejb.sync.com", ResponseNamespace:="http://ejb.sync.com", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
Public Function login(<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable:=true)> ByVal userName As String, <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable:=true)> ByVal password As String) As <System.Xml.Serialization.XmlElementAttribute("loginReturn", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable:=true)> String
Dim results() As Object = Me.Invoke("login", New Object() {userName, password})
Return CType(results(0),String)
End Function

Error message: Field or property 'Form' is not found.

The above function gives error on highlighted xml element. 'Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable:=true'

Can anyone know about this issue.



Re: .NET Compact Framework Web proxy for .net CF 1.0

Ilya Tumanov

See this.






Re: .NET Compact Framework Web proxy for .net CF 1.0

GKN

I am trying to consume a java webservice from .net compact framework 1.0. while invoking the webservice from my proxy class it raises a exception

An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll

I want to know where is the problem, its from my proxy class what i am sending as input is not correct or web service not able to process my input.

I would appreciate your help on this, thanks.





Re: .NET Compact Framework Web proxy for .net CF 1.0

Ilya Tumanov

What's the stack trace (you can see it if exception is left unhandled) What is the last user code (e.g. in generated proxy code or in your code) on that stack trace Also, which version of NETCF V1 are you using






Re: .NET Compact Framework Web proxy for .net CF 1.0

GKN

Thanks for your response. I tried to get the inner exception, but it gives nothing. Exception is raising on proxy code not on my code. I am using .net CF v 1.0

<System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace:="http://ejb.sc.st.com", ResponseNamespace:="http://ejb.sc.st.com", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _

Public Function login(<System.Xml.Serialization.XmlElementAttribute(IsNullable:=true)> ByVal userName As String, <System.Xml.Serialization.XmlElementAttribute(IsNullable:=true)> ByVal password As String) As <System.Xml.Serialization.XmlElementAttribute("loginReturn", IsNullable:=true)> String

Dim results() As Object = Me.Invoke("login", New Object() {userName, password})

Return CType(results(0),String)

End Function

In the above highlighted code, exception raises.

An unhandled exception of type 'System.Web.Services.Protocols.SoapException' occurred in System.Web.Services.dll







Re: .NET Compact Framework Web proxy for .net CF 1.0

Ilya Tumanov

That seems to be not the same exception as you reported before. So which one are you getting

Also, did you just removed these "Form:=System.Xml.Schema.XmlSchemaForm.Unqualified" from the proxy code or did you change the web service itself so they won¡¯t be required Just removing these would not work.

Finally, does it work with NETCF V2 If it does you should strongly consider using V2. In fact you should strongly consider using V2 no matter what. Very soon you¡¯ll be more likely to find device with V2 in ROM than with V1.






Re: .NET Compact Framework Web proxy for .net CF 1.0

GKN

I have changed the wsdl schema xml i added the below element to the java webservice wsdl.

elementFormDefault="qualified"

after that i refreshed my proxy class, Proxy class removed the "Form:=System.Xml.Schema.XmlSchemaForm.Unqualified".


Now, I am getting this below exception:

An unhandled exception of type 'System.Web.Services.Protocols.SoapException' occurred in System.Web.Services.dll

Without this element attribute "Form:=System.Xml.Schema.XmlSchemaForm.Unqualified" I can't call the webservice

Thanks





Re: .NET Compact Framework Web proxy for .net CF 1.0

Ilya Tumanov

If you changed WS code so it won't need that you should be able to. That means you're hitting some other issue. Can you create simple WS which returns, say, string and try that






Re: .NET Compact Framework Web proxy for .net CF 1.0

GKN

What I am consuming is a simple java webservice. It doesn't have any process.

How we can know that from which the problem ocurrs i.e. From the java web service or from proxy class





Re: .NET Compact Framework Web proxy for .net CF 1.0

GKN

I am consuming a java web service(intranet application) from .net CF 1.0. I am facing some problems on consuing the web service.

I developed a sample proxy class in windows vb.net application to invoke the java web service It works well. But the same code i am using for the .net CF 1.0 its not working. I can't assume where the problem occurs.

Is that I want to set any web proxy for .net compact framework code. If you have any suggestions on this issue pls let me know.

thanks in advance.





Re: .NET Compact Framework Web proxy for .net CF 1.0

Ilya Tumanov

Please do not create new threads for the same issue.

Since you're getting SOAP exception it's pretty safe to assume generated proxy code is not the issue. NETCF simply does not like the SOAP packet it's getting from your WS.

The best thing to try is NETCF V2 which resolved many WS related issues. If it works then dump V1 (why are you using it in first place It¡¯s so obsolete, it¡¯s like developing for Windows 95) and use V2 or even aim for 3.5.






Re: .NET Compact Framework Web proxy for .net CF 1.0

GKN

Understand my problem. We are using hand held scanners which supports only .net CF 1.0. (the scanners won't support .net CF 2.0 and other version ).

so you are saying that we can't use the .net CF 1.0 to consume our java web service with soap

Thanks





Re: .NET Compact Framework Web proxy for .net CF 1.0

Ilya Tumanov

I'm just saying - try newer version (use emulator if you device can¡¯t handle V2), see if it works.

NETCF V1 was working with Java based WS but it was sort of picky. It V2 works it might be a known issue, may be there¡¯s a workaround for V1.

By the way, what kind of device is that If it can¡¯t handle NETCF V2 it must be really old, probably already discontinued. Just wondering what are you planning to do if these devices are no longer available...

Also, which version of NETCF V1 are you using Is it SP3

This might be of help.






Re: .NET Compact Framework Web proxy for .net CF 1.0

GKN

Thanks for your reply. We are using .Net CF V1 with sp3.

we know that our device is an old one. But due to finiancial circumstances we can't upgrade the device.

Device Name: Psion Teklogix 7530 or 7535.

I will try with .NET CF 2.0 and let you know. Once again thanks for your response.





Re: .NET Compact Framework Web proxy for .net CF 1.0

Ilya Tumanov

This device seem to be running CE 4.2 and thus is compatible with NETCF V2 SP1 or above. You should strongly consider using V2 SP2.