Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Biz Talk General > Sending to a cu...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 13574 of 13845
Post > Topic >>

Sending to a custom webservice

by "Mike R" <noreplay@[EMAIL PROTECTED] > Jul 27, 2008 at 09:18 AM

Hi

I have a simple webservice, I have a simple orchestration, getfile, send
to 
ws, get response from ws, send resp to file ****t.

I can generate a schema, drop into the "in file" drop and see a response 
appear in the "out folder".  The problem comes if I simulate missing a
value 
in a node, my ws throws a soap exception .

ie.

I pass

<ns0:ApprovedLimit/> instead of
<ns0:ApprovedLimit>0</ns0:ApprovedLimit>

the web service generates a soap exception, I can create a simple c# 
consumer as pass the same parameters except the ApprovedLimit and no error

Any thoughts? Is there something I'm missing in my webservice? OR do I
need 
to ensure the message is complete in my orch before sending ?

Thanks for your time.

using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Xml;
namespace CRM_ProxyWebService
{
/// <summary>
/// Summary description for AService
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
public class AService : System.Web.Services.WebService
{
public class RequestMessage
{
public string CompanyKey = string.Empty; // CPTY_key
public string CompanyName = string.Empty; // CPTY_Name
public string DBNumber= string.Empty; //DB_NUMBER
public string CreditScore = string.Empty; //CPTY_SCORE
public float ApprovedLimit;// = string.Empty; // APPROVED_LIMIT
public float SuggestedLimit;// = string.Empty; // SUGGESTED_LIMIT

etc.....
}
public class ResponseMessage
{
// return OK, MANYKEYS, CRMFAILED
public string StatusMessage = string.Empty;
public string ExceptionText = string.Empty;
}
[WebMethod]
public ResponseMessage ProcessCrm(RequestMessage requestMessage)
{
ResponseMessage responseMessage = new ResponseMessage();
try
{
CrmLog.LogFile("Started....");
responseMessage.StatusMessage = "OK";
CrmLog.LogFile("Stopped....");
}
catch (Exception ex)
{
responseMessage.ExceptionText = ex.Message.ToString();
CrmLog.LogFile(ex.Message.ToString());
}
return responseMessage;
}
}
}
 




 4 Posts in Topic:
Sending to a custom webservice
"Mike R" <no  2008-07-27 09:18:17 
Re: Sending to a custom webservice
"Mike R" <no  2008-07-27 10:51:08 
Re: Sending to a custom webservice
Frederik Van Lierde <f  2008-07-28 05:01:30 
Re: Sending to a custom webservice
"Mike R" <no  2008-07-28 14:37:38 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 16:23:55 CST 2008.