webservice-client

Accessing a SPNEGO authenticated webservice from C#

好久不见. 提交于 2019-12-05 16:27:21
We have a web service that serves data over HTTP and authenticates users via SPNEGO (and single sign-on). We want to write a C# client for this web service. Is there any standard/provided way in .NET of generating the necessary token? Extensive Googling suggests that there is no native support for SPNEGO. In Windows the following should do the trick: BasicHttpBinding binding = new BasicHttpBinding(); binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows; //SSL (https): binding.Security.Mode = BasicHttpSecurityMode.Transport; 来源: https://stackoverflow.com/questions

“Exception javax.xml.ws.WebServiceException: Unsupported endpoint address” trying to call web service using JAX-WS 2.1

寵の児 提交于 2019-12-05 10:26:16
I'm trying to call the web service here: http://publicbetawebservices.hotel.de/V2_8/FreeHotelSearchWebService.svc?WSDL I've generated proxy classes using wsimport with JDK1.6.0_29. My wsimport command line is: wsimport.exe" -keep -B-XautoNameResolution -d E:\mapov\mapov-dev\shared\hotel_info\ http://publicbetawebservices.hotel.de/V2_8/FreeHotelSearchWebService.svc?WSDL I'm using the following code to attempt to call the service: QName qName = new QName("http://webservices.hotel.de/V2_8", "FreeHotelSearchWebService"); FreeHotelSearchWebService service = new FreeHotelSearchWebService(new URL(

How to remove empty header from SOAP message?

风流意气都作罢 提交于 2019-12-05 06:33:23
I am using Spring-WS for consuming Webservice which compains if SOAP envelop has empty header element. I figured out that default SOAPMessage implementation adds one. How can I remove it? Thanks in advance http://docs.oracle.com/javaee/5/tutorial/doc/bnbhr.html : The next line is an empty SOAP header. You could remove it by calling header.detachNode after the getSOAPHeader call. So here is the solution in plain SAAJ: MessageFactory messageFactory = MessageFactory.newInstance("SOAP 1.2 Protocol"); SOAPMessage message = messageFactory.createMessage(); message.getSOAPHeader().detachNode(); //

Detecting Client Disconnects in Web Services

帅比萌擦擦* 提交于 2019-12-05 06:30:49
I'm using the Apache CXF Web Services stack. When a client times out or disconnects from the server before the operation is complete, the server keeps running the operation until it is complete. I would like to have the server detect when the client disconnects and handle that accordingly. Is there a way to detect when a client disconnects using Apache CXF? What about using other Java web-services stacks? John Vasileff I am not familiar with Apache CXF , but the following should be applicable to any Java Servlet based framework. In order to determine if a user has disconnected (stop button,

How do I prevent my .NET SOAP client from including “Connection: KeepAlive” in the HTTP headers. (using WSE3.0)

穿精又带淫゛_ 提交于 2019-12-05 05:45:26
In the HTTP Connection header, my web service client is including: Connection: Keep-Alive I want to disable this. After doing some research, it appears the way to do this is to set the KeepAlive member of the SoapHttpChannelOptions class to false. But, I do not see a way to access/modify SoapHttpChannelOptions in the webservice client class that was generated for me in Visual Studio using WSE3.0 (Web Service Enhancement. In my case, the generated stub class extends Microsoft.Web.Services3.WebServicesClientProtocol I've been unable to find any examples searching google and most members of the

Getting java.lang.ClassNotFoundException: com.sun.xml.internal.ws.spi.ProviderImpl despite the dependencies are defined

半世苍凉 提交于 2019-12-05 00:25:29
Despite that I have defined the related dependencies as I have added below, getting the java.lang.ClassNotFoundException: com.sun.xml.internal.ws.spi.ProviderImpl exception when my app makes a call to the web service. <dependency> <groupId>javax.xml.ws</groupId> <artifactId>jaxws-api</artifactId> <version>2.2.10</version> </dependency> <dependency> <groupId>com.sun.xml.ws</groupId> <artifactId>jaxws-rt</artifactId> <version>2.2.10</version> <type>pom</type> </dependency> p.s. The servlet container is Apache Tomcat 9.0.4 . p.s. Java version: 9.0.1 . It seems like you may need to include this

How to use PayloadLoggingInterceptor and SOAPLoggingInterceptor interceptors while consuming a third party web service

谁都会走 提交于 2019-12-04 20:23:23
In my application, I am consuming a third party web-service that is provided by my client. I have developed my application on Spring and Hibernate framework and in one module I am consuming this third party web-service url. I have generated web-service stubs using javab2-maven-plugin The maven plugin in declared as below in my pom.xml file : <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxb2-maven-plugin</artifactId> <version>1.5</version> <executions> <execution> <id>xjc</id> <goals> <goal>xjc</goal> </goals> </execution> </executions> <configuration> <!-- Package to store the

How to create an Axis2 Web Service Client in Eclipse?

允我心安 提交于 2019-12-04 03:53:00
I'd like to use the "Web Service Client" wizard to create a web service client in Eclipse, but the wizard doesn't allow me to choose Axis2 as the web service runtime; I'm stuck with just plain Axis. I start off at the following screen (which I got to via File -> New -> Other -> Web Service Client ): I click on "Web service runtime: Apache Axis", to get this new "Client Environment Configuration" dialog: I've chosen "Apache Axis2", but the OK button is grayed out. Not matter what I choose in this dialog--even if I choose "Apache Axis"--the OK button is grayed out. I can't get past this step. Am

how do I make my application read the application config instead of machine.config?

不羁岁月 提交于 2019-12-03 21:14:04
问题 I have an word add in application created in c# which is accessing a web service and is perfectly working if installed outside Program Files folder. the weird thing is that when I install this in Program Files folder, the client is failing to read the config in [application].dll.config and raising an error like below: "Could not find default endpoint element the references contract [..] in the ServiceModel client configuration section. This might be because no configuration file was found for

SOAPFaultException “MustUnderstand headers (oasis-200401-wss-wssecurity-secext-1.0.xsd) are not understood”

十年热恋 提交于 2019-12-03 11:19:06
问题 I try to get information from web service that uses PasswordText WSS type. Firstly, I test it using soapUI and successfully got data. Then I implemented authentication on Java, writing SecurityHandler: public final class SecurityHandler implements SOAPHandler<SOAPMessageContext> { ... @Override public boolean handleMessage(SOAPMessageContext messageContext) { boolean outInd = (Boolean) messageContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY); if (outInd) { try { WSSecUsernameToken builder