Web service?(Server errorin .. request format is unrecognized)

  • Thread starter Thread starter nomenklatura
  • Start date Start date
N

nomenklatura

Hi,
I prepare web service which connect local sql server 200 and get data..
It is run my pc, invoke function and give results. (data come from sqlserver
2000)
But my pocket pc, i couldn't work ..
This adress is opening "http//localhos/directory/file.asmx" on pocket pc at
internet explorer..
But when i run function on this page:"Server errorr in "..." Request format
is unrecognized"
In my pc there isn't problem while run function.
..
I debu on pocket pc and error gives me in there :
Public Function CariGetir() As System.Data.DataSet

Dim results() As Object = Me.Invoke("CariGetir", New Object(-1) {})

Return CType(results(0), System.Data.DataSet) 'Error occured:An
unhandled exception of type 'System.PlatformNotSupportedException'
occurred in mscorlib.dll Additional information:
PlatformNotSupportedException

End Function


What is the problem?..

Thanks for advance
 
The problem would be with "localhost" ... localhost is local to the machine
which in this case would be your pocketpc.

Change the localhost to the machine name of the pc and I reckon it will
work.

James McCutcheon
 
Have you tried using the IP address of the desktop machine rather than its
machine name?
 
Thanks,
i give local ip adress and try.. but again same problem occured..
I couldn't understant this..
I am runing http://machinename/xx/file.asmx on pocket pc.. it is work(so
there is no connection problem), but when i run function on this page
(invoke) it gives this error... But when i run same function on my machine
at this page, it isn't give error (so function is work normaly)..
I am confused..
 
My guess is it is returning of the dataset

Dim results() As Object = Me.Invoke("CariGetir", New Object(-1) {})
Return CType(results(0), System.Data.DataSet)

You are type casting the dataset for the return object of an invoke ....

1st Test: can you return a string ?
2nd Test: create a dataset without being generated from the invoke ?

My feeling is the type casting of the object my be a tad of a worry inside
the compact framwork.

I am having a bit of a guess really

James McCutcheon
 
i tried test1 ..
I return simple string:

<WebMethod()> _

Public Function Value() As String

Return "valuee"

End Function


it is invoke my machine and return xml result, but it isn't invoke on pocket
pc..
I realize sometingh.. Is it important adress:
"<System.Web.Services.WebService(Namespace:=http://tempuri.org/xwebservice/x
)> _"

what is tempuri.org?

More thanks interest..

(Note:My english very broken , because i am from turkey .. sorry this)
 
I realize other thing too..
i am run this wbebservice on pocket pc at ie..
It is run.. There is no problem.. I click link function and new page
opening.. My proble is run invoke for return result..
When i tried run this fonction , i see result page return xml format ....
So i copy basic xml file on pocket pc and try to run in ie..
But it gives error "There is no appliation associated with ...."
Maybe pocket pc couldn't understood return format and it is give interesting
error when i try to run function...

So am i install program or tools for open xml file on pocket pc?
Is there any such thing..
 
what is tempuri.org?

That is just the namespace for the webservice, it should be something unique
so namespace clashes do not occur. What is the defacto standard is to use
your domain name as part of the name, really it can be anything.

Seems you need to learn some more about webservices
http://samples.gotdotnet.com/quickstart/CompactFramework/doc/xmlwebservice.aspx
(Note:My english very broken , because i am from turkey .. sorry this)

Its funny how you dont really think about these things but imagine coding in
a different language.
So when you code in Turkish, do you use the same Framework commands as per
english eg System.Web

I would imagine this would be hard, as .webservice makes sense of what it
does if you understand english.

James McCutcheon
 
Back
Top