Yossi Dahan [BizTalk]

Google
 

Monday, June 04, 2007

Unexpected use of keyword 'request'

We've had to consume a web service today with a method that took one paremeter called "request"; We've added the reference to the WS, created a message of the type we've needed; created a map to create an instance of it and assigned it to the web service as such -

wsRequest.request = requestMessage;

(where requestMessage is the result of a map we're usign to build the request message)

The orchestration designer highlighted the word "request" with the error: "Unexpected use of the keyword 'request'" (or something similiar, this is off the top of my head)

Apparently, and not very surprisingly one might say, the word 'request' cannot be used as a part name; in fact - if you try to create a multi-part message and set the name of one of the parts to the word 'request' you get a nice messagebox explaining this cannot be done; it is only because in our case the multi-part message was created automatically when we added the web reference that we ended up with such a part name to begin with.

This brings up the question - can't the designer be smart enough to warn us at the time of adding the web refernce? as we clearly can't use a web service with a parameter of that name a warning would have been nice (but not an error, as we might need to use other methods in that web service which are ok)

In our case, as the web service was developed in ternally, we could (relatively) easily change the name of the parameter to something more accurate, had this not be the case....

Labels:

2 Comments:

Post a Comment

<< Home