Hi (Sorry for may bad English).
I’m using Wso2 Developer Studio to build a Bpel workflow, in my workflow I need to invoke a several number of Webservices, and depending of the output of these take different paths, to do that I need to use variables, but I’m getting compilation errors when I deploy the workflow process in wso2 bps : File upload failed :BPEL Compilation Failure!
i searched and some people say that is a namespace problem but i don't know how to fix that plese help. below the error and the bpel source.
TID: [0] [BPS] [2014-03-11 10:23:30,889] ERROR {org.wso2.carbon.bpel.ui.fileupload.BPELUploadExecutor} - File upload failed :BPEL Compilation Failure! {org.wso2.carbon.bpel.ui.fileupload.BPELUploadExecutor}
java.lang.Exception: BPEL Compilation Failure!
at org.wso2.carbon.bpel.ui.fileupload.BPELUploadExecutor.validateBPELPackage(BPELUploadExecutor.java:295)
at org.wso2.carbon.bpel.ui.fileupload.BPELUploadExecutor.execute(BPELUploadExecutor.java:103)
at org.wso2.carbon.ui.transports.fileupload.AbstractFileUploadExecutor.executeGeneric(AbstractFileUploadExecutor.java:104)
at org.wso2.carbon.ui.transports.fileupload.FileUploadExecutorManager$CarbonXmlFileUploadExecHandler.execute(FileUploadExecutorManager.java:392)
at org.wso2.carbon.ui.transports.fileupload.FileUploadExecutorManager$FileUploadExecutionHandlerManager.startExec(FileUploadExecutorManager.java:276)
at org.wso2.carbon.ui.transports.fileupload.FileUploadExecutorManager.execute(FileUploadExecutorManager.java:125)
at org.wso2.carbon.ui.transports.FileUploadServlet.doPost(FileUploadServlet.java:57)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)
at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:49)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)
at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: org.apache.ode.bpel.compiler.api.CompilationException: error: [CompilationErrors] Compilation completed with 2 error(s):
file:/C:/WSO2BP~1.0/bin/../tmp/work/bpelTemp/1.394551410832569E12/TestVars_1.0.0/TestVars.bpel:42: error: [UndeclaredXsdType] Attempt to reference undeclared XSD type "{http://www.w3.org/2001/XMLSchema}string".
file:/C:/WSO2BP~1.0/bin/../tmp/work/bpelTemp/1.394551410832569E12/TestVars_1.0.0/TestVars.bpel:68: error: [UndeclaredVariable] Attempt to reference undeclared variable "VarTest".
at org.apache.ode.bpel.compiler.BpelCompiler.compile(BpelCompiler.java:815)
at org.apache.ode.bpel.compiler.BpelC.compile(BpelC.java:278)
at org.apache.ode.bpel.compiler.BpelC.compile(BpelC.java:364)
at org.apache.ode.store.DeploymentUnitDir$5.run(DeploymentUnitDir.java:221)
at org.apache.ode.utils.InternPool.runBlock(InternPool.java:57)
at org.apache.ode.store.DeploymentUnitDir.compile(DeploymentUnitDir.java:218)
at org.apache.ode.store.DeploymentUnitDir.compile(DeploymentUnitDir.java:177)
at org.wso2.carbon.bpel.ui.fileupload.BPELUploadExecutor.validateBPELPackage(BPELUploadExecutor.java:292)
... 38 more
the bpel code:
<!-- TestVars BPEL Process [Generated by the Eclipse BPEL Designer] -->
<!-- Date: Mon Mar 05 12:13:11 IST 2012 -->
<bpel:process name="TestVars"
targetNamespace="http://wso2.org/bps/sample"
suppressJoinFailure="yes"
xmlns:tns="http://wso2.org/bps/sample"
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:ns1="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://facade.uaecd.gov.co/" xmlns:xsd="http://facade.uaecd.gov.co/types/">
<!-- Import the client WSDL -->
<bpel:import namespace="http://facade.uaecd.gov.co/" location="WSVerificarRegistroPredio.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"></bpel:import>
<bpel:import location="TestVarsArtifacts.wsdl" namespace="http://wso2.org/bps/sample"
importType="http://schemas.xmlsoap.org/wsdl/" />
<!-- ================================================================= -->
<!-- PARTNERLINKS -->
<!-- List of services participating in this BPEL process -->
<!-- ================================================================= -->
<bpel:partnerLinks>
<!-- The 'client' role represents the requester of this service. -->
<bpel:partnerLink name="client"
partnerLinkType="tns:TestVars"
myRole="TestVarsProvider"
/>
<bpel:partnerLink name="GPLWSCatastro" partnerLinkType="tns:PLTypeWSCatastro1" partnerRole="RoleWSCatastro1"></bpel:partnerLink>
</bpel:partnerLinks>
<!-- ================================================================= -->
<!-- VARIABLES -->
<!-- List of messages and XML documents used within this BPEL process -->
<!-- ================================================================= -->
<bpel:variables>
<!-- Reference to the message passed as input during initiation -->
<bpel:variable name="input"
messageType="tns:TestVarsRequestMessage"/>
<!--
Reference to the message that will be returned to the requester
-->
<bpel:variable name="output"
messageType="tns:TestVarsResponseMessage"/>
<bpel:variable name="VarTest" type="ns1:string"></bpel:variable>
<bpel:variable name="GPLWSCatastroResponse" messageType="ns:WSVerificarRegistroPredio_getRegistroCatastroResponse"></bpel:variable>
<bpel:variable name="GPLWSCatastroRequest" messageType="ns:WSVerificarRegistroPredio_getRegistroCatastro"></bpel:variable>
</bpel:variables>
<!-- ================================================================= -->
<!-- ORCHESTRATION LOGIC -->
<!-- Set of activities coordinating the flow of messages across the -->
<!-- services integrated within this business process -->
<!-- ================================================================= -->
<bpel:sequence name="main">
<!-- Receive input from requester.
Note: This maps to operation defined in TestVars.wsdl
-->
<bpel:receive name="receiveInput" partnerLink="client"
portType="tns:TestVars"
operation="process" variable="input"
createInstance="yes"/>
<!-- Generate reply to synchronous request -->
<bpel:assign validate="no" name="Assign">
<bpel:copy>
<bpel:from>
<bpel:literal xml:space="preserve">0</bpel:literal>
</bpel:from>
<bpel:to variable="VarTest"></bpel:to>
</bpel:copy>
</bpel:assign>
<bpel:assign validate="no" name="Assign1">
<bpel:copy><bpel:from>
<bpel:literal xml:space="preserve"><ns:getRegistroCatastroElement xmlns:ns="http://facade.uaecd.gov.co/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns:identificacion>ns:identificacion</ns:identificacion>
<ns:chip>ns:chip</ns:chip>
<ns:address>ns:address</ns:address>
<ns:correousuario>ns:correousuario</ns:correousuario>
<ns:pwd>ns:pwd</ns:pwd>
<ns:ipRemoto>ns:ipRemoto</ns:ipRemoto>
</ns:getRegistroCatastroElement></bpel:literal>
</bpel:from>
<bpel:to part="parameters" variable="GPLWSCatastroRequest"></bpel:to>
</bpel:copy>
<bpel:copy><bpel:from part="payload" variable="input">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:input]]></bpel:query>
</bpel:from>
<bpel:to part="parameters" variable="GPLWSCatastroRequest">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns:chip]]></bpel:query>
</bpel:to>
</bpel:copy>
</bpel:assign>
<bpel:sequence name="Sequence">
<bpel:invoke name="Invoke" partnerLink="GPLWSCatastro" operation="getRegistroCatastro" portType="ns:WSVerificarRegistroPredio" inputVariable="GPLWSCatastroRequest" outputVariable="GPLWSCatastroResponse"></bpel:invoke>
</bpel:sequence>
<bpel:assign validate="no" name="Assign2">
<bpel:copy>
<bpel:from><bpel:literal><tns:TestVarsResponse xmlns:tns="http://wso2.org/bps/sample" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tns:result>tns:result</tns:result>
</tns:TestVarsResponse>
</bpel:literal></bpel:from>
<bpel:to variable="output" part="payload"></bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from part="parameters" variable="GPLWSCatastroResponse">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns:result/xsd:respuesta]]></bpel:query>
</bpel:from>
<bpel:to part="payload" variable="output">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query>
</bpel:to>
</bpel:copy>
</bpel:assign>
<bpel:reply name="replyOutput"
partnerLink="client"
portType="tns:TestVars"
operation="process"
variable="output"
/>
</bpel:sequence>
</bpel:process>
Related
I'm trying to publish a webservice created and published in VS2015. When I publish it in IIS, I have the following error:
Could not find a base address that matches scheme http for the endpoint with binding WebHttpBinding. Registered base address schemes are [https]
I saw a lot of posts about it, and I tried to change my IIS and my web.config with no success.
I have configured a https website in IIS with self-signed certificate. It works normally, but when I try to access the webservice, I got the error that I described above. If I use this webservice in http websites, it works with no problem.
My web.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation targetFramework="4.6" />
<httpRuntime targetFramework="4.6" />
<customErrors mode="Off"/>
</system.web>
<system.serviceModel>
<!--CONFIGURAÇÃO DO SERVIÇO-->
<services>
<service name="ServicoRest.ServiceGestorWMS">
<endpoint address="../ServiceGestorWMS.svc" binding="webHttpBinding" contract="ServicoRest.IServiceGestorWMS" behaviorConfiguration="webBehaviour" />
<endpoint address="mex"
binding="mexHttpsBinding"
contract="IMetadataExchange" />
</service>
</services>
<bindings>
<webHttpBinding>
<binding maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows"/>
</security>
</binding>
<binding name="webHttpsBinding" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<security mode="Transport">
<transport clientCredentialType="Windows"/>
</security>
</binding>
</webHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
<!--CONFIGURAÇÃO DO SERVIÇO-->
<endpointBehaviors>
<behavior name="webBehaviour">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<!--SE VOCÊ PRECISAR ACESSAR O SERVIÇO DE OUTRO DOMÍNIO VIA JAVASCRIPT VOCÊ DEVE INFORMAR O BLOCO DE CÓDIGO ABAIXO -->
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="Content-Type, Accept" />
<add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" />
</customHeaders>
</httpProtocol>
<modules runAllManagedModulesForAllRequests="true" />
<!--
To browse web app root directory during debugging, set the value below to true.
Set to false before deployment to avoid disclosing web app folder information.
-->
<directoryBrowse enabled="true" />
</system.webServer>
<connectionStrings>
<add name="" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="data source=;initial catalog=;persist security info=True;user id=sa;password=;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
</entityFramework>
</configuration>
<!--ProjectGuid: {D84BF523-87CA-4D7D-90AE-CEE789984582}-->
Murphy,
You do not seem to have set the binding. You would need something like the code below in your web.config if you want to support HTTP and HTTPS for the webHttpBinding:
<webHttpBinding>
<binding maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows"/>
</security>
</binding>
<binding name="webHttpsBinding" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<security mode="Transport">
<transport clientCredentialType="Windows"/>
</security>
</binding>
</webHttpBinding>
I want to install API Manager in my WSO2 G-Reg.
i follow this tutorial: Integrating APM with WSO2 Governance Registry
This is my ServiceLifeCycle (WSO2 G-Reg):
<!--
~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~
~ WSO2 Inc. licenses this file to you under the Apache License,
~ Version 2.0 (the "License"); you may not use this file except
~ in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<aspect name="ServiceLifeCycle" class="org.wso2.carbon.governance.registry.extensions.aspects.DefaultLifeCycle">
<configuration type="literal">
<lifecycle>
<scxml xmlns="http://www.w3.org/2005/07/scxml"
version="1.0"
initialstate="Development">
<state id="Development">
<datamodel>
<data name="checkItems">
<item name="Code Completed" forEvent="">
<!--<permissions>
<permission roles=""/>
</permissions>
<validations>
<validation forEvent="" class="">
<parameter name="" value=""/>
</validation>
</validations>-->
</item>
<item name="WSDL, Schema Created" forEvent="">
</item>
<item name="QoS Created" forEvent="">
</item>
</data>
<data name="transitionExecution">
<execution forEvent="Promote" class="org.wso2.carbon.governance.registry.extensions.executors.ServiceVersionExecutor">
<parameter name="currentEnvironment" value="/_system/governance/trunk/{#resourcePath}/{#version}/{#resourceName}"/>
<parameter name="targetEnvironment" value="/_system/governance/branches/testing/{#resourcePath}/{#version}/{#resourceName}"/>
<parameter name="service.mediatype" value="application/vnd.wso2-service+xml"/>
<parameter name="wsdl.mediatype" value="application/wsdl+xml"/>
<parameter name="endpoint.mediatype" value="application/vnd.wso2.endpoint"/>
</execution>
</data>
<data name="transitionUI">
<ui forEvent="Promote" href="../lifecycles/pre_invoke_aspect_ajaxprocessor.jsp?currentEnvironment=/_system/governance/trunk/"/>
</data>
<!--<data name="transitionValidation">
<validation forEvent="" class="">
<parameter name="" value=""/>
</validation>
</data>
<data name="transitionPermission">
<permission forEvent="" roles=""/>
</data>
<data name="transitionScripts">
<js forEvent="">
<console function="">
<script type="text/javascript">
</script>
</console>
<server function="">
<script type="text/javascript"></script>
</server>
</js>
</data>
<data name="transitionApproval">
<approval forEvent="Promote" roles="" votes="2"/>
</data>-->
<data name="transitionScripts">
<js forEvent="Promote">
<console function="showServiceList">
<script type="text/javascript">
showServiceList = function() { var element = document.getElementById('hidden_media_type'); var mediaType = ""; if (element) { mediaType = element.value;} if (mediaType == "application/vnd.wso2-service+xml") { location.href = unescape("../generic/list.jsp?region=region3%26item=governance_list_service_menu%26key=service%26breadcrumb=Services%26singularLabel=Service%26pluralLabel=Services"); } }
</script>
</console>
</js>
</data>
</datamodel>
<transition event="Promote" target="Testing"/>
</state>
<state id="Testing">
<datamodel>
<data name="checkItems">
<item name="Effective Inspection Completed" forEvent="">
</item>
<item name="Test Cases Passed" forEvent="">
</item>
<item name="Smoke Test Passed" forEvent="">
</item>
</data>
<data name="transitionExecution">
<execution forEvent="Promote" class="org.wso2.carbon.governance.registry.extensions.executors.ServiceVersionExecutor">
<parameter name="currentEnvironment" value="/_system/governance/branches/testing/{#resourcePath}/{#version}/{#resourceName}"/>
<parameter name="targetEnvironment" value="/_system/governance/branches/production/{#resourcePath}/{#version}/{#resourceName}"/>
<parameter name="service.mediatype" value="application/vnd.wso2-service+xml"/>
<parameter name="wsdl.mediatype" value="application/wsdl+xml"/>
<parameter name="endpoint.mediatype" value="application/vnd.wso2.endpoint"/>
</execution>
<execution forEvent="Demote" class="org.wso2.carbon.governance.registry.extensions.executors.DemoteActionExecutor">
</execution>
</data>
<data name="transitionUI">
<ui forEvent="Promote" href="../lifecycles/pre_invoke_aspect_ajaxprocessor.jsp?currentEnvironment=/_system/governance/branches/testing/"/>
</data>
<data name="transitionScripts">
<js forEvent="Promote">
<console function="showServiceList">
<script type="text/javascript">
showServiceList = function() { var element = document.getElementById('hidden_media_type'); var mediaType = ""; if (element) { mediaType = element.value;} if (mediaType == "application/vnd.wso2-service+xml") { location.href = unescape("../generic/list.jsp?region=region3%26item=governance_list_service_menu%26key=service%26breadcrumb=Services%26singularLabel=Service%26pluralLabel=Services"); } }
</script>
</console>
</js>
</data>
</datamodel>
<transition event="Promote" target="Production"/>
<transition event="Demote" target="Development"/>
</state>
<state id="Production">
<datamodel>
<data name="transitionExecution">
<execution forEvent="Demote" class="org.wso2.carbon.governance.registry.extensions.executors.DemoteActionExecutor">
</execution>
<execution forEvent="Publish" class="org.wso2.carbon.governance.registry.extensions.executors.apistore.ServiceToAPIExecutor">
<parameter name="apim.endpoint" value="http://localhost:9764/"/>
<parameter name="apim.username" value="admin"/>
<parameter name="apim.password" value="admin"/>
<parameter name="apim.env" value="Dev"/>
</execution>
</data>
</datamodel>
<transition event="Publish" target="Published.to.APIStore"/>
<transition event="Demote" target="Testing"/>
</state>
<state id="Published.to.APIStore">
</state>
</scxml>
</lifecycle>
</configuration>
</aspect>
I create a new service and when i want to publish my service i have this error:
[2016-02-22 11:51:27,668] ERROR {org.wso2.carbon.governance.registry.extensions.executors.apistore.ServiceToAPIExecutor}
- Failed to convert service to xml content
org.wso2.carbon.governance.api.exception.GovernanceException
at org.wso2.carbon.governance.registry.extensions.executors.apistore.ServiceToAPIExecutor.publishDataToAPIM(Serv
iceToAPIExecutor.java:216)
at org.wso2.carbon.governance.registry.extensions.executors.apistore.ServiceToAPIExecutor.execute(ServiceToAPIEx
ecutor.java:158)
at org.wso2.carbon.governance.registry.extensions.aspects.DefaultLifeCycle.runCustomExecutorsCode(DefaultLifeCyc
le.java:668)
at org.wso2.carbon.governance.registry.extensions.aspects.DefaultLifeCycle.invoke(DefaultLifeCycle.java:410)
at org.wso2.carbon.governance.registry.eventing.handlers.GovernanceEventingHandler.invokeAspect(GovernanceEventi
ngHandler.java:338)
at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.invokeAspect(HandlerManager.java:2792)
at org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycleManager.invokeAspect(HandlerLifecycleManager.java
:518)
at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.invokeAspect(EmbeddedRegistry.java:2550)
at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.invokeAspect(CacheBackedRegistry.java:427)
at org.wso2.carbon.registry.core.session.UserRegistry.invokeAspect(UserRegistry.java:1948)
at org.wso2.carbon.governance.custom.lifecycles.checklist.util.InvokeAspectUtil.invokeAspect(InvokeAspectUtil.ja
va:52)
at org.wso2.carbon.governance.custom.lifecycles.checklist.services.LifecyclesAdminService.invokeAspect(Lifecycle
sAdminService.java:47)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
at org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver.invokeBusinessLogic(RPCInOnlyMessageReceiver.java:66)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.axis2.transport.local.LocalTransportReceiver.processMessage(LocalTransportReceiver.java:169)
at org.apache.axis2.transport.local.LocalTransportReceiver.processMessage(LocalTransportReceiver.java:82)
at org.wso2.carbon.core.transports.local.CarbonLocalTransportSender.finalizeSendWithToAddress(CarbonLocalTranspo
rtSender.java:45)
at org.apache.axis2.transport.local.LocalTransportSender.invoke(LocalTransportSender.java:77)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.wso2.carbon.governance.custom.lifecycles.checklist.stub.CustomLifecyclesChecklistAdminServiceStub.invokeA
spect(CustomLifecyclesChecklistAdminServiceStub.java:667)
at org.wso2.carbon.governance.custom.lifecycles.checklist.ui.clients.LifecycleServiceClient.invokeAspect(Lifecyc
leServiceClient.java:120)
at org.wso2.carbon.governance.custom.lifecycles.checklist.ui.processors.InvokeAspectProcessor.invokeAspect(Invok
eAspectProcessor.java:56)
at org.apache.jsp.lifecycles.invoke_005faspect_005fajaxprocessor_jsp._jspService(invoke_005faspect_005fajaxproce
ssor_jsp.java:84)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.wso2.carbon.ui.JspServlet.service(JspServlet.java:155)
at org.wso2.carbon.ui.TilesJspServlet.service(TilesJspServlet.java:80)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java
:159)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1739)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1698)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at java.util.Arrays$ArrayList.<init>(Arrays.java:2842)
at java.util.Arrays.asList(Arrays.java:2828)
at org.wso2.carbon.governance.registry.extensions.executors.apistore.ServiceToAPIExecutor.publishDataToAPIM(Serv
iceToAPIExecutor.java:200)
... 77 more
[2016-02-22 11:51:27,682] ERROR {org.wso2.carbon.governance.registry.extensions.aspects.DefaultLifeCycle} - org.wso2.ca
rbon.registry.core.exceptions.RegistryException: Execution failed for action : Publish
[2016-02-22 11:51:27,683] ERROR {org.wso2.carbon.governance.custom.lifecycles.checklist.util.InvokeAspectUtil} - Failed
to invoke action Publish of aspect ServiceLifeCycle on resource /_system/governance/branches/production/services/servic
ea/1.0.0/Service A. Execution failed for action : Publish
org.wso2.carbon.registry.core.exceptions.RegistryException: Execution failed for action : Publish
at org.wso2.carbon.governance.registry.extensions.aspects.DefaultLifeCycle.invoke(DefaultLifeCycle.java:440)
at org.wso2.carbon.governance.registry.eventing.handlers.GovernanceEventingHandler.invokeAspect(GovernanceEventi
ngHandler.java:338)
at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.invokeAspect(HandlerManager.java:2792)
at org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycleManager.invokeAspect(HandlerLifecycleManager.java
:518)
at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.invokeAspect(EmbeddedRegistry.java:2550)
at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.invokeAspect(CacheBackedRegistry.java:427)
at org.wso2.carbon.registry.core.session.UserRegistry.invokeAspect(UserRegistry.java:1948)
at org.wso2.carbon.governance.custom.lifecycles.checklist.util.InvokeAspectUtil.invokeAspect(InvokeAspectUtil.ja
va:52)
at org.wso2.carbon.governance.custom.lifecycles.checklist.services.LifecyclesAdminService.invokeAspect(Lifecycle
sAdminService.java:47)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
at org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver.invokeBusinessLogic(RPCInOnlyMessageReceiver.java:66)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.axis2.transport.local.LocalTransportReceiver.processMessage(LocalTransportReceiver.java:169)
at org.apache.axis2.transport.local.LocalTransportReceiver.processMessage(LocalTransportReceiver.java:82)
at org.wso2.carbon.core.transports.local.CarbonLocalTransportSender.finalizeSendWithToAddress(CarbonLocalTranspo
rtSender.java:45)
at org.apache.axis2.transport.local.LocalTransportSender.invoke(LocalTransportSender.java:77)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.wso2.carbon.governance.custom.lifecycles.checklist.stub.CustomLifecyclesChecklistAdminServiceStub.invokeA
spect(CustomLifecyclesChecklistAdminServiceStub.java:667)
at org.wso2.carbon.governance.custom.lifecycles.checklist.ui.clients.LifecycleServiceClient.invokeAspect(Lifecyc
leServiceClient.java:120)
at org.wso2.carbon.governance.custom.lifecycles.checklist.ui.processors.InvokeAspectProcessor.invokeAspect(Invok
eAspectProcessor.java:56)
at org.apache.jsp.lifecycles.invoke_005faspect_005fajaxprocessor_jsp._jspService(invoke_005faspect_005fajaxproce
ssor_jsp.java:84)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.wso2.carbon.ui.JspServlet.service(JspServlet.java:155)
at org.wso2.carbon.ui.TilesJspServlet.service(TilesJspServlet.java:80)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java
:159)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1739)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1698)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
My WSO2 G-Reg --> https://localhost:9443/carbon
My WSO2 APM --> https://localhost:<9443+offset>/carbon
offset = 1
According to the error stack trace, Service artifact you are going to publish as API doesn't contain service endpoints. Service Endpoint is a must attribute to create an API definition at the APIStore.
Please check whether you have mentioned endpoint details in Service metadata.
It will be great if you can include the G-Reg + APIM versions you are using.
Please look into below bpel code(WSO2).
<bpel:assign validate="no" name="Assign">
<bpel:copy>
<bpel:from>
bpel:doXslTransform("RequestAdd.xsl", $input.payload)
</bpel:from>
<bpel:to variable="Request" part="payload"></bpel:to>
</bpel:copy>
</bpel:assign>
I tried to Pass inputs to a external addition service using xslt in BPEL. $input and $request are message types. But seems like request is not passed to Addition service correctly. Please Help me in solving this. Below is the BPEL Code
<!-- InvokeUsingXSLT BPEL Process [Generated by the Eclipse BPEL Designer] -->
<!-- Date: Mon Mar 05 12:13:11 IST 2012 -->
<bpel:process name="InvokeUsingXSLT"
targetNamespace="http://wso2.org/bps/sample"
suppressJoinFailure="yes"
xmlns:tns="http://wso2.org/bps/sample"
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
>
<!-- Import the client WSDL -->
<bpel:import namespace="http://wso2.org/bps/sample" location="AddService.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"></bpel:import>
<bpel:import location="InvokeUsingXSLTArtifacts.wsdl" namespace="http://wso2.org/bps/sample"
importType="http://schemas.xmlsoap.org/wsdl/" />
<!-- ================================================================= -->
<!-- PARTNERLINKS -->
<!-- List of services participating in this BPEL process -->
<!-- ================================================================= -->
<bpel:partnerLinks>
<!-- The 'client' role represents the requester of this service. -->
<bpel:partnerLink name="client"
partnerLinkType="tns:InvokeUsingXSLT"
myRole="InvokeUsingXSLTProvider"
/>
<bpel:partnerLink name="Add_service" partnerLinkType="tns:Add_service" partnerRole="Add_serviceProvider"></bpel:partnerLink>
</bpel:partnerLinks>
<!-- ================================================================= -->
<!-- VARIABLES -->
<!-- List of messages and XML documents used within this BPEL process -->
<!-- ================================================================= -->
<bpel:variables>
<!-- Reference to the message passed as input during initiation -->
<bpel:variable name="input"
messageType="tns:InvokeUsingXSLTRequestMessage"/>
<!--
Reference to the message that will be returned to the requester
-->
<bpel:variable name="output"
messageType="tns:InvokeUsingXSLTResponseMessage"/>
<bpel:variable name="Request" messageType="tns:Add_serviceRequestMessage"></bpel:variable>
<bpel:variable name="Response" messageType="tns:Add_serviceResponseMessage"></bpel:variable>
</bpel:variables>
<!-- ================================================================= -->
<!-- ORCHESTRATION LOGIC -->
<!-- Set of activities coordinating the flow of messages across the -->
<!-- services integrated within this business process -->
<!-- ================================================================= -->
<bpel:sequence name="main">
<!-- Receive input from requester.
Note: This maps to operation defined in InvokeUsingXSLT.wsdl
-->
<bpel:receive name="receiveInput" partnerLink="client"
portType="tns:InvokeUsingXSLT"
operation="process" variable="input"
createInstance="yes"/>
<!-- Generate reply to synchronous request -->
<bpel:assign validate="no" name="Assign">
<bpel:copy>
<bpel:from>
bpel:doXslTransform("RequestAdd.xsl", $input.payload)
</bpel:from>
<bpel:to variable="Request" part="payload"></bpel:to>
</bpel:copy>
</bpel:assign>
<bpel:log></bpel:log>
<bpel:invoke name="Invoke" partnerLink="Add_service" operation="process" portType="tns:Add_service" inputVariable="Request" outputVariable="Response"></bpel:invoke>
<bpel:assign validate="no" name="Assign1">
<bpel:copy>
<bpel:from><bpel:literal><tns:InvokeUsingXSLTResponse xmlns:tns="http://wso2.org/bps/sample" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tns:result>0</tns:result>
</tns:InvokeUsingXSLTResponse>
</bpel:literal></bpel:from>
<bpel:to variable="output" part="payload"></bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from>
bpel:doXslTransform("ResponseAdd.xsl", $Response.payload)
</bpel:from>
<bpel:to part="payload" variable="output">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query>
</bpel:to>
</bpel:copy>
</bpel:assign>
<bpel:reply name="replyOutput"
partnerLink="client"
portType="tns:InvokeUsingXSLT"
operation="process"
variable="output"
/>
</bpel:sequence>
</bpel:process>
suggestion: try to debug your process adding variable where you could print the some "breakpoint", then:
-send request
-wait until the process has done
-open the consolle
-select your process
-click on "complete" link
-click on process instance
-check your variables
Also: put the log in debug/trace mode so you can see your process's behaviour.
Regards
Claudio
how to debug bps log
I'm trying to call a service to get the temperature and pass the result to another service to convery fahrenheit degrees to celsius but i get an exception when I execute the service.
<!-- temperatura BPEL Process [Generated by the Eclipse BPEL Designer] -->
<!-- Date: Tue May 12 10:40:32 CEST 2015 -->
<bpel:process name="temperatura"
targetNamespace="http://ws.temperatura.tps"
suppressJoinFailure="yes"
xmlns:tns="http://ws.temperatura.tps"
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:ns="http://ws.cdyne.com/WeatherWS/" xmlns:ns0="http://www.w3schools.com/webservices/">
<!-- Import the client WSDL -->
<bpel:import namespace="http://www.w3schools.com/webservices/" location="tempconvert.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"></bpel:import>
<bpel:import namespace="http://ws.cdyne.com/WeatherWS/" location="WeatherSoap.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"></bpel:import>
<bpel:import location="temperaturaArtifacts.wsdl" namespace="http://ws.temperatura.tps"
importType="http://schemas.xmlsoap.org/wsdl/" />
<!-- ================================================================= -->
<!-- PARTNERLINKS -->
<!-- List of services participating in this BPEL process -->
<!-- ================================================================= -->
<bpel:partnerLinks>
<!-- The 'client' role represents the requester of this service. -->
<bpel:partnerLink name="client"
partnerLinkType="tns:temperatura"
myRole="temperaturaProvider"
/>
<bpel:partnerLink name="WeatherPL" partnerLinkType="tns:WeatherPLT" partnerRole="WeatherRole"></bpel:partnerLink>
<bpel:partnerLink name="ConverterPL" partnerLinkType="tns:ConverterPLT" partnerRole="ConverterRole"></bpel:partnerLink>
</bpel:partnerLinks>
<!-- ================================================================= -->
<!-- VARIABLES -->
<!-- List of messages and XML documents used within this BPEL process -->
<!-- ================================================================= -->
<bpel:variables>
<!-- Reference to the message passed as input during initiation -->
<bpel:variable name="input"
messageType="tns:temperaturaRequestMessage"/>
<!--
Reference to the message that will be returned to the requester
-->
<bpel:variable name="output"
messageType="tns:temperaturaResponseMessage"/>
<bpel:variable name="WeatherPLResponse" messageType="ns:GetCityWeatherByZIPSoapOut"></bpel:variable>
<bpel:variable name="WeatherPLRequest" messageType="ns:GetCityWeatherByZIPSoapIn"></bpel:variable>
<bpel:variable name="ConverterPLResponse" messageType="ns0:FahrenheitToCelsiusSoapOut"></bpel:variable>
<bpel:variable name="ConverterPLRequest" messageType="ns0:FahrenheitToCelsiusSoapIn"></bpel:variable>
</bpel:variables>
<!-- ================================================================= -->
<!-- ORCHESTRATION LOGIC -->
<!-- Set of activities coordinating the flow of messages across the -->
<!-- services integrated within this business process -->
<!-- ================================================================= -->
<bpel:sequence name="main">
<!-- Receive input from requester.
Note: This maps to operation defined in temperatura.wsdl
-->
<bpel:receive name="receiveInput" partnerLink="client"
portType="tns:temperatura"
operation="process" variable="input"
createInstance="yes"/>
<!-- Generate reply to synchronous request -->
<bpel:assign validate="no" name="AssignInput">
<bpel:copy>
<bpel:from><bpel:literal><tns:GetCityWeatherByZIP xmlns:tns="http://ws.cdyne.com/WeatherWS/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tns:ZIP>tns:ZIP</tns:ZIP>
</tns:GetCityWeatherByZIP>
</bpel:literal></bpel:from>
<bpel:to variable="WeatherPLRequest" part="parameters"></bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from part="payload" variable="input">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:zipcode]]></bpel:query>
</bpel:from>
<bpel:to part="parameters" variable="WeatherPLRequest">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns:ZIP]]></bpel:query>
</bpel:to>
</bpel:copy>
</bpel:assign>
<bpel:invoke name="InvokeWeather" partnerLink="WeatherPL" operation="GetCityWeatherByZIP" portType="ns:WeatherSoap" inputVariable="WeatherPLRequest" outputVariable="WeatherPLResponse"></bpel:invoke>
<bpel:assign validate="no" name="AssignTemp">
<bpel:copy>
<bpel:from><bpel:literal><tns:FahrenheitToCelsius xmlns:tns="http://www.w3schools.com/webservices/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tns:Fahrenheit>tns:Fahrenheit</tns:Fahrenheit>
</tns:FahrenheitToCelsius>
</bpel:literal></bpel:from>
<bpel:to variable="ConverterPLRequest" part="parameters"></bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from part="parameters" variable="WeatherPLResponse">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns:GetCityWeatherByZIPResult/ns:Temperature]]></bpel:query>
</bpel:from>
<bpel:to part="parameters" variable="ConverterPLRequest">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns0:Fahrenheit]]></bpel:query>
</bpel:to>
</bpel:copy>
</bpel:assign>
<bpel:invoke name="InvokeTemp" partnerLink="ConverterPL" operation="FahrenheitToCelsius" portType="ns0:TempConvertSoap" inputVariable="ConverterPLRequest" outputVariable="ConverterPLResponse"></bpel:invoke>
<bpel:assign validate="no" name="AssignOuput">
<bpel:copy>
<bpel:from><bpel:literal><tns:temperaturaResponse xmlns:tns="http://ws.temperatura.tps" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tns:temp>tns:temp</tns:temp>
</tns:temperaturaResponse>
</bpel:literal></bpel:from>
<bpel:to variable="output" part="payload"></bpel:to>
</bpel:copy>
<bpel:copy>
<bpel:from part="parameters" variable="ConverterPLResponse">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[ns0:FahrenheitToCelsiusResult]]></bpel:query>
</bpel:from>
<bpel:to part="payload" variable="output">
<bpel:query queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:temp]]></bpel:query>
</bpel:to>
</bpel:copy>
</bpel:assign>
<bpel:reply name="replyOutput"
partnerLink="client"
portType="tns:temperatura"
operation="process"
variable="output"
/>
</bpel:sequence>
</bpel:process>
and when I execute the service I get this exception
<?xml version="1.0" encoding="UTF-8"?>
<message><parameters><GetCityWeatherByZIPResponse xmlns="http://ws.cdyne.com/WeatherWS/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><GetCityWeatherByZIPResult xmlns="http://ws.cdyne.com/WeatherWS/"><Success xmlns="http://ws.cdyne.com/WeatherWS/">true</Success><ResponseText xmlns="http://ws.cdyne.com/WeatherWS/">City Found</ResponseText><State xmlns="http://ws.cdyne.com/WeatherWS/">NY</State><City xmlns="http://ws.cdyne.com/WeatherWS/">New York</City><WeatherStationCity xmlns="http://ws.cdyne.com/WeatherWS/">White Plains</WeatherStationCity><WeatherID xmlns="http://ws.cdyne.com/WeatherWS/">15</WeatherID><Description xmlns="http://ws.cdyne.com/WeatherWS/">N/A</Description><Temperature xmlns="http://ws.cdyne.com/WeatherWS/">63</Temperature><RelativeHumidity xmlns="http://ws.cdyne.com/WeatherWS/">87</RelativeHumidity><Wind xmlns="http://ws.cdyne.com/WeatherWS/">E7</Wind><Pressure xmlns="http://ws.cdyne.com/WeatherWS/">29.97S</Pressure><Visibility xmlns="http://ws.cdyne.com/WeatherWS/"/><WindChill xmlns="http://ws.cdyne.com/WeatherWS/"/><Remarks xmlns="http://ws.cdyne.com/WeatherWS/"/></GetCityWeatherByZIPResult></GetCityWeatherByZIPResponse></parameters></message>
11:15:44,686 ERROR [ExternalService] Error sending message (mex={PartnerRoleMex#hqejbhcnphraa13wrt34ru [PID {http://ws.temperatura.tps}temperatura-178] calling org.apache.ode.bpel.epr.WSAEndpoint#4d15bb4f.FahrenheitToCelsius(...) Status ASYNC}): Transport error: 411 Error: Length Required
org.apache.axis2.AxisFault: Transport error: 411 Error: Length Required
at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:298)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:192)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at org.apache.ode.axis2.SoapExternalService$1$1.call(SoapExternalService.java:206)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
The service is expecting Content Length header.
Add following property:
I'm trying to create a custom artifact type in WSO2 Governance Registry 4.6.0 to have a custom metadata for my services.
When I try to save the new artifact I have this error:
A valid qualified name was not set for this artifact
The system log is showing:
TID[-1234] [Greg] [2013-11-27 11:26:05,947] ERROR
{org.apache.axis2.rpc.receivers.RPCMessageReceiver} - A valid
qualified name was not set for this artifact
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
org.apache.axis2.transport.local.LocalTransportReceiver.processMessage(LocalTransportReceiver.java:169)
org.apache.axis2.transport.local.LocalTransportReceiver.processMessage(LocalTransportReceiver.java:82)
org.wso2.carbon.core.transports.local.CarbonLocalTransportSender.finalizeSendWithToAddress(CarbonLocalTransportSender.java:45)
org.apache.axis2.transport.local.LocalTransportSender.invoke(LocalTransportSender.java:77)
org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:398)
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:224)
org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
org.wso2.carbon.governance.generic.stub.ManageGenericArtifactServiceStub.addArtifact(ManageGenericArtifactServiceStub.java:3452)
org.wso2.carbon.governance.generic.ui.clients.ManageGenericArtifactServiceClient.addArtifact(ManageGenericArtifactServiceClient.java:104)
org.wso2.carbon.governance.generic.ui.utils.ManageGenericArtifactUtil.addArtifactContent(ManageGenericArtifactUtil.java:60)
org.apache.jsp.generic.add_005fajaxprocessor_jsp._jspService(org.apache.jsp.generic.add_005fajaxprocessor_jsp:95)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
org.wso2.carbon.ui.JspServlet.service(JspServlet.java:155)
org.wso2.carbon.ui.TilesJspServlet.service(TilesJspServlet.java:80)
javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)
org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)
org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)
org.wso2.carbon.apimgt.interceptor.valve.APIManagerInterceptorValve.invoke(APIManagerInterceptorValve.java:101)
org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)
org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
java.lang.Thread.run(Thread.java:662)
Does anybody faced this kind of error??
Thanks
Check these
artifactType
storagePath
Eg:-
<artifactType type="application/vnd.wso2-employee+xml" shortName="employee" singularLabel="Employee" pluralLabel="Employees" hasNamespace="false" iconSet="11">
<storagePath>/employees/#{overview_name}</storagePath>
<nameAttribute>overview_name</nameAttribute>
<ui>
<list>
<column name="Name">
<data type="path" value="overview_name" href="#{storagePath}"/>
</column>
<column name="Type">
<data type="path" value="overview_type" />
</column>
<column name="Address">
<data type="text" value="overview_address"/>
</column>
<column name="Sex">
<data type="text" value="overview_sex"/>
</column>
</list>
</ui>
<content>
<table name="Overview">
<field type="text" required="true" readonly="true">
<name>Name</name>
</field>
<field type="text" required="true" readonly="true">
<name>Type</name>
</field>
<field type="text" required="true" readonly="true">
<name>Address</name>
</field>
<field type="options" readonly="true">
<name label="Sex">Sex</name>
<values>
<value>male</value>
<value>female</value>
</values>
</field>
</table>
</content>
</artifactType>