Context:
BizTalk 2010 trying to call a one way(fire and forget) PeopleSoft service that does not return a response. I have verified that BizTalk 2010 does not support one way services by design. Unable to call one way Peoplesoft service with WCF-Adapter from BizTalk 2010
PeopleSoft team showed me that their asynchronous service returns the following Http status and headers.
HTTP/1.1 200 OK
Date: Thu, 20 Jan 2011 15:31:37 GMT
Content-Length: 0
Content-Type: text/xml; charset=UTF-8
TransactionID: <some GUID>
X-Powered-By: Servlet/2.5 JSP/2.1
However, when I look at the xml returned from a One Way WCF service published by BizTalk 2010 I see this
HTTP/1.1 200 OK
Content-Length: 86
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/7.0
X-Powered-By: ASP.NET
Date: Thu, 20 Jan 2011 15:34:32 GMT
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body/></s:Envelope>
Note the empty SOAP message.
Therefore, BizTalk 2010 needs to have a NON-NULL response to be able to call a service.
PeopleSoft service sending back the HTTP status code above IS NOT considered an acknowledgement by BizTalk.
Is that correct?
Thanks.
If a web service does not return a response, it needs to return an HTTP 204 - No Content. I've not tried this in WCF yet, but HTTP honors the no content return code. As for the BizTalk WCF service... not sure why it's not using 204. But since it is using 200, it needs to send something.
It looks like BizTalk 2010 does need to have a NON-NULL response to be able to call a service.
Thanks to Ben for confirmation.
See details here.
What is the nature of the message you send out? You could in theory send a one way HTTP message and correlate on a separate HTTP response port.
Related
I have the following question. We are using net core 3.1.
We make a soap request (HttpWebRequest) to a external webservice where they only allow a whitelist of IP addresses into the portal. Our VPN Ipadress is in the whitelist.
But when i send a request (Via Visual studio debugger) it get rejected by de external webservice: 403 Unauthorized.
But when starting Fiddler and then sending the same request again, via Visual studio debugger, we get a 200 OK.
The same is with Postman. When fiddler is not running the request gets rejected. When Fiddler
is running the request is accepted and the response is 200 OK.
I dont understand what is happening, How to solve this.
NOT VIA Fiddler:
Status: 500 Internal Server Error
Version HTTP/1.1
Transferred 408 B (233 B size)
Referrer Policy strict-origin-when-cross-origin
Request Priority Highest
Response Headers:
Content-Type: application/json
Date: Thu, 28 Jul 2022 08:42:32 GMT
Server: Kestrel
Transfer-Encoding: chunked
X-Powered-By: ASP.NET
VIA Fiddler:
Status 200 OK
Version HTTP/1.1
Transferred 1.57 KB (1.41 KB size)
Referrer Policy strict-origin-when-cross-origin
Request Priority Highest
Content-Type text/plain; charset=utf-8
Date Thu, 28 Jul 2022 09:01:24 GMT
Server Kestrel
Transfer-Encoding chunked
X-Powered-By ASP.NET
I am trying to create an Azure Cloud service using the REST API in a C# application. the XML used to describe the service is:
<CreateHostedService xmlns="http://schemas.microsoft.com/windowsazure">
<ServiceName>AppHostingCloudService</ServiceName>
<Label>base64-encoded-label-of-cloud-service</Label>
<Description>This cloud service will host VMs</Description>
<Location>Western-Europe</Location>
</CreateHostedService>
I did set up all headers correctly using the right certificate and all, I get an HTTP 400 error that says Bad Request, here is the details of the error:
+ response {StatusCode: 400, ReasonPhrase: 'Bad Request', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
Date: Thu, 31 Jul 2014 15:49:45 GMT
Server: Microsoft-HTTPAPI/2.0
Content-Length: 220
Content-Type: application/xml; charset=utf-8
}} System.Net.Http.HttpResponseMessage
Any ideas,
Thanks
400 Error usually means something wrong with the XML you're sending. Most likely it is the name of the datacenter location. You may want to get the list of locations by performing List Locations operation and see the right location name for Western Europe data center.
I am using a SOAP interface that is developed by a 3rd party, but is returning an invalid HTTP header as shown below.
HTTP/1.0 200 OK
Server: SMBDK_1/2.3.0
Date: Thu, 09 Aug 2012 18:59:14 GMT
Connection: close
Content-Length: 670
Content-Type: text/html; charset=ISO-8859-1
Content-Type: text/xml
Expires: Thu, 09 Aug 2012 18:59:14 GMT
Last-Modified: Thu, 09 Aug 2012 18:59:14 GMT
Notice that there are 2 content-type tags. I am using VS2008 for this VB project. I have a service reference for this connection and can send a request and receive a response. I created a CustomTextMessageEncoder using the MSDN samples to read the response for text/html; charset=ISO-8859-1. This is working for single variable returns, but arrays are never read in correctly. They are always empty. I am using a Web Debugging Proxy and can see that the array information is there in the SOAP response, but it is never actually pulled through. I presume this is due to the bad header (?). I tried decoding the message as text/xml; charset=ISO-8859-1 and got the same results... empty array returns.
Does anyone have any advice on how to handle this situation? Do I need to deserialize this message manually or is there a better way?
In the end, these bad headers prevented Visual Studio from ever reading in array's properly.
I wound up having to capture the entire response in an XMl document in memory then open it up and use xmlNodeList to manually read the data from the arrays.
When I try to access WCF client, I get the following error. I was able to access my service using IE and able to reference in VS 2010. My development environment is Windows server 2008. I hosted service in Sharepoint Project server. I am stuck with this error. Please advice.
"The content type text/html; charset=UTF-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. "
Here is some data Headers from Fiddler.
GET /_vti_bin/psi/helloservice.svc HTTP/1.1
Content-Type: text/xml; charset=utf-8
MicrosoftSharePointTeamServices: 14.0.0.4762
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-SharePointHealthScore: 4
WCF HTTP Activation must be enabled on the server. If the script maps for WCF are not installed you may receive the error.
I have a WCF service that has webHttpBinding and has enableWebScript turned on in it's endpoint behavior configuration.
The response from the service looks something like this
HTTP/1.1 200 OK
Date: Fri, 23 Oct 2009 20:09:02 GMT
Server: Microsoft-IIS/6.0
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: application/json; charset=utf-8
Content-Length: 25
{"d":{"__type":"SOMETYPE", ... }}
Its using HTTP 1.1 and so there are the standard headers. The contentType is set to be applciation/json which also makes sense. In the message body (the JSON part), everything is enclosed in an envelope titled "d".
What is that? Who defines that protocol? Is it something specific to WCF?
I couldn't find that defined in any of the protocols involved or the definition of the "application/json" contentType.
Thanks
That is ASP.NET AJAX specific and is caused by applying the WebScriptEnablingBehavior (enableWebScript in config) to your endpoint. The wrapper is required on both input and output and there are also special behaviors added around exception handling.
If you want "pure" JSON, you should remove the WebScriptEnablingBehavior and just use WebHttpBehavior (webHttp in config). Then just make sure you explicitly set the Request/ResponseFormat properties on your WebGet/InvokeAttributes.