Re: Consuming Web Service without Web Reference



Thanks for your reply.
When I try to Build the project Reference.xsd is giving the following error:

The 'http://www.w3.org/2001/XMLSchema:schema' element is not declared.

Do I need to change the xsd file manually to make this thing working.

You have mentioned about making changes to file names etc what are the
changes needs to be done.

Regarding schema , I dont have any schema given by web service owner.

How should I go about creating the schema?

Thanks & Regards



"Daniel S" wrote:

On Jan 23, 5:23 am, Raju <R...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Once again thanks for your time.
My case is similar to the mentioned
here.(http://seroter.wordpress.com/2007/04/02/consuming-web-services-in-biz...)
My WSDL contains an imports.

Eventhough I extracted schema from WSDL iam not able to call the web service.
I am wondering is there anything missing about schema.

Hope this clears the scenario.



"Yossi Dahan [MVP]" wrote:
I have to admit I'm still not 100% clear on exactly what you have tried to do.
I would say that your first bet is to see why it is you can't add a web
reference, as this is bound to be the easiest, and best, way to call a web
service from within BizTalk.

If you choose to try and avoid that, you have to understand there's more to
calling a web service than creating an xml and pushing it to the SOAP adapter.
First of all, of course, you will have to make sure you've got the XML
right.
I treat your example with care, I don't know if this represent accurately
what you have actually created, but, for starters, it does not contain any
namespaces (which could be right, but I suspect it isn't). also - you've
mentioend the parameters are id and dob, but the xml has configuration and
dob.

The schema for the request should be in the wsdl file - you should be able
to lift it from there so you don't have to guess how it looks like.

secondly - the soap adapter needs more information about how to call the web
service as it needs to set the SOAP action header and build the soap envelope.

Generally, when you add a web reference, the orchestration web port contains
anything the soap adapter will need (I suspect a web service proxy is
generated and that the assembly name of that proxy, along with the operattion
called, which would be used to determin the SOAP action required, are
provided in the message context)

If you choose not to add a web reference to your orchestration, you will
still have to generate a proxy and configure it in your send port.
if you then choose not to specify the operation in the send port (becase
there are more than one, and you don't want multiple send port), you will
have to specify that in your outbound message's context.

as you can see this is quite a bit of work to get right, so again - I would
suggest you try to find out why you can't add a web reference to the web
service to begin with.

can you do that from a non-biztalk project? if not - most likely is that
there's a problem in the WSDL

--
Yossi Dahan
MVP BizTalk Server
http://www.sabratech.co.uk/blogs/yossidahan

"Raju" wrote:

Thanks for your reply.
Initially I tried adding the Web reference using the WSDL file.
When I try to compile the biztalk project with the web reference I get the
following error:

The 'http://www.w3.org/2001/XMLSchema:schema'element is not declared

This error is from the Reference.xsd which is generated when Web Reference
is added.
I could not locate any solution in the forums.

Then I tried the option of using WSDL as proxy class and adding this in the
soap adapter.

From WSDL file I took one of the webmethods and created a schema similar to
it.
For example for webmethod
GetCustomerDetails (Id as string,dob as string)

<GetCustomerDetails>
<Configuration>custacct</Configuration>
<dob>01011980</dob>
</GetCustomerDetails>

A message sent to adapter "SOAP" on send port "SendPortAML" with URI
"http://10.0.0.1/test.asmx"; is suspended.
Error details: Failed to retrieve the message part for parameter
"Configuration".

Using File adapter I picked a flat file then mapped with above schema then
forwarded it to Send port.
At this point Iam getting below mentiond error.

It looks like the XML schema is wrong.I dont have anything other than WSDL
to work with.

How should I proceed to call the webservice successfully.

Thanks

"Yossi Dahan [MVP]" wrote:

Hi Raju

I think You are missing some details from the explanation of your scenario...
You've said you've created a proxy class that is added as a reference to the
orchestration assembly?
How are you actually declaring and instantiating the request message?

As you have not (as I understand it) added a web reference to the web
service (and I have to wonder - why?) - how did you create the schema? how
did you declare the message? did you configure the proxy class in the send
port?

--
Yossi Dahan
MVP BizTalk Server
http://www.sabratech.co.uk/blogs/yossidahan

"Raju" wrote:

Iam using WSDL.exe to generate Proxy class.
This proxy class is added as reference to the biztalk orchestration project.
On dropping the instance file on the IN folder Iam getting the following
error :

A message sent to adapter "SOAP" on send port "SendPortAML" with URI
"http://10.0.0.1/test.asmx"; is suspended.
Error details: Failed to retrieve the message part for parameter
"Configuration".

Configuration is the first of the string parameters in the web method.
There seems to be some issue in the schema file used for making web service
request.

Any pointers in solving this will be helpful.

Thanks- Hide quoted text -

- Show quoted text -

Hi Raju,

I encountered a similar problem...here is how I dealt with it. First,
I created a C# class library project and added my web references
here. This assembly gets GAC'd, and is referenced by the SOAP send
ports (on one of the tabs, you get to select either an Orchestration
web port or an Assembly...use the assembly option). Then, I copied
the xsd's in this assembly project, and pasted them into a BizTalk
project. From there, I tweaked file names, etc so that the project
would build. I must be clear that it is IMPERATIVE that you don't
change the structure of the schema, as this will obviously break if
you send unexpected XML to the web service. Send messages of this
type to the SOAP port, and it should work.

The issue I had in my scenario basically came down to a poorly coded
web service, resulting in the "non-BizTalk-compliant" WSDL. They were
exposing a bunch of their internal class structure which was not
necessary.

Hope this helps.

Dan

.



Relevant Pages

  • Re: Consuming Web Service without Web Reference
    ... Eventhough I extracted schema from WSDL iam not able to call the web service. ... calling a web service than creating an xml and pushing it to the SOAP adapter. ... still have to generate a proxy and configure it in your send port. ...
    (microsoft.public.biztalk.general)
  • Re: receive and send without orchestration
    ... If you have a one-way SOAP send port i.e. no response message this should be ... Just create two SOAP send ports and set the same Filter in each. ... If you are receiving a return message from the web service it gets trickier. ... to two web services, without using an orchestration? ...
    (microsoft.public.biztalk.general)
  • RE: =?Utf-8?Q?RE:_Possibility_to_=E2=80=98plug&play=E2=80=99_w?= =?Utf-8?Q?eb_service_ca
    ... it's possible to create messaging-only scenarios with SOAP ... this is a bit trickier since you need an orchestration to ... initially route messages to a SOAP send port. ... Each individual SOAP send port executes its corresponding web service ...
    (microsoft.public.biztalk.general)
  • RE: Content based-routing for webservices whithout orchestration
    ... you could use the SOAP ... adapter to publish schemas as a web service on the receive side and then ... have another send port subscribe to this receive port (no orchestration ... In BizTalk Server 2006, this functionality has been extended to also allow ...
    (microsoft.public.biztalk.general)
  • Re: Calling webservice in vb.net (using SOAP)
    ... A web reference does use SOAP. ... NET classes based on the services definition so that you can more ... program against the web service using .NET types instead of having to shift ...
    (microsoft.public.dotnet.framework.webservices)