Exception in thread "main" org.apache.axis2.AxisFault: The endpoint
reference (EPR) for the Operation not found is /services/MyTest?wsdl
and the WSA Action = . If this EPR was previously reachable, please
contact the server administrator. at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:375)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:555)
at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:531)
at
org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:102)
at com.saien.pojo.RPCClient.main(RPCClient.java:68)
It happens because the source WSDL in each operation has not defined the SOAPAction value.
e.g.
<soap12:operation soapAction="" style="document"/>
His is important for the WSO2 server.
If you have created the service on netbeans or another, don't forget to set the value action on the tag #WebMethod
Example:
#WebMethod(action = "hello", operationName = "hello")
This will create the SOAPAction value by itself.
Did you publish the WSDL of the proxy service? If not, go to "Design View" of the proxy, under "Basic Settings" you can find "Publishing WSDL" dropdown.
Select "Specify Source URL" from the dropdown, for WSDL URI, enter the wsdl of the Axis2 service for the moment. Save the settings and try accessing the proxy.
Check if this fixes the issue.
Related
I'm using eclipse bpel designer and trying to invoke a external service which requires authentication headers to be passed.
Here is what I have done
1. Created a headers.endpoint file with the following content
*alias.sample_ns="http://sample.com"
sample_ns.serviceName.portName.ode.http.default-headers.username=system
sample_ns.serviceName.portName.ode.http.default-headers.password=admin*
Placed it in ..\webapps\ode\WEB-INF\processes\$process folder
When I invoke the service I'm getting the following error
"Error sending message (mex={PartnerRoleMex#hqejbhcnphrckf492s9n9b [PID {http://createReservation}CreateReservation-1541] calling org.apache.ode.bpel.epr.WSAEndpoint#1e1f4b8.saveRecord(...) Status ASYNC}): Transport error: 401 Error: Unautho".
I think I need to add header information when invoking the service in BPEL process as well. But couldn't find the way to do it. How can it be done, if this is actually what I'm missing? Or is there something else to be done?
Thanks in advance
Note: HTTP Auth information cannot be set in the *.endpoint files.
For invoking HTTP Service
Testcase will show you how to do it
https://github.com/apache/ode/tree/ode-1.3.x/axis2-war/src/test/resources/TestEndpointProperties
Add message part in WSDL as shown here
https://github.com/apache/ode/blob/ode-1.3.x/axis2-war/src/test/resources/TestEndpointProperties/Echo.wsdl#L66
Assign credentials in Process
https://github.com/apache/ode/blob/ode-1.3.x/axis2-war/src/test/resources/TestEndpointProperties/test-endpoint-properties.bpel#L73
For invoking Soap Service
http://ode.apache.org/http-authentication.html
I am trying to follow a textbook learning how to create a web-sentric WCF service project. I created the service, and see the corresponding folder under Default Web Site on IIS. I can even browse the folder (localhost/EmployeeService/) and see the contents in the browser. Now I want to make a client, i.e. a simple Console application. When I am trying to add a Service Reference, after I enter the address, I get an error:
There was an error downloading 'http://localhost/EmployeeService/$metadata'.
The request failed with HTTP status 404: Not Found.
Metadata contains a reference that cannot be resolved: 'http://localhost/EmployeeService/'.
The remote server returned an unexpected response: (405) Method Not Allowed.
The remote server returned an error: (405) Method Not Allowed.
Could you please explain? I saw some questions about the same error, but could not find a solution for myself.
Thanks.
In order to invoke the service, you must point at the service file. Otherwise the web server doesn't know what you're trying to do.
Add the .svc file to your URL to do that, so http://localhost/EmployeeService/YourService.svc.
You can also have it fileless, see How can I host a WCF service without an SVC file in IIS.
I currently have a handler to check if action given in SOAPAction field of HTTP header and the actual operation are the same.I have followed the Axis2 tutorial and I get this exception :
Deployment exception for the handler
And WSDoAllReceiver Security processing failed
Looks like you have the rampart module engaged. If your handler is simply checking the SOAPAction and you do not need any security processing, please remove rampart module and try.
I have created an ASP.NET web application that contains a WCF Service. I have successfully tested this application locally. In addition, I can successfully use my WCF service. I then deployed it to my remote IIS 7 web server which has an HTTPS binding setup. I don't know if that makes a difference.
When I attempt to access the svc file in my browser (via something like https://www.mydomain.com/myService.svc), I see the service description page. However, when I attempt to execute my operation through the browser (like https://www.mydomain.com/myService.svc/Test) I get a 404 error. The only thing my "Test" operation does is return "Hello World" as shown here:
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
[ServiceBehavior(IncludeExceptionDetailInFaults = false)]
[ServiceContract]
public class MyService
{
[OperationContract]
[WebGet(UriTemplate = "/Test", ResponseFormat = WebMessageFormat.Json)]
public string Test()
{
return "Hello World";
}
}
In an attempt to diagnose the problem further, I created a new ASP.NET web application. In this new application, I attempted to add a new service reference to "https://www.mydomain.com/myService.svc". When I do this, I get a long error message that says:
The document at the url https://www.mydomain.com/myService.svc was not recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'XML Schema' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.
- Report from 'https://www.mydomain.com/myService.svc' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.
- Report from 'DISCO Document' is 'There was an error downloading 'http://computername.com/myService.svc?disco'.'.
- The request failed with HTTP status 502: Fiddler - DNS Lookup Failed.
- Report from 'WSDL Document' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.
Metadata contains a reference that cannot be resolved: 'https://www.mydomain.com/myService.svc'.
There was no endpoint listening at https://www.mydomain.com/myService.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
The remote server returned an error: (404) Not Found.
If the service is defined in the current solution, try building the solution and adding the service reference again.
What am I doing wrong? Thank you!
Ah ha! The problem was I did not have "bindingConfiguration="SSL"" in my configuration on the deployment server. Added that and everything is peachy.
Thank s for your help!
https://tbe.taleo.net/MANAGER/dispatcher/servlet/rpcrouter
the above is from Taleo's API guide.
I'm trying to create a WCF Client
(e.g.: " Creating Your First WCF Client"
http://channel9.msdn.com/shows/Endpoint/Endpoint-Screencasts-Creating-Your-First-WCF-Client/ )
The tbe.taleo... link is from Taleo's API documentation.
Likely my understanding is flawed. My assumption is that when the
link from Taleo is entered into the vs2010 "Add Service Reference"
dialog and GO is clicked, then vs2010 should retrieve
a proper WSDL/SOAP envelope back from the Taleo link.
That does not happen; instead an error occurs.
Fiddler2 (http://fiddler2.com) displays the status code 500
"HTTP/1.1 500 Internal Server Error". [FULL DETAILS BELOW]
"WcfTestClient.exe" gives a similar error: [WcfTestClient DETAILS BELOW]
QUESTION: is it me, or is the Taleo link flawed?
Thank you,
Gerry
[FULL DETAILS "Add Service Reference"]
The HTML document does not contain Web service discovery information.
Metadata contains a reference that cannot be resolved: 'https://tbe.taleo.net/MANAGER/dispatcher/servlet/rpcrouter'.
The content type text/xml;charset=utf-8 of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 544 bytes of the response were: '
SOAP-ENV:Protocol
Unsupported content type "application/soap+xml; charset=utf-8", must be: "text/xml".
/MANAGER/dispatcher/servlet/rpcrouter
'.
The remote server returned an error: (500) Internal Server Error.
If the service is defined in the current solution, try building the solution and adding the service reference again.
[WcfTestClient DETAILS]
Error: Cannot obtain Metadata from https://tbe.taleo.net/MANAGER/dispatcher/servlet/rpcrouter If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error URI: https://tbe.taleo.net/MANAGER/dispatcher/servlet/rpcrouter Metadata contains a reference that cannot be resolved: 'https://tbe.taleo.net/MANAGER/dispatcher/servlet/rpcrouter'. The content type text/xml;charset=utf-8 of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 544 bytes of the response were: 'SOAP-ENV:ProtocolUnsupported content type "application/soap+xml; charset=utf-8", must be: "text/xml"./MANAGER/dispatcher/servlet/rpcrouter'. The remote server returned an error: (500) Internal Server Error.HTTP GET Error URI: https://tbe.taleo.net/MANAGER/dispatcher/servlet/rpcrouter The HTML document does not contain Web service discovery information.
Browsing to the Taleo link, I get
SOAP RPC Router
Sorry, I don't speak via HTTP GET- you
have to use HTTP POST to talk to me.
My suspicion is that both Visual Studio and Fiddler do an HTTP GET to retrieve the WSDL (a description of the Web Service). Instead, they're getting an HTML error message.
Adding "?WSDL" to the URL didn't help. So I'd say the Taleo link is not intended to be used in this manner, but instead is designed for SOAP RPC.
Sadly, I can only blame myself. I watched the excellent free Pluralsight videos.
I tried to sort it out from Taleo's documentation, Google, msdn, et cetera.
I should have used this:
http://tbe.taleo.net/wsdl/DispatcherAPI.wsdl
from here:
http://tbe.taleo.net/products/TBE_API_Guide.pdf from
http://www.taleo.com/solutions/taleo-business-edition-web-integration-api
Thanks to all who gave some thought to this issue.
g.
You are not to be blamed. The Taleo documentation is a bit confusing. Especially with respect to the URL to be used.
For a detailed description check out Taleo Integration in Drupal