I've installed ActiveMQ 5.8 and have created some internal queues.
I then created camel routes to reroute messages from first queue(inbound.A) to other internal queues (B,A,D etc).
Now the next part is to configure ActiveMQ to recieve xmls from a webservice which posts messages to a http URL. I have tried to get some examples but none of the bundled demos are working.
I can see that there is nothing in the webapps/api/ folder. Even when o looked in the webapps-demo/demo folder I don't see any examples of how I can do this or something similar.
I have outlined that I need to :
First expose a url where the producer webservice can access it .Can this be simply done by updating the transport connector?
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61617?maximumConnections=1000&wireformat.maxFrameSize=104857600"/>
<!--<transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&wireformat.maxFrameSize=104857600"/>-->
</transportConnectors>
Then I need to configure this endpoint so that messages posted to this URL reach my inbound.A queue.
Can someone suggest any examples i can look at?
if you just need to post XML messages to an ActiveMQ queue, then just use camel-jetty to expose an inbound HTTP endpoint and send the XML as text directly to the queue, like this...
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<route id="InboundHTTPRoute">
<from uri="jetty:http://0.0.0.0:8080/inbound/"/>
<inOnly uri="activemq:inboundQ?jmsMessageType=Text"/>
</route>
</camelContext>
otherwise, if you need to define an HTTP SOAP interface, use camel-cxf
Related
Am receiving the message "System.Net.WebException: The HTTP request was forbidden with client authentication scheme 'Anonymous'." when trying to call the web service at "https://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php" using BizTalk 2013.
I've imported the wsdl directly from the site, creating the schemas and the bindings to make the call. The Send port is set up as WCF-BasicHttp, Security Mode: Transport, Transport Client Credential Type: None. I'm able to call the service using SOAP-UI from the BizTalk server, providing no form of authentication.
Have read numerous posts and documentation, but nothing I've done to this point has helped. I'm sure I'm missing something; just not sure what that something is!
From the looks of the WSDL: <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> it's an RPC type web service
Like the documentation specifies: 'The WCF adapters do not support consuming Remote Procedure Call (RPC)-style Web services because the message parts in RPC-style Web services are referring to the message types rather than the message elements where WCF adapters are using elements for the message parts. We recommend that you add the RPC-style Web services through Add Web Reference wizard for consuming the Web services in BizTalk projects.'
I am trying to build an xml spring-based camel web service consumer using apache cxf endpoint similar to the example here...
<cxf:cxfEndpoint id="soapMessageEndpoint"
serviceClass="org.apache.camel.example.cxf.provider.GreeterProvider"
address="http://localhost:9000/GreeterContext/SOAPMessageService"
wsdlURL="wsdl/hello_world.wsdl"
endpointName="s:SoapOverHttpRouter"
serviceName="s:SOAPService"
xmlns:s="http://apache.org/hello_world_soap_http"/>
<camelContext id="test_context" xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="cxf:bean:soapMessageEndpoint"/>
<to uri="bean:testBean?method=processSOAP"/>
</route>
</camelContext>
The web service already exists, but I'm not interested in setting up and exposing a client like in the example. Under normal operation clients would subscribe to the web service and the web service in turn publishes out events to the subscribers periodically.
I have a simulator that generates the web service messages automatically already and I just want to consume the web service message in my camel route and log it, so I don't need to process it or do something with the messages.
I just want my endpoint to act as a listener/sniffer for these messages as they are published therefore I don't really need a service class.
What's the easiest or most efficient way to set this up in camel? Maybe cxf is the wrong component to be leveraging here. The web service is using SOAP.
I have a Soap based web services running in websphere 8. Since we have he trace.log, which have the Webservices request and response XML. I am trying to log it to a different file apart from trace.log.
To be very precise, If my service is HelloWorldService. I would like to log the SOAP requests in service_helloworld.log. I have defined the appenders and loggers in log 4j already. But I am looking into a way where I could configure websphere to redirect the webservices traces to that file.
I still could write a interceptor, but I am trying it in websphere configs. Please help
I don't know if you still have that problem... But I had the same one and I just fix it implementing a GenericHandler that interceps the request/response.
Take a look:
http://www.ibm.com/developerworks/websphere/library/techarticles/0511_phung-lu/0511_phung-lu.html
I have a web service with a client written in Java. The service works behind a firewall and if the java client wants to consume the service, then its request is blocked because the request contains links. So the request contains validator references like this:
...<S:Envelope xmlns:S="http://schemas.xmlsoap.org/wsdl/"...
Shall I fix it in the wsdl file? That is the only place which contains this link:
<definitions targetNamespace="http://mycompany.com/" name="RentalServiceService"
xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://www.w3.org/ns/ws-policy"
xmlns:tns="http://mycompany.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
If I generate a client in .net from the wsdl file, then it does not put any link references into the request...
Thanks
Zoltan
Don't remove namespaces from the XML message. Configure your firewall instead!
Normally, SOAP is friendly with firewalls because it piggybacks on top of HTTP. If you remove the namespaces from the XML you might get it through the firewall but the web service that must make use of the message might fail to parse it because you removed the namespaces from it. XML namespaces are important because they correctly identify the domain to which each element inside the message belongs to.
Just as an observation, the <S:Envelope xmlns:S="http://schemas.xmlsoap.org/wsdl/"... is a copy paste error of some sort?... or maybe part of the problem?! The namespace for the SOAP envelope should be http://schemas.xmlsoap.org/soap/envelope/ for SOAP 1.1 or http://www.w3.org/2003/05/soap-envelope for SOAP 1.2.
That aside, if the SOAP message is correctly formatted, it should pass through the firewall. If it doesn't, then the solution is to configure the firewall properly and not mess with the SOAP message. Your network administrators should spend time understanding web services security and properly configure the firewall.
My suggestion would be to keep port 80 just for your users requests/responses from browsers and expose the service on a different port number with proper configurations. Maybe you could even set up a reverse proxy inside a DMZ to improve the web service security. With that, you won't expose your internal web service server directly to the Internet.
We are trying to log all http requests made to our Tomcat server, in particular SOAP requests.
Our server setup is as follows:
Tomcat 7.0.11
Axis 2
Gentoo Linux
So far we have used the RequestDumperFilter class however this only shows us the header information.
What we require is the ability to view the request body containing the SOAP request XML.
I guess you could make use of some request processing components but I'm not sure if there is an easy way to view the request body in Tomcat.
From what I know, the ExtendedAccessLogValve provides the most information about the request but even this is missing the body.
The most simple solution would be to move the logging away from Tomcat and use a proxy server. You place the proxy between the server and it's clients and do the logging in the proxy.
Proxy receives request, logs it, then forwards to Tomcat which generates response, sends it to the proxy which logs it and then sends it to client. The simplest proxy I used (and did its job pretty well) was the Apache TCP Monitor.
Additionally you could look at something like Fiddler and see if that helps.