Keep getting message about tempuri

J

JerryK

Hi,

We just deployed a web service to a production server. It worked fine in
the development environment. Howeever, in production, when I attempt to
look at my web service with IE I keep getting a page with the message :

This web service is using http://tempuri.org as its default namespace .....

As instructed in the message I changed the Namespace attribute in my class
declaration. I recompiled, cleaned out the target directory, and copied over
my files. However, I still continue to get the message!!!

If you check the service by entering myservicename/myasmx.asmx?WSDL you do
indeed see entries od the form tns:=http://tempuri.org. Where are these
coming from?

Thanks,

Jerry
 
J

JerryK

BTW, this only seems to happen on the deplyment server which is running
Windows 2000 server.

We have moved this project to a number development servers running XP and
Windows 2003 Server and they work fine.

jerry
 
D

Dan Rogers

Hi Jerry,

There are three attributes that control the versioning labels in your web
service description. The first is controlled on the WebServiceAttribute
that is at the top of your web service class. This one establishes the URI
associated with the entire service, and serves at it's version identifier.
Typically, this is the one that the auto-documentation page complains about.

The next ones are found on the WebServiceDocumentAttribute. If you don't
have one, you get the default behaviors, and this causes the WSDL version
identifier to be tempuri.org. Add a WebServiceDocumentAttribute if you
want to manage the version identifiers of your services interface
description (well, nearly an interface analog).

The final version attributes are associated with the methods themselves,
and controlled by adding a WebMethodDocumentAttribute, linking each method
implementation exposed to a specific WSDL version.

I think you'll find if you just fill out the full WebServiceAttribute
information, the warnings will go away.

I hope this helps

Dan Rogers
Microsoft Corporation
--------------------
 
J

JerryK

Hi Dan,

Thanks for the reply.

Can you tell me the specifics of adding the WebSericeDocumentAttribute and
WebMethodDocumentAttribute.

This error is very strange. The page that show the error message is also
not showing the list of services.

jerry
 
J

JerryK

here is what I tried.

In my .vb file I changed the web service and web method definition as
follows:

<System.web.services.WebService(namespace:=www.qtm.org/DBSync/Products,
Description:="kkk", Name:="Products")
....
<WebMethod(Description:="Something", EnableSession:=False,
MessageName="Response", BufferResponse:=false)
....

There is no change in behavior

http://myserver/myfile.asp/transfer.asmx still returns:

The following operations are supported. For a forma definition review the
service description.

NOTE: NO LIST OF OPERATIONS

This web service is using http://tempuri.org as its default namespace

Recommendation: .....

jerry
 
D

Dan Rogers

Hi Jerry,

Here's a simple VB example that uses these attributes and overrides the web
service defaults. I suspect that if your issue appears only on one server,
that the bits for your service and the URL that you are calling to do the
test are disconnected - e.g. an old version lies there somewhere. How are
you deploying your bits to this server?

Here's the sample: I've left out the boiler plate code for the Web
Services Designer Generated Code - so cut and paste this around that in
your own project. It won't run without it.

Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.EnterpriseServices


' Mark this class as a web service, and override the default
' namespace (tempuri.org).
' Override the default WSDL binding information as well.
<WebService(Namespace:="urn:mycompany-com:foo"), _
SoapDocumentServiceAttribute(SoapParameterStyle.Wrapped, _
SoapServiceRoutingStyle.RequestElement), _
WebServiceBindingAttribute(name:="v1", _
Namespace:="urn:mycompany-com:foo:v1"), _
WebServiceBindingAttribute(name:="v2", _
Namespace:="urn:mycompany-com:foo:v2")> _
Public Class Service1
Inherits System.Web.Services.WebService

...
Web Services Designer Generated Code (hidden stuff) here
...
' Mark this method as being web exposed.
' Override the default element behavior inside of
' SOAP body (default is "foo" element).
' Override the action default (urn:mycompany-com:foo/foo)
<WebMethod(MessageName:="getHello1", enableSession:=False, _
TransactionOption:=TransactionOption.Required), _
SoapDocumentMethodAttribute(Binding:="v1", _
RequestElementName:="getHello1", _
ResponseElementName:="HelloResult", _
Action:="getHello")> _
Public Function foo() As String
foo = "Hello World"
End Function


<WebMethod(MessageName:="getHello2"), _
SoapDocumentMethodAttribute(Binding:="v2", _
RequestElementName:="getHello2", _
ResponseElementName:="HelloResult", _
Action:="getHello")> _
Public Function bar() As String
Return "New Orleans says hello"
End Function

End Class

Note that this code exercises these attributes in a few ways. You can get
the full scoop on these settings on-line on MSDN by searching for the
attribute name.

I hope this helps

Dan Rogers
Microsoft Corporation


--------------------
 
J

JerryK

We found the problem. The development systems are running .net 1.1 SP1 the
deployment system was running .net 1.1, no SP1. We installed SP1 and
everything works.

jerry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,796
Messages
2,569,645
Members
45,369
Latest member
Carmen32T6

Latest Threads

Top