WSIT, policy settings for client side in Netbeans and Metro JAX-WS RI - netbeans

The published wsdl of the web-service we work with has a Policy tag.
But after we create a client using wsimport and Netbeans, it would not allow to edit any attributes of WSIT settings. In Apache CXF you can supply the attributes via API. As far as we see, in case of Metro and Netbeans it needs an xml file with the policy attributes set.
Documentation says that those attributes can be edited via Web service client' settings and xml automatically generated. But in our case no WSIT (Security) tab is accessible.
Here, documentation presents how the properties should look like. http://metro.java.net/nonav/1.2/guide/Configuring_Security_Using_NetBeans_IDE.html#gfrds
(Security tab)
Is there any easy way to provide the client with options as message signing, keystore and trustore (as published service required)?

Related

Proxy Configuration for Liferay Portal CE 7

I have a question about the proxy configuration for Liferay Portal 7 CE. I have searched for quite a while, but haven’t found anything really helpful on the subject. There is already a question here on stackoverflow related to Liferay’s proxy configuration in Wildfly, but it has not been answered yet: Proxy Settings Wildfly
We use a squid proxy server for internet access (no authentication, just a proxy port and a host for HTTP and HTTPs). I would like to run Liferay portal on my local machine and therefore need to tell the portal to use the proxy for web access.
How do I do this? Do I make changes to
a) Liferay’s configuration files (i.e., the portal-ext.properties, I guess) or do I change
b) the configuration files of the application server, on which the portal is running on, or
c) change the configuration for the portlets (e.g. for the marketplace portlet)?
What options would I have to set in the respective configuration files?
Best regards,
Felix
Proxy configuration is splitted in two configuration files: system-ext.properties and portal-ext.properties.
In system-ext.properties you have to configure the proxy environment configuration settings that affects to whole JVM process:
http.proxyHost=192.168.0.200
http.proxyPort=4480
You have to create system-ext.properties file inside webapps/ROOT/WEB-INF/classes. (inside Liferay application classloader)
You have more information about system-ext proxy settings in following link: https://docs.liferay.com/portal/7.0/propertiesdoc/system.properties.html#HTTP
In portal-ext.properties you have to configure the proxy environment configuration settings that affects only to Liferay portal:
com.liferay.portal.util.HttpImpl.proxy.username=
com.liferay.portal.util.HttpImpl.proxy.password=
You have more information about portal-ext proxy settings in following link: https://docs.liferay.com/portal/7.0/propertiesdoc/portal.properties.html#HTTP
If your proxy has no authentication, only system-ext.properties settings are necessary

Who will create WADL file in Application based on JERSY 2.0

As i am automatically able to access the WADL file for my application without doing any manual effort, through below formatted URL:
http://{host}:{port}/{context_root}/{resource}/application.wadl
But now need to know, how this will be generated, I am using jersy 2.0 API over Weblogic Server for REST implementation.
If it is automatically generated then what environment and API needed for this ?
Some wiki Or docs URL will be appreciated.
I think you are looking for this from the Jersey Documentation, which seems to be responsible for the WADL Generation.
17.2. Configuration
WADL generation is enabled in Jersey by default. This means that
OPTIONS methods are added by default to each resource and an
auto-generated /application.wadl resource is deployed too. To override
this default behavior and disable WADL generation in Jersey, setup the
configuration property in your application:
jersey.config.server.wadl.disableWadl=true
This property can be setup in a web.xml if the Jersey application is
deployed in the servlet with web.xml or the property can be returned
from the Application. getProperties(). See Deployment chapter for more
information on setting the application configuration properties in
various deployments.
WADL support in Jersey is implemented via ModelProcessor extension.
This implementation enhances the application resource model by adding
the WADL providing resources. WADL ModelProcessor priority value is
high (i.e. the priority is low) as it should be executed as one of the
last model processors. Therefore, any ModelProcessor executed before
will not see WADL extensions in the resource model. WADL handling
resource model extensions (resources and OPTIONS resource methods) are
not added to the application resource model if there is already a
matching resource or a resource method detected in the model. In other
words, if you define for example your own OPTIONS method that would
produce "application.wadl" response content, this method will not be
overridden by WADL model processor. See Resource builder chapter for
more information on ModelProcessor extension mechanism.
https://jersey.java.net/documentation/latest/wadl.html#d0e13189
You can check in Weblogic documentation as well:
http://docs.oracle.com/cd/E24329_01/web.1211/e24983/develop.htm#RESTF240

