My service picked from a wsdl file. But the service wso2 published is chenged. If I want wso2 published just as my wsdl file. How to set?
For example, My wsdl file is:
<wsdl:service name="CoshipServiceImplService">
<wsdl:port binding="tns:CoshipServiceImplServiceSoapBinding" name="CoshipServiceImplPort">
<soap:address location="http://X.X.X.X:7843/sysway-boss-service/cxf/CoshipService" />
</wsdl:port>
</wsdl:service>
And WSO2 published like :
<wsdl:portType name="CoshipServiceImplServicePortType"></wsdl:portType>
<wsdl:binding name="CoshipServiceImplServiceSoap11Binding" type="tns:CoshipServiceImplServicePortType">
</wsdl:binding><wsdl:binding name="CoshipServiceImplServiceSoap12Binding" type="tns:CoshipServiceImplServicePortType"></wsdl:binding>
<wsdl:binding name="CoshipServiceImplServiceHttpBinding" type="tns:CoshipServiceImplServicePortType"></wsdl:binding>
<wsdl:service name="CoshipServiceImplService"></wsdl:service>
It changed my port form "CoshipServiceImplPort" to "CoshipServiceImplServicePortType".
This can be done via setting the service parameter 'useOriginalWsdl' as true in your service.
<parameter name="useOriginalwsdl">true</parameter>
From WSO2 App Server/ESB/DSS you can done via from UI
Go to Admin Console UI.
Navigate to Manage → Web Services → List → Service Dashboard.
From "Quality of Service Configuration" option in service dashboard, select 'Parameters' option and add the above 'useOriginalwsdl' service parameter.
Related
Currently, I could check the runtime statistics with original WSDL Url in the admin console.
But we modified the WSDL address in the WEB-INF folder like the following example.
<wsdl:service name="Service">
<wsdl:documentation>Web Service</wsdl:documentation>
<wsdl:port name="ServicePort" binding="tns:ServiceBinding">
<soap:address location="http://localhost:8080/service/ws" />
</wsdl:port>
</wsdl:service>
How can I check the runtime statistics with modified WSDL address via WildFly Admin Console or through JMX?
I am developing a Self-hosted .Net Core Rest API to be hosted in Docker Container in Service Fabric. I am unable to configure to SSL/Https in Service Fabric. Http seems to work. I am using HttpSys as web server, not Kestrel since I read it is not recommended option for services without reverse proxy(like IIS).
Here is the web server code snippet.
return WebHost.CreateDefaultBuilder(args)
.UseApplicationInsights()
.UseStartup<Startup>()
.UseHttpSys(
options =>
{
options.Authentication.Schemes = AspNetCore.Server.HttpSys.AuthenticationSchemes.None;
options.Authentication.AllowAnonymous = true;
}
)
.Build();
Here is ServiceManifest.xml Endpoints snippet.
<Endpoints>
<Endpoint Name="ServiceEndpoint" Protocol="http" Port="80" />
<Endpoint Name="ServiceEndpointHttps" Protocol="https" Port="443" Type="Input" CertificateRef="SSLCertificate" />
</Endpoints>
Here is ApplicationManifest EnvironmentVariable snippet.
<EnvironmentVariable Name="ASPNETCORE_URLS" Value="https://*:443/;http://*:80/"/>
Here is ApplicationManifest.xml Policies snippet.
<Policies>
<ContainerHostPolicies CodePackageRef="Code">
<RepositoryCredentials AccountName="accountname" Password="password" PasswordEncrypted="false" />
<PortBinding ContainerPort="80" EndpointRef="ServiceEndpoint"/>
<PortBinding ContainerPort="443" EndpointRef="ServiceEndpointHttps"/>
</ContainerHostPolicies>
<EndpointBindingPolicy CertificateRef="SSLCertificate" EndpointRef="ServiceEndpointHttps" />
</Policies>
Here is ApplicationManifest.xml Certificates snippet.
<Certificates>
<EndpointCertificate Name="SSLCertificate" X509FindValue="cert thumbprint"/>
</Certificates>
Initially, I had issues with Certificate deployment when I had SSL certificate only in CurrentUser\My Certificate Store. I resolved it after deploying the certificate in LocalMachine\My Certificate Store. With this fix, Service seems to be working only with HTTP protocol in Port 80, not with HTTPS protocol in Port 443.
Service Fabric Explorer doesn't show any error and no errors in Events Log also. I am facing this issue in both Local Service Fabric and in Azure Service Fabric instances.
Any thoughts/pointers on this would be appreciated.
Using Service Fabric for container and https could follow this doc.
It will inject the certificate into the container as environment variables.
But for linux clusters, there is a problem. The Certificates_ServicePackageName_CodePackageName_CertName_PEM and Certificates_ServicePackageName_CodePackageName_CertName_PrivateKey represented files are having the exact same content.
I'm waiting for the Azure China supporter for further clarification on this, not sure if it's a China specific problem.
NOTE: Cross post from developer.jboss.org
We have Wildfly 10 configured behind NGINX as a reverse proxy for handling the SSL requirements of the web service. Wildfly serves everything as plain HTTP and NGINX handles the HTTPS side of the request.
We have enabled the uri rewriting inside JBossWS with the following settings in standalone.xml
<subsystem xmlns="urn:jboss:domain:webservices:2.0">
<modify-wsdl-address>true</modify-wsdl-address>
<wsdl-host>jbossws.undefined.host</wsdl-host>
<wsdl-secure-port>8081</wsdl-secure-port>
<wsdl-uri-scheme>https</wsdl-uri-scheme>
The endpoint also uses a custom deployment descriptor: jboss-webservices.xml
<jboss:port-component>
<jboss:ejb-name>ClaimWebServiceBean</jboss:ejb-name>
<jboss:port-component-name>ClaimWSPort</jboss:port-component-name>
<jboss:port-component-uri>Claim</jboss:port-component-uri>
<jboss:transport-guarantee>CONFIDENTIAL</jboss:transport-guarantee>
</jboss:port-component>
The URI rewriting for the SOAP address and the schema location of the XSD included in the WSDL works correctly
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://example.systems/webservices/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:ns1="http://example.co.za/claim/zmf" attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace="http://example.systems/webservices/">
<xs:import namespace="http://example.co.za/claim/zmf" schemaLocation="https://dev.example.ws:8081/webservices/Claim?xsd=ZietoClaim_2_1.xsd"/>
<!-- xml omitted -->
<wsdl:service name="ClaimService">
<wsdl:port binding="tns:ClaimServiceSoapBinding" name="ClaimWSPort">
<soap12:address location="https://dev.example.ws:8081/webservices/Claim"/>
</wsdl:port>
</wsdl:service>
The XSD referenced inside the WSDL contains 2 more import statements to import 2 more XSD's. This is however where the problem starts. In the extract below you will notice that the schema location uses http and not https for the other 2 XSD's.
Using curl to download the XSD referenced above give this content, which shows the problem:
<?xml version='1.0' encoding='UTF-8'?>
<xsd:schema xmlns:zdt="http://example.co.za/claim/zmf/datatypes" xmlns:zcdt="http://example.co.za/common/datatypes"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://example.co.za/claim/zmf" elementFormDefault="qualified"
targetNamespace="http://example.co.za/claim/zmf">
<xsd:import namespace="http://example.co.za/claim/zmf/datatypes" schemaLocation="http://dev.example.ws:8081/webservices/Claim?xsd=zmf_dt_2_1.xsd"/>
<xsd:import namespace="http://example.co.za/common/datatypes" schemaLocation="http://dev.example.ws:8081/webservices/Claim?xsd=zdt_1_2.xsd"/>
Is there a way to configure JBossWS to rewrite the shema locations inside the first XSD as well to use https?
I recently created a Powershell script that deploys my Web Application (ASP.NET MVC) to Azure. It works like it should, but I figured out that it would improve the script a lot by being able to change the endpoint in the Web.config file during deployment, i.e. the script prompts the user for the address. The Web.config section looks like this:
<system.serviceModel>
<client>
<endpoint address="http://localhost:10421/MyService" binding="binding" bindingConfiguration="foo" contract="bar" name="id" />
</client>
</system.serviceModel>
I would like to change the endpoint address with my script.
Use the Get-Content cmdlet to load your configuration file, access the property and change it and finally write it back using the Set-Content cmdlet:
[xml]$content = (Get-Content 'your_file')
$content.configuration.'system.serviceModel'.client.endpoint.address = 'YourNewAdress'
$content | Set-Content 'your_file'
Note: I asume that the system.serviceModel is within the configuration node. If not, omit that.
We have a setting defined in our Azure Cloud Service (csdef)
<ConfigurationSettings>
<Setting name="CDN" />
</ConfigurationSettings>
And it's value in the cscfg file
<ConfigurationSettings>
<Setting name="CDN" value="az12345.vo.msecnd.net" />
</ConfigurationSettings>
And in order for to work "outside" of Azure we have this in the web.config
<add key="CDN" value="localcdn" />
When the cloud service is deployed into Azure the value for CDN is "localcdn" and NOT the value that is in the cscfg file "az12345.vo.msecnd.net".
We have other cloud services with exactly the same setting which are resolved correctly, but this service refuses to.
My understanding from https://msdn.microsoft.com/en-us/library/microsoft.windowsazure.cloudconfigurationmanager.getsetting.aspx is that it will get the value from the cscfg when in Azure and web/app.config when it's not.
We are using Microsoft Azure Configuration Manager 3.1.0
Issue caused by Role Environment erroring