/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF 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.
*/
package org.apache.ode.bpel.compiler;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Stack;
import javax.wsdl.Definition;
import javax.wsdl.Message;
import javax.wsdl.Operation;
import javax.wsdl.Part;
import javax.wsdl.PortType;
import javax.wsdl.WSDLException;
import javax.wsdl.xml.WSDLReader;
import javax.xml.namespace.QName;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.ode.bpel.compiler.api.CompilationException;
import org.apache.ode.bpel.compiler.api.CompilationMessage;
import org.apache.ode.bpel.compiler.api.CompileListener;
import org.apache.ode.bpel.compiler.api.CompilerContext;
import org.apache.ode.bpel.compiler.api.ExpressionCompiler;
import org.apache.ode.bpel.compiler.api.SourceLocation;
import org.apache.ode.bpel.compiler.bom.Activity;
import org.apache.ode.bpel.compiler.bom.Bpel11QNames;
import org.apache.ode.bpel.compiler.bom.Bpel20QNames;
import org.apache.ode.bpel.compiler.bom.BpelObject;
import org.apache.ode.bpel.compiler.bom.Catch;
import org.apache.ode.bpel.compiler.bom.CompensationHandler;
import org.apache.ode.bpel.compiler.bom.Correlation;
import org.apache.ode.bpel.compiler.bom.CorrelationSet;
import org.apache.ode.bpel.compiler.bom.Expression;
import org.apache.ode.bpel.compiler.bom.Expression11;
import org.apache.ode.bpel.compiler.bom.FaultHandler;
import org.apache.ode.bpel.compiler.bom.Import;
import org.apache.ode.bpel.compiler.bom.LinkSource;
import org.apache.ode.bpel.compiler.bom.LinkTarget;
import org.apache.ode.bpel.compiler.bom.OnAlarm;
import org.apache.ode.bpel.compiler.bom.OnEvent;
import org.apache.ode.bpel.compiler.bom.PartnerLink;
import org.apache.ode.bpel.compiler.bom.PartnerLinkType;
import org.apache.ode.bpel.compiler.bom.Process;
import org.apache.ode.bpel.compiler.bom.Property;
import org.apache.ode.bpel.compiler.bom.PropertyAlias;
import org.apache.ode.bpel.compiler.bom.Scope;
import org.apache.ode.bpel.compiler.bom.ScopeActivity;
import org.apache.ode.bpel.compiler.bom.ScopeLikeActivity;
import org.apache.ode.bpel.compiler.bom.TerminationHandler;
import org.apache.ode.bpel.compiler.bom.Variable;
import org.apache.ode.bpel.compiler.wsdl.Definition4BPEL;
import org.apache.ode.bpel.compiler.wsdl.WSDLFactory4BPEL;
import org.apache.ode.bpel.o.DebugInfo;
import org.apache.ode.bpel.o.OActivity;
import org.apache.ode.bpel.o.OAssign;
import org.apache.ode.bpel.o.OCatch;
import org.apache.ode.bpel.o.OCompensate;
import org.apache.ode.bpel.o.OCompensationHandler;
import org.apache.ode.bpel.o.OConstantExpression;
import org.apache.ode.bpel.o.OConstantVarType;
import org.apache.ode.bpel.o.OConstants;
import org.apache.ode.bpel.o.OElementVarType;
import org.apache.ode.bpel.o.OEventHandler;
import org.apache.ode.bpel.o.OExpression;
import org.apache.ode.bpel.o.OExpressionLanguage;
import org.apache.ode.bpel.o.OExtVar;
import org.apache.ode.bpel.o.OFaultHandler;
import org.apache.ode.bpel.o.OFlow;
import org.apache.ode.bpel.o.OLValueExpression;
import org.apache.ode.bpel.o.OLink;
import org.apache.ode.bpel.o.OMessageVarType;
import org.apache.ode.bpel.o.OPartnerLink;
import org.apache.ode.bpel.o.OProcess;
import org.apache.ode.bpel.o.ORethrow;
import org.apache.ode.bpel.o.OScope;
import org.apache.ode.bpel.o.OSequence;
import org.apache.ode.bpel.o.OTerminationHandler;
import org.apache.ode.bpel.o.OVarType;
import org.apache.ode.bpel.o.OXsdTypeVarType;
import org.apache.ode.bpel.o.OXslSheet;
import org.apache.ode.utils.GUID;
import org.apache.ode.utils.NSContext;
import org.apache.ode.utils.StreamUtils;
import org.apache.ode.utils.fs.FileUtils;
import org.apache.ode.utils.msg.MessageBundle;
import org.apache.ode.utils.stl.CollectionsX;
import org.apache.ode.utils.stl.MemberOfFunction;
import org.apache.ode.utils.stl.UnaryFunction;
import org.apache.ode.utils.xsd.XSUtils;
import org.apache.ode.utils.xsd.XsdException;
import org.apache.ode.utils.xsd.SchemaModel;
import org.apache.xerces.xni.parser.XMLEntityResolver;
import org.w3c.dom.Node;
/**
* Compiler for converting BPEL process descriptions (and their associated WSDL
* and XSD documents) into compiled representations suitable for execution by
* the ODE BPEL Service Provider. TODO: Move process validation into this class.
*/
abstract class BpelCompiler implements CompilerContext {
/** Class-severity logger. */
protected static final Log __log = LogFactory.getLog(BpelCompiler.class);
/** Standardized compiler messages. */
private static final CommonCompilationMessages __cmsgs = MessageBundle.getMessages(CommonCompilationMessages.class);
private org.apache.ode.bpel.compiler.bom.Process _processDef;
private Date _generatedDate;
private HashMap<Class, ActivityGenerator> _actGenerators = new HashMap<Class, ActivityGenerator>();
private boolean _supressJoinFailure = false;
private boolean _atomicScope = false;
/** Syntactic scope stack. */
private StructureStack _structureStack = new StructureStack();
/** Fault/compensate recovery stack. */
private Stack<OScope> _recoveryContextStack = new Stack<OScope>();
/** History of compiled activities */
private List<OActivity> _compiledActivities = new ArrayList<OActivity>();
private OProcess _oprocess;
private ResourceFinder _resourceFinder;
private WSDLRegistry _wsdlRegistry;
private final List<CompilationMessage> _errors = new ArrayList<CompilationMessage>();
private CompileListener _compileListener;
private final HashMap<String, ExpressionCompiler> _expLanguageCompilers = new HashMap<String, ExpressionCompiler>();
private final HashMap<String, OExpressionLanguage> _expLanguages = new HashMap<String, OExpressionLanguage>();
private WSDLFactory4BPEL _wsdlFactory;
private OExpressionLanguage _konstExprLang;
private Map<QName, Node> _customProcessProperties;
private URI _processURI;
BpelCompiler(WSDLFactory4BPEL wsdlFactory) {
_wsdlFactory = wsdlFactory;
_wsdlRegistry = new WSDLRegistry(this);
}
public void addWsdlImport(URI from, URI wsdlImport, SourceLocation sloc) {
Definition4BPEL def;
try {
WSDLReader r = _wsdlFactory.newWSDLReader();
WSDLLocatorImpl locator = new WSDLLocatorImpl(_resourceFinder, from.resolve(wsdlImport));
def = (Definition4BPEL) r.readWSDL(locator);
} catch (WSDLException e) {
recoveredFromError(sloc, new CompilationException(__cmsgs.errWsdlParseError(e
.getFaultCode(), e.getLocation(), e.getMessage())));
throw new CompilationException(__cmsgs.errWsdlImportFailed(wsdlImport.toASCIIString(), e.getFaultCode())
.setSource(sloc), e);
}
try {
_wsdlRegistry.addDefinition(def, _resourceFinder, from.resolve(wsdlImport));
if (__log.isDebugEnabled())
没有合适的资源?快使用搜索试试~ 我知道了~
apache-ode-src-1.2.zip_BPEL_apache-tomcat_xmlmime.xsd
共1741个文件
java:954个
wsdl:182个
bpel:173个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 150 浏览量
2022-09-24
00:37:10
上传
评论
收藏 4.14MB ZIP 举报
温馨提示
bpel执行引擎用来执行bpel业务流程
资源推荐
资源详情
资源评论
收起资源包目录
apache-ode-src-1.2.zip_BPEL_apache-tomcat_xmlmime.xsd (1741个子文件)
version.aar 2KB
activation-LICENSE 17KB
annogen-LICENSE 11KB
com.sun.mirror.apt.AnnotationProcessorFactory 56B
axion-LICENSE 2KB
backport-util-LICENSE 2KB
sendsoap.bat 2KB
bpelc.bat 2KB
TestActivityFlow.bpel 11KB
TestActivityFlow.bpel 11KB
http-binding-test.bpel 10KB
TestStaticOnMessage.bpel 9KB
TestStaticPick.bpel 9KB
ExtVar2.bpel 8KB
TestInstantiatingPick.bpel 8KB
testFaultHandlers.bpel 8KB
TestFaultWithVariable.bpel 7KB
testCompensationHandlers.bpel 7KB
NegativeInitializationTest.bpel 7KB
NegativeCorrelationTest.bpel 7KB
AsyncProcess2.bpel 6KB
TestDynamicPick.bpel 6KB
DynPartnerMain.bpel 5KB
TestImplicitFaultHandler.bpel 5KB
testCorrelation.bpel 5KB
TestCatchFaultInFaultHandler.bpel 5KB
ComplexVariables-Variable.bpel 5KB
Ping.bpel 4KB
Main.bpel 4KB
TestCorrelation1.bpel 4KB
TestCase.bpel 4KB
TestAssign.bpel 4KB
helloworld-Server.bpel 4KB
HandleTimer-Timer.bpel 4KB
TestTimer.bpel 4KB
TestSubTreeAssign.bpel 4KB
ExtVar3-EmptyValues.bpel 4KB
TestXPathNamespace2.bpel 4KB
Pick5-2.0.bpel 4KB
Responder.bpel 4KB
flow6-2.0.bpel 4KB
correlation1.bpel 4KB
ForEach-ForEach.bpel 4KB
onmessage-1.bpel 3KB
HelloWorld2.bpel 3KB
DynPartnerResponder.bpel 3KB
failure-to-cancel.bpel 3KB
flow5-2.0.bpel 3KB
HeaderTest.bpel 3KB
failure-to-recovery.bpel 3KB
Throw6-2.0.bpel 3KB
Throw5-2.0.bpel 3KB
TestSimpleVariableType.bpel 3KB
HelloWorld2.bpel 3KB
Pong.bpel 3KB
TestXPathNamespace1.bpel 3KB
TestIf.bpel 3KB
failure-inheritence.bpel 3KB
TestExpandTemplate.bpel 3KB
failure-to-fault.bpel 3KB
TestCorrelationOpaque.bpel 3KB
Throw3-2.0.bpel 3KB
Pick4.bpel 3KB
correlation2.bpel 3KB
Throw7-2.0.bpel 3KB
flow3.bpel 3KB
Pick1.bpel 3KB
Switch3.bpel 3KB
Switch2.bpel 3KB
TestComposeUrl.bpel 3KB
TestSimpleTypeParts.bpel 3KB
NewDiagram-Pool.bpel 3KB
Rethrow1-2.0.bpel 3KB
flow3-2.0.bpel 3KB
If2-2.0.bpel 3KB
Invoke2.bpel 3KB
failure-no-retry.bpel 3KB
Pick4-2.0.bpel 3KB
HelloXslWorld.bpel 3KB
TestAssign.bpel 3KB
HelloWorld2.bpel 3KB
same-transaction.bpel 3KB
ForEach2-2.0.bpel 3KB
flow7-2.0.bpel 3KB
ExtVar-GenKey.bpel 3KB
Switch1.bpel 3KB
TestCombineUrl.bpel 3KB
NewDiagram2-Pool0.bpel 3KB
flow4.bpel 3KB
comp1-2.0.bpel 3KB
flow2.bpel 3KB
Invoke1.bpel 3KB
Assign3.bpel 3KB
VariableScope1.bpel 3KB
comp1.bpel 3KB
counter.bpel 3KB
comp2-2.0.bpel 3KB
Assign3-2.0.bpel 3KB
Rethrow2-2.0.bpel 3KB
BugCastDayTimeDurationToDuration-Pool.bpel 3KB
共 1741 条
- 1
- 2
- 3
- 4
- 5
- 6
- 18
资源评论
御道御小黑
- 粉丝: 58
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功