Using external service providers with josso2

I am trying to setup Josso2.4 to work as a sign in solution to multiple websites. (Starting with just one).
I have configured my test web site as an "external saml2 service provider" in jooso but this require a "metadata file" and I have been unable to find any documentation for this metadata file format. Is it a standard saml format shared accross all saml implementations?
I found some sample xml files I could import, but i newer found a sample which had sso enabled.
You didn't mention, what you use as service provider. You can use Spring Security SAML and download metadata from special URL, for examle: http://localhost:8080/spring-security-saml2-sample/saml/metadata
See documentation: http://docs.spring.io/autorepo/docs/spring-security-saml/1.0.x-SNAPSHOT/reference/htmlsingle/

SoapUI WADL authentication

In order to view wadl file from my server in an internet browser it's necessary to authenticate.
I would like to test my webservices using soapui however when I add new project and in initial wadl/wsdl I enter path to wadl file on my server the project is created but operations are not listed. How to authenticate user and password in order to get valid wadl?
If you are using a SOAPUI version 4.6.4, there is a bug importing authentication protected wsdl which provokes that the basic credentials prompt is not showed up. You can see more details here.
There is a maintenance build for SOAPUI PRO where this bug is solved: http://www.soapui.org/Downloads/soapui-pro-nightly-builds.html.

Unable to create Web Service Client from WSDL URL in NetBeans

I'm trying to create a Web Service Client using the option WSDL URL in NetBeans IDE 7.0. Unfortunately, it is not able to create one and is failing with the following error:
Saxon cannot write a DOMResult unless saxon9-dom.jar is on the classpath
After seeing this error message, I even confirmed whether saxon9-dom.jar is added to the Libraries in NetBeans. Yes, it is already available. I don't know why still the error is appearing. Can somebody let me know what is going wrong?
I'm trying to create web service client for this WSDL. I'm choosing JAX-WS Style in Client Style option while creating New Web Service Client in NetBeans.
UPDATE:
After googling, I read about some clues from the following 2 places:
1) http://www.mail-archive.com/fop-dev#xmlgraphics.apache.org/msg09659.html
This is due to the new event-handling framework that has been added
after 0.95. The step in the build process that generates the resource
files for the various messages, seems to require a writable DOM
implementation.
As the message indicates, Saxon offers such an implementation in a
separate JAR, which needs to be added to the classpath when building
FOP Trunk.
2) http://xmlbeans.apache.org/sourceAndBinaries/index.html
Using XPath/XQuery requires an additional download of
saxonb9-0-0-4j.zip and placing on the classpath of the files
saxon9.jar and saxon9-dom.jar that it contains. The zip is available
here. We cannot distribute this zip in a binary distribution due to
licensing issues.
So, I thought of changing saxon9-dom.jar in the classpath. I was using saxon9-dom.jar from saxonb9-1-0-8j.zip before, but when I tried to include saxon9-dom.jar available in saxonb9-0-0-8j.zip, now this error has disappeared and am getting a different error now as shown below. Any ideas/clues?
Web Services are described using WSDL files, so in order to create a Web Consumer for them you'll have to specify the WSDL url.
You can obtain it by adding ?WSDL ar the and of the url.
For example:
CrudService.asmx becomes
CrudService.asmx?WSDL
(It you have tested your web service and it appears ?Tester at the end, just replace it with ?WSDL).