I have a WCF service which using the Web-Http Adapter through BizTalk. When I am trying to call the wcf service. I am getting the error below.
<?xml version="1.0"?>
-<Fault xmlns="http://schemas.microsoft.com/ws/2005/05/envelope/none">
-<Code>
<Value>Sender</Value>
-<Subcode>
<Value xmlns:a="http://schemas.microsoft.com/ws/2005/05/addressing/none">
a:DestinationUnreachable
</Value>
</Subcode>
</Code>
-<Reason>
<Text xml:lang="en-US">The message with To 'https://biztalkt01.abc.org/ELIMS/ELIMS-CGA1/Service1.svc/?specimenid=abc001234'' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree.</Text>
</Reason>
</Fault>
When I google for this error I can see this code needed to be added in to the service code
[ ServiceBehavior(AddressFilterMode=AddressFilterMode.Any)]
But not sure where is the service code for this service.
The above folder is wat I am seeing with respect to the service created in C:\inetpub\wwwroot\ELIMS\ELIMS-CGA1. Does the code needs to added in to any of these files or the files in the App_Data.
You need to configure your port settings properly for the adapter. This is not related to the WCF configuration files, but to the receive location settings in BizTalk itself. You have to set up the Address and the BtsHttpUrlMapping elements; see https://msdn.microsoft.com/en-us/library/jj572859.aspx for more information on these particular elements.
Related
I wish all my Proxy Services to log a standard ERROR when the endpoint publishes a soapfault. Setting faultSequence to a valid logging sequence doesn't seem to be doing anything. I know the endpoint is publishing fault responses & the faultlogger sequence is a simply FULL log.
<SOAP-ENV:Fault...> </SOAP-ENV:Fault>
<proxy ... >
<target faultSequence="faultlogger" endpoint="conf:/myService>
...
</target>
</proxy>
How does faultSequence work?
I also tried to use a out, filter + log but wasn't sure what the xpath expression I should use to filter for faults.
faultSequence is executed when there is a technical error (in your xpath for exemple, or can't connect to an address configured in an endpoint)
A SOAPFault is not a technical problem and the out sequence is executed : you can verify response message to find potentials soap faults.
An other solution is to set the property named FORCE_ERROR_ON_SOAP_FAULT :
<property name="FORCE_ERROR_ON_SOAP_FAULT" value="true"/>
ERROR:
<s:Fault xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><faultcode xmlns:a="http://schemas.microsoft.com/ws/2005/05/addressing/none">a:ActionNotSupported</faultcode><faultstring xml:lang="en-US">The message with Action '<BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Operation Name="MyOperation" Action="http://tempuri.org/class/MyOperation" />
</BtsActionMapping>' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).</faultstring></s:Fault>
operation used in WCF-custom send port:
<BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Operation Name="MyOperation" Action="http://tempuri.org/Class/MyOperation" />
</BtsActionMapping>
I used the generated binding file when I consumed the webservice.
Webservice code:
public interface Class
{
[OperationContract]
[FaultContract(typeof(FaultClass))]
Response Myoperation(List<getattributes> getattributes);
}
When I try to handle the faultcontract this mismatch is showing up. or am I missing something here.
The Action of a WCF send adapter is based on the SOAP action header (or BtsActionMapping) configuration in the WCF send adapter and/or the properties BTS.Operation and BTS.Action.
It looks like the WCF adapter is unable to match the action with the configured action in your send adapter. As a result of this, the action is set to this string:
<BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Operation Name="MyOperation" Action="http://tempuri.org/class/MyOperation" /> </BtsActionMapping>
Did you specify the BTS.Operation = "MyOperation" in the context of your message?
Few (other) possibilities:
1. Write the action in the context of the message
BTS.Operation = "MyOperation"
and configure ActionMapping in the SOAP action header configuration:
<BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Operation Name="MyOperation" Action="http://tempuri.org/class/MyOperation" />
</BtsActionMapping>
2. Write the action in an orchestration and leave the SOAP action header configuration empty:
OutboundMessage(WCF.Action)= "http://tempuri.org/Class/MyOperation";
3. Configure a fixed action in the SOAP action header configuration in the adapter configuration:
http://tempuri.org/Class/MyOperation
A great article on MSDN related to SOAP actions configuration for send ports can be found here: Specifying SOAP Actions for WCF Send Adapters
I deployed exactly the same WS-proxy in 4.5.1 and 4.6. With 4.5.1 it works correctly, but with 4.6 I get:
ERROR - AxisEngine The endpoint reference (EPR) for the Operation not found is /services/registro.registroHttpSoap11Endpoint and the WSA Action = . If this EPR was previously reachable, please contact the server administrator.
The source is the following:
<proxy xmlns="http://ws.apache.org/ns/synapse" name="registro" transports="http" statistics="disable" trace="disable" startOnLoad="true">
<target>
<outSequence>
<send/>
</outSequence>
<endpoint>
<address uri="http://localhost:15080/SIGEM_RegistroPresencialWS/services/ServicioRegistroWebService"/>
</endpoint>
</target>
<publishWSDL uri="http://localhost:15080/SIGEM_RegistroPresencialWS/services/ServicioRegistroWebService?wsdl"/>
<description></description>
</proxy>
What do I have to do for 4.6. to make it work?
Thanx.
To enhance ESB performance pass-through transport has been enabled by default starting from ESB 4.6.0 version that is not the case for ESB 4.5.1. It seems your proxy service depends on SOAP body based dispatching but pass-through transport does not support for SOAP body based dispatching. SOAP body based dispatching build the message body and use first element's local name for dispatching which effect to proxy performance badly that is the reason it was not supported in pass-through transport. We are in a process to fix this limitation for future ESB releasees without loosing any advantage of pass-through transport.
BTW for the moment you can use one of the following workarounds.
When sending a messages to the proxy service append operation name to the endpoint URL
e.g - http://serverName/app/serviceName/operationName
Modify client level code to send expected SOAPAction value ( like Try-It case)
I'm not sure your backend service's WSDL defined "" as the value of SOAPAction if that is the case you may modified the backend service to have value other than "" per each operation. AS an example for JAX-WS services you can use #WebMethod annotation for this.
e.g - #WebMethod(action="XXXX")
Note : In case if your backend WSDL defining a value other than "" for SOAPAction while your client send message with SOAPAction="" then it's a violation of service contract by the client and need to be fixed on client level.
I have faced the same problem with wso2 ESB 4.7 and the web service is also developed by me for the company.
What worked for me is adding soapAction attribute to wsdl soap:operation element like below.
<soap:operation soapAction="http://localhost:8080/MyWebApp/services/hello" style="document"/>
We have CXF based SOAP web services and we are hitting these services from SOAP UI with no problem. With one of these services, I setup a ProxyService on barebone WSO2 ESB 4.6.0. The proxy service seems to be working with the "Try It" option from the admin console. When I try to access it from SOAPUI, the WSO2 ESB starts complaining that
"The endpoint reference (EPR) for the Operation not found is /services/HelloWorldProxyService and the WSA Action = . If this EPR was previously reachable, please contact the server administrator."
Now, when I change the endpoint URL in SOAPUI as http:// hostname:8280/services/service-name.port-name/operation-name things start to work.
Does anyone know how to fix this issue? Are there configuration options on the WSO2 ESB which will let us use traditional SOAPUI with WSO2 ESB?
You can point the proxy service url(you can view this, via service dashboard of the particular proxy) in soapui and for the "action", in the insequence of the proxy define a property call;
. header name="Action" value="soap action"
Here is the guide on vailable properties
http://wso2.org/project/esb/java/3.0.0/docs/properties_guide.html
I have the same problem if I put operation1 at the end of WS URI (http://somedomain.com/WebServiceProxyName/operation1), but post a SOAP message body with constructs for another operation(operation2,3,4,5...) it works!!!
Sample
POST http://somedomain.com/..../operation1 HTTP/1.1
....
....
<soap:Envelope ...>
<soap:Header/>
<soap:Body>
<ws:operation2>
</ws:operation2>
</soap:Body>
</soap:Envelope>
Try to change the (original) WSDL and put the soapAction there:
You can define it as an attribute of the http://schemas.xmlsoap.org/wsdl/soap/:operation element in the binding section, e.g.
<wsdl:binding name="healthcheck-1.0.0SOAP" type="tns:HealthCheck100PortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="doHealthCheck">
<soap:operation soapAction="http://www.xyz.ch/healthcheck-1.0.0/doHealthCheck"/>
Have just deployed a WCF project to IIS.
However when I try to add the service reference to a test project, Visual Studio gives the following:
The document was understood, but it could not be processed.
- The WSDL document contains links that could not be resolved.
- There was an error downloading 'http://server1.local/WCFServices/serv1/serv1.svc?xsd=xsd0'.
- The underlying connection was closed: An unexpected error occurred on a receive.
- Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
- An existing connection was forcibly closed by the remote host
Metadata contains a reference that cannot be resolved: 'http://server1.local/WCFServices/serv1/serv1.svc?wsdl'.
Content Type application/soap+xml; charset=utf-8 was not supported by service http://server1.local/WCFServices/serv1/serv1.svc?wsdl. The client and service bindings may be mismatched.
The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'..
If the service is defined in the current solution, try building the solution and adding the service reference again.
So there's a problem, which I sorta get. The content type of the service is mismatched from what the client is expecting.
So, how do I fix it?
Check the App.Config or Web.Config of your client and check the ServiceModel. Most probably there is a customBinding which is different from what the WCF service is sending.
As this is the first post google shows up for this error, I want to participate with my solution:
I got a similar error while changing code in a system that was working well, but updating the reference on my development system failed. The reference is located inside a silverlight project and is related to a WCF integrated in the surrounding website (standard confiduration I guess). My error message included "WCF Metadata contains a reference that cannot be resolved: 'Some funny path'. The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8)." My website uses authorization roles, thats where the problem/solution was based. For updating the service reference I had to allow all users:
<?xml version="1.0"?>
<configuration>
<system.web>
<!--<authorization>
<allow users="*"/>
</authorization>-->
<authorization>
<deny users="?"/>
<allow roles="role-1,role-2"/>
<deny users="*"/>
</authorization>
</system.web>
</configuration>