feat(jdk8): move files to new folder to avoid resources compiled.
This commit is contained in:
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model;
|
||||
|
||||
import com.sun.xml.internal.bind.api.Bridge;
|
||||
|
||||
import javax.xml.ws.WebFault;
|
||||
import javax.xml.namespace.QName;
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
/**
|
||||
* This class provides abstractio to the the exception class
|
||||
* corresponding to the wsdl:fault, such as class MUST have
|
||||
* {@link WebFault} annotation defined on it.
|
||||
*
|
||||
* Also the exception class must have
|
||||
*
|
||||
* <code>public WrapperException()String message, FaultBean){}</code>
|
||||
*
|
||||
* and method
|
||||
*
|
||||
* <code>public FaultBean getFaultInfo();</code>
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public interface CheckedException {
|
||||
/**
|
||||
* Gets the root {@link SEIModel} that owns this model.
|
||||
*/
|
||||
SEIModel getOwner();
|
||||
|
||||
/**
|
||||
* Gets the parent {@link JavaMethod} to which this checked exception belongs.
|
||||
*/
|
||||
JavaMethod getParent();
|
||||
|
||||
/**
|
||||
* The returned exception class would be userdefined or WSDL exception class.
|
||||
*
|
||||
* @return
|
||||
* always non-null same object.
|
||||
*/
|
||||
Class getExceptionClass();
|
||||
|
||||
/**
|
||||
* The detail bean is serialized inside the detail entry in the SOAP message.
|
||||
* This must be known to the {@link javax.xml.bind.JAXBContext} inorder to get
|
||||
* marshalled/unmarshalled.
|
||||
*
|
||||
* @return the detail bean
|
||||
*/
|
||||
Class getDetailBean();
|
||||
|
||||
/**
|
||||
* Gives the {@link com.sun.xml.internal.bind.api.Bridge} associated with the detail
|
||||
* @deprecated Why do you need this?
|
||||
*/
|
||||
Bridge getBridge();
|
||||
|
||||
/**
|
||||
* Tells whether the exception class is a userdefined or a WSDL exception.
|
||||
* A WSDL exception class follows the pattern defined in JSR 224. According to that
|
||||
* a WSDL exception class must have:
|
||||
*
|
||||
* <code>public WrapperException()String message, FaultBean){}</code>
|
||||
*
|
||||
* and accessor method
|
||||
*
|
||||
* <code>public FaultBean getFaultInfo();</code>
|
||||
*/
|
||||
ExceptionType getExceptionType();
|
||||
|
||||
/**
|
||||
* Gives the wsdl:portType/wsdl:operation/wsdl:fault@message value - that is the wsdl:message
|
||||
* referenced by wsdl:fault
|
||||
*/
|
||||
String getMessageName();
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model;
|
||||
/**
|
||||
* Type of java exception as defined by JAXWS 2.0 JSR 224.
|
||||
*
|
||||
* Tells whether the exception class is a userdefined or a WSDL exception.
|
||||
* A WSDL exception class follows the pattern defined in JSR 224. According to that
|
||||
* a WSDL exception class must have:
|
||||
*
|
||||
* <code>public WrapperException()String message, FaultBean){}</code>
|
||||
*
|
||||
* and accessor method
|
||||
*
|
||||
* <code>public FaultBean getFaultInfo();</code>
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public enum ExceptionType {
|
||||
WSDLException(0), UserDefined(1);
|
||||
|
||||
ExceptionType(int exceptionType){
|
||||
this.exceptionType = exceptionType;
|
||||
}
|
||||
|
||||
public int value() {
|
||||
return exceptionType;
|
||||
}
|
||||
private final int exceptionType;
|
||||
}
|
||||
141
jdkSrc/jdk8/com/sun/xml/internal/ws/api/model/JavaMethod.java
Normal file
141
jdkSrc/jdk8/com/sun/xml/internal/ws/api/model/JavaMethod.java
Normal file
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
import com.sun.xml.internal.ws.api.model.soap.SOAPBinding;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import java.lang.reflect.Method;
|
||||
import javax.jws.WebService;
|
||||
|
||||
/**
|
||||
* Abstracts the annotated {@link Method} of a SEI.
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public interface JavaMethod {
|
||||
|
||||
/**
|
||||
* Gets the root {@link SEIModel} that owns this model.
|
||||
*/
|
||||
SEIModel getOwner();
|
||||
|
||||
/**
|
||||
* On the server side, it uses this for invocation of the web service
|
||||
*
|
||||
* <p>
|
||||
* {@literal @}{@link WebService}(endpointInterface="I")
|
||||
* class A { }
|
||||
*
|
||||
* In this case, it retuns A's method
|
||||
*
|
||||
* <p>
|
||||
* {@literal @}{@link WebService}(endpointInterface="I")
|
||||
* class A implements I { }
|
||||
* In this case, it returns A's method
|
||||
*
|
||||
* <p>
|
||||
* {@literal @}{@link WebService}
|
||||
* class A { }
|
||||
* In this case, it returns A's method
|
||||
*
|
||||
* @return Returns the java {@link Method}
|
||||
*/
|
||||
@NotNull Method getMethod();
|
||||
|
||||
|
||||
/**
|
||||
* This should be used if you want to access annotations on WebMethod
|
||||
* Returns the SEI method if there is one.
|
||||
*
|
||||
* <p>
|
||||
* {@literal @}{@link WebService}(endpointInterface="I")
|
||||
* class A { }
|
||||
* In this case, it retuns I's method
|
||||
*
|
||||
* <p>
|
||||
* {@literal @}{@link WebService}(endpointInterface="I")
|
||||
* class A implements I { }
|
||||
* In this case, it returns I's method
|
||||
*
|
||||
* <p>
|
||||
* {@literal @}{@link WebService}
|
||||
* class A { }
|
||||
* In this case, it returns A's method
|
||||
*
|
||||
* @return Returns the java {@link Method}
|
||||
*/
|
||||
@NotNull Method getSEIMethod();
|
||||
|
||||
/**
|
||||
* @return Returns the {@link MEP}.
|
||||
*/
|
||||
MEP getMEP();
|
||||
|
||||
/**
|
||||
* Binding object - a {@link SOAPBinding} isntance.
|
||||
*
|
||||
* @return the Binding object
|
||||
*/
|
||||
SOAPBinding getBinding();
|
||||
|
||||
/**
|
||||
* Gives the wsdl:operation@name value
|
||||
*/
|
||||
@NotNull String getOperationName();
|
||||
|
||||
|
||||
/**
|
||||
* Gives the request wsdl:message@name value
|
||||
*/
|
||||
@NotNull String getRequestMessageName();
|
||||
|
||||
/**
|
||||
* Gives the response wsdl:messageName value
|
||||
* @return null if its a oneway operation that is getMEP().isOneWay()==true.
|
||||
* @see com.sun.xml.internal.ws.api.model.MEP#isOneWay()
|
||||
*/
|
||||
@Nullable String getResponseMessageName();
|
||||
|
||||
/**
|
||||
* Gives soap:Body's first child's name for request message.
|
||||
*
|
||||
* @return
|
||||
* null if this operation doesn't have any request parameter bound to the body.
|
||||
*/
|
||||
@Nullable QName getRequestPayloadName();
|
||||
|
||||
/**
|
||||
* Gives soap:Body's first child's name for response message.
|
||||
*
|
||||
* @return
|
||||
* null if this operation doesn't have any response parameter bound to the body.
|
||||
*/
|
||||
@Nullable QName getResponsePayloadName();
|
||||
|
||||
}
|
||||
51
jdkSrc/jdk8/com/sun/xml/internal/ws/api/model/MEP.java
Normal file
51
jdkSrc/jdk8/com/sun/xml/internal/ws/api/model/MEP.java
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model;
|
||||
|
||||
/**
|
||||
* Constants that represents four message exchange patterns.
|
||||
*
|
||||
* @author Kohsuke Kawaguchi
|
||||
*/
|
||||
public enum MEP {
|
||||
REQUEST_RESPONSE(false),
|
||||
ONE_WAY(false),
|
||||
ASYNC_POLL(true),
|
||||
ASYNC_CALLBACK(true);
|
||||
|
||||
/**
|
||||
* True for {@link #ASYNC_CALLBACK} and {@link #ASYNC_POLL}.
|
||||
*/
|
||||
public final boolean isAsync;
|
||||
|
||||
MEP(boolean async) {
|
||||
isAsync = async;
|
||||
}
|
||||
|
||||
public final boolean isOneWay() {
|
||||
return this==ONE_WAY;
|
||||
}
|
||||
}
|
||||
164
jdkSrc/jdk8/com/sun/xml/internal/ws/api/model/Parameter.java
Normal file
164
jdkSrc/jdk8/com/sun/xml/internal/ws/api/model/Parameter.java
Normal file
@@ -0,0 +1,164 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model;
|
||||
|
||||
import com.sun.xml.internal.bind.api.Bridge;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import javax.xml.ws.Holder;
|
||||
import javax.jws.WebParam;
|
||||
import javax.jws.WebParam.Mode;
|
||||
|
||||
/**
|
||||
* Runtime Parameter that abstracts the annotated java parameter
|
||||
* <p/>
|
||||
* <p/>
|
||||
* A parameter may be bound to a header, a body, or an attachment.
|
||||
* Note that when it's bound to a body, it's bound to a body,
|
||||
* it binds to the whole payload.
|
||||
* <p/>
|
||||
* <p/>
|
||||
* Sometimes multiple Java parameters are packed into the payload,
|
||||
* in which case the subclass {@link com.sun.xml.internal.ws.model.WrapperParameter} is used.
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public interface Parameter {
|
||||
/**
|
||||
* Gets the root {@link SEIModel} that owns this model.
|
||||
*/
|
||||
SEIModel getOwner();
|
||||
|
||||
/**
|
||||
* Gets the parent {@link JavaMethod} to which this parameter belongs.
|
||||
*/
|
||||
JavaMethod getParent();
|
||||
|
||||
/**
|
||||
* @return Returns the {@link QName} of the payload/infoset of a SOAP body or header.
|
||||
*/
|
||||
QName getName();
|
||||
|
||||
/**
|
||||
* Gives the {@link Bridge} associated with this Parameter
|
||||
* @deprecated
|
||||
*/
|
||||
Bridge getBridge();
|
||||
|
||||
/**
|
||||
* @return Returns the mode, such as IN, OUT or INOUT.
|
||||
*/
|
||||
Mode getMode();
|
||||
|
||||
/**
|
||||
* Position of a parameter in the method signature. It would be -1 if the parameter is a return.
|
||||
*
|
||||
* @return Returns the index.
|
||||
*/
|
||||
int getIndex();
|
||||
|
||||
/**
|
||||
* @return true if <tt>this instanceof {@link com.sun.xml.internal.ws.model.WrapperParameter}</tt>.
|
||||
*/
|
||||
boolean isWrapperStyle();
|
||||
|
||||
/**
|
||||
* Returns true if this parameter is bound to the return value from the {@link JavaMethod}.
|
||||
*
|
||||
* <p>
|
||||
* Just the convenience method for <tt>getIndex()==-1</tt>
|
||||
*/
|
||||
boolean isReturnValue();
|
||||
|
||||
/**
|
||||
* Returns the binding associated with the parameter. For IN parameter the binding will be
|
||||
* same as {@link #getInBinding()}, for OUT parameter the binding will be same as
|
||||
* {@link #getOutBinding()} and for INOUT parameter the binding will be same as calling
|
||||
* {@link #getInBinding()}
|
||||
*
|
||||
* @return the Binding for this Parameter. Returns {@link ParameterBinding#BODY} by default.
|
||||
*/
|
||||
ParameterBinding getBinding();
|
||||
|
||||
/**
|
||||
* Returns the {@link ParameterBinding} associated with the IN mode
|
||||
*
|
||||
* @return the binding
|
||||
*/
|
||||
ParameterBinding getInBinding();
|
||||
|
||||
/**
|
||||
* Returns the {@link ParameterBinding} associated with the OUT mode
|
||||
*
|
||||
* @return the binding
|
||||
*/
|
||||
ParameterBinding getOutBinding();
|
||||
|
||||
/**
|
||||
* @return true if the {@link Mode} associated with the parameter is {@link Mode#IN} and false otherwise.
|
||||
*/
|
||||
boolean isIN();
|
||||
|
||||
/**
|
||||
* @return true if the {@link Mode} associated with the parameter is {@link Mode#OUT} and false otherwise.
|
||||
*/
|
||||
boolean isOUT();
|
||||
|
||||
/**
|
||||
* @return true if the {@link Mode} associated with the parameter is {@link Mode#INOUT} and false otherwise.
|
||||
*/
|
||||
boolean isINOUT();
|
||||
|
||||
/**
|
||||
* If true, this parameter maps to the return value of a method invocation.
|
||||
*
|
||||
* <p>
|
||||
* {@link JavaMethod#getResponseParameters()} is guaranteed to have
|
||||
* at most one such {@link Parameter}. Note that there coule be none,
|
||||
* in which case the method returns <tt>void</tt>.
|
||||
*
|
||||
* <p>
|
||||
* Other response parameters are bound to {@link Holder}.
|
||||
*/
|
||||
boolean isResponse();
|
||||
|
||||
/**
|
||||
* Gets the holder value if applicable. To be called for inbound client side
|
||||
* message.
|
||||
*
|
||||
* @param obj
|
||||
* @return the holder value if applicable.
|
||||
*/
|
||||
Object getHolderValue(Object obj);
|
||||
|
||||
/**
|
||||
* Gives the wsdl:part@name value
|
||||
*
|
||||
* @return Value of {@link WebParam#partName()} annotation if present,
|
||||
* otherwise its the localname of the infoset associated with the parameter
|
||||
*/
|
||||
String getPartName();
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model;
|
||||
|
||||
/**
|
||||
* Denotes the binding of a parameter.
|
||||
*
|
||||
* <p>
|
||||
* This is somewhat like an enumeration (but it is <b>NOT</b> an enumeration.)
|
||||
*
|
||||
* <p>
|
||||
* The possible values are
|
||||
* BODY, HEADER, UNBOUND, and ATTACHMENT. BODY, HEADER, and UNBOUND
|
||||
* has a singleton semantics, but there are multiple ATTACHMENT instances
|
||||
* as it carries additional MIME type parameter.
|
||||
*
|
||||
* <p>
|
||||
* So don't use '==' for testing the equality.
|
||||
*/
|
||||
public final class ParameterBinding {
|
||||
/**
|
||||
* Singleton instance that represents 'BODY'
|
||||
*/
|
||||
public static final ParameterBinding BODY = new ParameterBinding(Kind.BODY,null);
|
||||
/**
|
||||
* Singleton instance that represents 'HEADER'
|
||||
*/
|
||||
public static final ParameterBinding HEADER = new ParameterBinding(Kind.HEADER,null);
|
||||
/**
|
||||
* Singleton instance that represents 'UNBOUND',
|
||||
* meaning the parameter doesn't have a representation in a SOAP message.
|
||||
*/
|
||||
public static final ParameterBinding UNBOUND = new ParameterBinding(Kind.UNBOUND,null);
|
||||
/**
|
||||
* Creates an instance that represents the attachment
|
||||
* with a given MIME type.
|
||||
*
|
||||
* <p>
|
||||
* TODO: shall we consider givint the singleton semantics by using
|
||||
* a cache? It's more elegant to do so, but
|
||||
* no where in JAX-WS RI two {@link ParameterBinding}s are compared today,
|
||||
*/
|
||||
public static ParameterBinding createAttachment(String mimeType) {
|
||||
return new ParameterBinding(Kind.ATTACHMENT,mimeType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents 4 kinds of binding.
|
||||
*/
|
||||
public static enum Kind {
|
||||
BODY, HEADER, UNBOUND, ATTACHMENT;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Represents the kind of {@link ParameterBinding}.
|
||||
* Always non-null.
|
||||
*/
|
||||
public final Kind kind;
|
||||
|
||||
/**
|
||||
* Only used with attachment binding.
|
||||
*/
|
||||
private String mimeType;
|
||||
|
||||
private ParameterBinding(Kind kind,String mimeType) {
|
||||
this.kind = kind;
|
||||
this.mimeType = mimeType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String toString() {
|
||||
return kind.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the MIME type associated with this binding.
|
||||
*
|
||||
* @throws IllegalStateException
|
||||
* if this binding doesn't represent an attachment.
|
||||
* IOW, if {@link #isAttachment()} returns false.
|
||||
* @return
|
||||
* Can be null, if the MIME type is not known.
|
||||
*/
|
||||
public String getMimeType() {
|
||||
if(!isAttachment())
|
||||
throw new IllegalStateException();
|
||||
return mimeType;
|
||||
}
|
||||
|
||||
public boolean isBody(){
|
||||
return this==BODY;
|
||||
}
|
||||
|
||||
public boolean isHeader(){
|
||||
return this==HEADER;
|
||||
}
|
||||
|
||||
public boolean isUnbound(){
|
||||
return this==UNBOUND;
|
||||
}
|
||||
|
||||
public boolean isAttachment(){
|
||||
return kind==Kind.ATTACHMENT;
|
||||
}
|
||||
}
|
||||
180
jdkSrc/jdk8/com/sun/xml/internal/ws/api/model/SEIModel.java
Normal file
180
jdkSrc/jdk8/com/sun/xml/internal/ws/api/model/SEIModel.java
Normal file
@@ -0,0 +1,180 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.xml.internal.bind.api.Bridge;
|
||||
import com.sun.xml.internal.bind.api.JAXBRIContext;
|
||||
import com.sun.xml.internal.bind.api.TypeReference;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
|
||||
import com.sun.xml.internal.ws.util.Pool;
|
||||
|
||||
import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.namespace.QName;
|
||||
import javax.xml.ws.Dispatch;
|
||||
import javax.xml.ws.Provider;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* Represents abstraction of SEI.
|
||||
*
|
||||
* <p>
|
||||
* This interface would be used to access which Java concepts correspond to
|
||||
* which WSDL concepts, such as which <code>wsdl:port</code> corresponds to
|
||||
* a SEI, or which <code>wsdl:operation</code> corresponds to {@link JavaMethod}.
|
||||
*
|
||||
* <P>
|
||||
* It also retains information about the databinding done for a SEI;
|
||||
* such as {@link JAXBRIContext} and {@link Bridge}.
|
||||
*
|
||||
* <p>
|
||||
* This model is constructed only when there is a Java SEI. Therefore it's
|
||||
* not available with {@link Dispatch} or {@link Provider}. Technologies that
|
||||
* need to work regardless of such surface API difference shall not be using
|
||||
* this model.
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public interface SEIModel {
|
||||
Pool.Marshaller getMarshallerPool();
|
||||
|
||||
/**
|
||||
* JAXBContext that will be used to marshall/unmarshall the java classes found in the SEI.
|
||||
*
|
||||
* @return the <code>{@link JAXBRIContext}</code>
|
||||
* @deprecated Why do you need this?
|
||||
*/
|
||||
JAXBContext getJAXBContext();
|
||||
|
||||
/**
|
||||
* Get the Bridge associated with the {@link TypeReference}
|
||||
*
|
||||
* @param type
|
||||
* @return the <code>{@link Bridge}</code> for the <code>type</code>
|
||||
*/
|
||||
// Bridge getBridge(TypeReference type);
|
||||
|
||||
/**
|
||||
* Its a known fault if the exception thrown by {@link Method} is annotated with the
|
||||
* {@link javax.xml.ws.WebFault#name()} thas equal to the name passed as parameter.
|
||||
*
|
||||
* @param name is the qualified name of fault detail element as specified by wsdl:fault@element value.
|
||||
* @param method is the Java {@link Method}
|
||||
* @return true if <code>name</code> is the name
|
||||
* of a known fault name for the <code>method</code>
|
||||
*/
|
||||
// boolean isKnownFault(QName name, Method method);
|
||||
|
||||
/**
|
||||
* Checks if the {@link JavaMethod} for the {@link Method} knowns the exception class.
|
||||
*
|
||||
* @param m {@link Method} to pickup the right {@link JavaMethod} model
|
||||
* @param ex exception class
|
||||
* @return true if <code>ex</code> is a Checked Exception
|
||||
* for <code>m</code>
|
||||
*/
|
||||
// boolean isCheckedException(Method m, Class ex);
|
||||
|
||||
/**
|
||||
* This method will be useful to get the {@link JavaMethod} corrrespondiong to
|
||||
* a {@link Method} - such as on the client side.
|
||||
*
|
||||
* @param method for which {@link JavaMethod} is asked for
|
||||
* @return the {@link JavaMethod} representing the <code>method</code>
|
||||
*/
|
||||
JavaMethod getJavaMethod(Method method);
|
||||
|
||||
/**
|
||||
* Gives a {@link JavaMethod} for a given {@link QName}. The {@link QName} will
|
||||
* be equivalent to the SOAP Body or Header block or can simply be the name of an
|
||||
* infoset that corresponds to the payload.
|
||||
* @param name
|
||||
* @return the <code>JavaMethod</code> associated with the
|
||||
* operation named name
|
||||
*/
|
||||
public JavaMethod getJavaMethod(QName name);
|
||||
|
||||
/**
|
||||
* Gives the JavaMethod associated with the wsdl operation
|
||||
* @param operationName QName of the wsdl operation
|
||||
* @return
|
||||
*/
|
||||
public JavaMethod getJavaMethodForWsdlOperation(QName operationName);
|
||||
|
||||
|
||||
/**
|
||||
* Gives all the {@link JavaMethod} for a wsdl:port for which this {@link SEIModel} is
|
||||
* created.
|
||||
*
|
||||
* @return a {@link Collection} of {@link JavaMethod}
|
||||
* associated with the {@link SEIModel}
|
||||
*/
|
||||
Collection<? extends JavaMethod> getJavaMethods();
|
||||
|
||||
/**
|
||||
* Location of the WSDL that defines the port associated with the {@link SEIModel}
|
||||
*
|
||||
* @return wsdl location uri - always non-null
|
||||
*/
|
||||
@NotNull String getWSDLLocation();
|
||||
|
||||
/**
|
||||
* wsdl:service qualified name for the port associated with the {@link SEIModel}
|
||||
*
|
||||
* @return wsdl:service@name value - always non-null
|
||||
*/
|
||||
@NotNull QName getServiceQName();
|
||||
|
||||
/**
|
||||
* Gets the {@link WSDLPort} that represents the port that this SEI binds to.
|
||||
*/
|
||||
@NotNull WSDLPort getPort();
|
||||
|
||||
/**
|
||||
* Value of the wsdl:port name associated with the {@link SEIModel}
|
||||
*
|
||||
* @return wsdl:service/wsdl:port@name value, always non-null
|
||||
*/
|
||||
@NotNull QName getPortName();
|
||||
|
||||
/**
|
||||
* Value of wsdl:portType bound to the port associated with the {@link SEIModel}
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@NotNull QName getPortTypeName();
|
||||
|
||||
/**
|
||||
* Gives the wsdl:binding@name value
|
||||
*/
|
||||
@NotNull QName getBoundPortTypeName();
|
||||
|
||||
/**
|
||||
* Namespace of the wsd;:port associated with the {@link SEIModel}
|
||||
*/
|
||||
@NotNull String getTargetNamespace();
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
|
||||
|
||||
/**
|
||||
* WSDLOperationMapping represents the mapping between a WSDL operation and a
|
||||
* JavaMethod. This is intended to be the output of resolving a Packet to the
|
||||
* targeting WSDL operation.
|
||||
*
|
||||
* @author shih-chang.chen@oracle.com
|
||||
*/
|
||||
public interface WSDLOperationMapping {
|
||||
|
||||
WSDLBoundOperation getWSDLBoundOperation();
|
||||
|
||||
JavaMethod getJavaMethod();
|
||||
|
||||
/**
|
||||
* WSDL1.1 allows operation overloading on the operation name; the operation name should
|
||||
* NOT be used as identifier of the operation.
|
||||
*/
|
||||
QName getOperationName();
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.soap;
|
||||
|
||||
import com.sun.xml.internal.ws.api.SOAPVersion;
|
||||
import com.sun.xml.internal.ws.api.model.JavaMethod;
|
||||
|
||||
import javax.jws.soap.SOAPBinding.Style;
|
||||
import javax.jws.soap.SOAPBinding.Use;
|
||||
import javax.jws.WebMethod;
|
||||
|
||||
/**
|
||||
* Models soap:binding in a WSDL document or a {@link javax.jws.soap.SOAPBinding} annotation. This
|
||||
* can be the return of {@link JavaMethod#getBinding()}.
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
abstract public class SOAPBinding {
|
||||
protected Use use = Use.LITERAL;
|
||||
protected Style style = Style.DOCUMENT;
|
||||
protected SOAPVersion soapVersion = SOAPVersion.SOAP_11;
|
||||
protected String soapAction = "";
|
||||
|
||||
/**
|
||||
* Get {@link Use} such as <code>literal</code> or <code>encoded</code>.
|
||||
*/
|
||||
public Use getUse() {
|
||||
return use;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get {@link Style} - such as <code>document</code> or <code>rpc</code>.
|
||||
*/
|
||||
public Style getStyle() {
|
||||
return style;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the {@link SOAPVersion}
|
||||
*/
|
||||
public SOAPVersion getSOAPVersion() {
|
||||
return soapVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if its document/literal
|
||||
*/
|
||||
public boolean isDocLit() {
|
||||
return style == Style.DOCUMENT && use == Use.LITERAL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this is a rpc/literal binding
|
||||
*/
|
||||
public boolean isRpcLit() {
|
||||
return style == Style.RPC && use == Use.LITERAL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Value of <code>wsdl:binding/wsdl:operation/soap:operation@soapAction</code> attribute or
|
||||
* {@link WebMethod#action()} annotation.
|
||||
* <pre>
|
||||
* For example:
|
||||
* <wsdl:binding name="HelloBinding" type="tns:Hello">
|
||||
* <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
* <wsdl:operation name="echoData">
|
||||
* <soap12:operation soapAction=""/>
|
||||
* ...
|
||||
* </pre>
|
||||
* It's always non-null. soap message serializer needs to generated SOAPAction HTTP header with
|
||||
* the return of this method enclosed in quotes("").
|
||||
*
|
||||
* @see com.sun.xml.internal.ws.api.message.Packet#soapAction
|
||||
*/
|
||||
public String getSOAPAction() {
|
||||
return soapAction;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* Abstracts wsdl:binding/wsdl:operation/wsdl:fault
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public interface WSDLBoundFault extends WSDLObject, WSDLExtensible {
|
||||
|
||||
/**
|
||||
* Gives the wsdl:binding/wsdl:operation/wsdl:fault@name value
|
||||
*/
|
||||
public
|
||||
@NotNull
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Gives the qualified name associated with the fault. the namespace URI of the bounded fault
|
||||
* will be the one derived from wsdl:portType namespace.
|
||||
*
|
||||
* Maybe null if this method is called before the model is completely build (frozen), if a binding fault has no
|
||||
* corresponding fault in abstractwsdl:portType/wsdl:operation then the namespace URI of the fault will be that of
|
||||
* the WSDBoundPortType.
|
||||
*/
|
||||
public @Nullable QName getQName();
|
||||
|
||||
/**
|
||||
* Gives the associated abstract fault from
|
||||
* wsdl:portType/wsdl:operation/wsdl:fault. It is only available after
|
||||
* the WSDL parsing is complete and the entire model is frozen.
|
||||
* <p/>
|
||||
* Maybe null if a binding fault has no corresponding fault in abstract
|
||||
* wsdl:portType/wsdl:operation
|
||||
*/
|
||||
public
|
||||
@Nullable
|
||||
WSDLFault getFault();
|
||||
|
||||
/**
|
||||
* Gives the owner {@link WSDLBoundOperation}
|
||||
*/
|
||||
@NotNull WSDLBoundOperation getBoundOperation();
|
||||
}
|
||||
@@ -0,0 +1,195 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
import com.sun.xml.internal.ws.api.model.ParameterBinding;
|
||||
|
||||
import javax.jws.WebParam.Mode;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Abstracts wsdl:binding/wsdl:operation. It can be used to determine the parts and their binding.
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public interface WSDLBoundOperation extends WSDLObject, WSDLExtensible {
|
||||
/**
|
||||
* Short-cut for {@code getOperation().getName()}
|
||||
*/
|
||||
@NotNull QName getName();
|
||||
|
||||
/**
|
||||
* Gives soapbinding:operation@soapAction value. soapbinding:operation@soapAction is optional attribute.
|
||||
* If not present an empty String is returned as per BP 1.1 R2745.
|
||||
*/
|
||||
@NotNull String getSOAPAction();
|
||||
|
||||
/**
|
||||
* Gets the wsdl:portType/wsdl:operation model - {@link WSDLOperation},
|
||||
* associated with this binding operation.
|
||||
*
|
||||
* @return always same {@link WSDLOperation}
|
||||
*/
|
||||
@NotNull WSDLOperation getOperation();
|
||||
|
||||
/**
|
||||
* Gives the owner {@link WSDLBoundPortType}
|
||||
*/
|
||||
@NotNull WSDLBoundPortType getBoundPortType();
|
||||
|
||||
/**
|
||||
* Gets the soapbinding:binding/operation/wsaw:Anonymous. A default value of OPTIONAL is returned.
|
||||
*
|
||||
* @return Anonymous value of the operation
|
||||
*/
|
||||
ANONYMOUS getAnonymous();
|
||||
|
||||
enum ANONYMOUS { optional, required, prohibited }
|
||||
|
||||
/**
|
||||
* Gets {@link WSDLPart} for the given wsdl:input or wsdl:output part
|
||||
*
|
||||
* @return null if no part is found
|
||||
*/
|
||||
@Nullable WSDLPart getPart(@NotNull String partName, @NotNull Mode mode);
|
||||
|
||||
/**
|
||||
* Gets {@link ParameterBinding} for a given wsdl part in wsdl:input
|
||||
*
|
||||
* @param part Name of wsdl:part, must be non-null
|
||||
* @return null if the part is not found.
|
||||
*/
|
||||
public ParameterBinding getInputBinding(String part);
|
||||
|
||||
/**
|
||||
* Gets {@link ParameterBinding} for a given wsdl part in wsdl:output
|
||||
*
|
||||
* @param part Name of wsdl:part, must be non-null
|
||||
* @return null if the part is not found.
|
||||
*/
|
||||
public ParameterBinding getOutputBinding(String part);
|
||||
|
||||
/**
|
||||
* Gets {@link ParameterBinding} for a given wsdl part in wsdl:fault
|
||||
*
|
||||
* @param part Name of wsdl:part, must be non-null
|
||||
* @return null if the part is not found.
|
||||
*/
|
||||
public ParameterBinding getFaultBinding(String part);
|
||||
|
||||
/**
|
||||
* Gets the MIME type for a given wsdl part in wsdl:input
|
||||
*
|
||||
* @param part Name of wsdl:part, must be non-null
|
||||
* @return null if the part is not found.
|
||||
*/
|
||||
public String getMimeTypeForInputPart(String part);
|
||||
|
||||
/**
|
||||
* Gets the MIME type for a given wsdl part in wsdl:output
|
||||
*
|
||||
* @param part Name of wsdl:part, must be non-null
|
||||
* @return null if the part is not found.
|
||||
*/
|
||||
public String getMimeTypeForOutputPart(String part);
|
||||
|
||||
/**
|
||||
* Gets the MIME type for a given wsdl part in wsdl:fault
|
||||
*
|
||||
* @param part Name of wsdl:part, must be non-null
|
||||
* @return null if the part is not found.
|
||||
*/
|
||||
public String getMimeTypeForFaultPart(String part);
|
||||
|
||||
/**
|
||||
* Gets all inbound {@link WSDLPart} by its {@link WSDLPart#getName() name}.
|
||||
*/
|
||||
@NotNull Map<String,? extends WSDLPart> getInParts();
|
||||
|
||||
/**
|
||||
* Gets all outbound {@link WSDLPart} by its {@link WSDLPart#getName() name}.
|
||||
*/
|
||||
@NotNull Map<String,? extends WSDLPart> getOutParts();
|
||||
|
||||
/**
|
||||
* Gets all the {@link WSDLFault} bound to this operation.
|
||||
*/
|
||||
@NotNull Iterable<? extends WSDLBoundFault> getFaults();
|
||||
|
||||
/**
|
||||
* Map of wsdl:input part name and the binding as {@link ParameterBinding}
|
||||
*
|
||||
* @return empty Map if there is no parts
|
||||
*/
|
||||
public Map<String, ParameterBinding> getInputParts();
|
||||
|
||||
/**
|
||||
* Map of wsdl:output part name and the binding as {@link ParameterBinding}
|
||||
*
|
||||
* @return empty Map if there is no parts
|
||||
*/
|
||||
public Map<String, ParameterBinding> getOutputParts();
|
||||
|
||||
/**
|
||||
* Map of wsdl:fault part name and the binding as {@link ParameterBinding}
|
||||
*
|
||||
* @return empty Map if there is no parts
|
||||
*/
|
||||
public Map<String, ParameterBinding> getFaultParts();
|
||||
|
||||
/**
|
||||
* Gets the payload QName of the request message.
|
||||
*
|
||||
* <p>
|
||||
* It's possible for an operation to define no body part, in which case
|
||||
* this method returns null.
|
||||
*/
|
||||
@Nullable QName getRequestPayloadName();
|
||||
|
||||
/**
|
||||
* Gets the payload QName of the response message.
|
||||
*
|
||||
* <p>
|
||||
* It's possible for an operation to define no body part, in which case
|
||||
* this method returns null.
|
||||
*/
|
||||
@Nullable QName getResponsePayloadName();
|
||||
|
||||
/**
|
||||
* Gets the namespace of request payload.
|
||||
*/
|
||||
String getRequestNamespace();
|
||||
|
||||
/**
|
||||
* Gets the namespace of response payload.
|
||||
*/
|
||||
String getResponseNamespace();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
import com.sun.xml.internal.ws.api.BindingID;
|
||||
import com.sun.xml.internal.ws.api.message.Message;
|
||||
import com.sun.xml.internal.ws.api.model.ParameterBinding;
|
||||
|
||||
import javax.jws.WebParam.Mode;
|
||||
import javax.jws.soap.SOAPBinding;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* {@link WSDLPortType} bound with a specific binding.
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public interface WSDLBoundPortType extends WSDLFeaturedObject, WSDLExtensible {
|
||||
/**
|
||||
* Gets the name of the wsdl:binding@name attribute value as local name and wsdl:definitions@targetNamespace
|
||||
* as the namespace uri.
|
||||
*/
|
||||
QName getName();
|
||||
|
||||
/**
|
||||
* Gets the {@link WSDLModel} that owns this port type.
|
||||
*/
|
||||
@NotNull WSDLModel getOwner();
|
||||
|
||||
/**
|
||||
* Gets the {@link WSDLBoundOperation} for a given operation name
|
||||
*
|
||||
* @param operationName non-null operationName
|
||||
* @return null if a {@link WSDLBoundOperation} is not found
|
||||
*/
|
||||
public WSDLBoundOperation get(QName operationName);
|
||||
|
||||
/**
|
||||
* Gets the wsdl:binding@type value, same as {@link WSDLPortType#getName()}
|
||||
*/
|
||||
QName getPortTypeName();
|
||||
|
||||
/**
|
||||
* Gets the {@link WSDLPortType} associated with the wsdl:binding
|
||||
*/
|
||||
WSDLPortType getPortType();
|
||||
|
||||
/**
|
||||
* Gets the {@link WSDLBoundOperation}s
|
||||
*/
|
||||
Iterable<? extends WSDLBoundOperation> getBindingOperations();
|
||||
|
||||
/**
|
||||
* Is this a document style or RPC style?
|
||||
*
|
||||
* Since we only support literal and not encoding, this means
|
||||
* either doc/lit or rpc/lit.
|
||||
*/
|
||||
@NotNull SOAPBinding.Style getStyle();
|
||||
|
||||
/**
|
||||
* Returns the binding ID.
|
||||
* This would typically determined by the binding extension elements in wsdl:binding.
|
||||
*/
|
||||
BindingID getBindingId();
|
||||
|
||||
/**
|
||||
* Gets the bound operation in this port for a tag name. Here the operation would be the one whose
|
||||
* input part descriptor bound to soap:body is same as the tag name except for rpclit where the tag
|
||||
* name would be {@link WSDLBoundOperation#getName()}.
|
||||
*
|
||||
* <p>
|
||||
* If you have a {@link Message} and trying to figure out which operation it belongs to,
|
||||
* always use {@link Message#getOperation}, as that performs better.
|
||||
*
|
||||
* <p>
|
||||
* For example this can be used in the case when a message receipient can get the
|
||||
* {@link WSDLBoundOperation} from the payload tag name.
|
||||
*
|
||||
* <p>
|
||||
* namespaceUri and the local name both can be null to get the WSDLBoundOperation that has empty body -
|
||||
* there is no payload. According to BP 1.1 in a port there can be at MOST one operation with empty body.
|
||||
* Its an error to have namespace URI non-null but local name as null.
|
||||
*
|
||||
* @param namespaceUri namespace of the payload element.
|
||||
* @param localName local name of the payload
|
||||
* @throws NullPointerException if localName is null and namespaceUri is not.
|
||||
* @return
|
||||
* null if no operation with the given tag name is found.
|
||||
*/
|
||||
@Nullable WSDLBoundOperation getOperation(String namespaceUri, String localName);
|
||||
|
||||
/**
|
||||
* Gets the {@link ParameterBinding} for a given operation, part name and the direction - IN/OUT
|
||||
*
|
||||
* @param operation wsdl:operation@name value. Must be non-null.
|
||||
* @param part wsdl:part@name such as value of soap:header@part. Must be non-null.
|
||||
* @param mode {@link Mode#IN} or {@link Mode#OUT}. Must be non-null.
|
||||
* @return null if the binding could not be resolved for the part.
|
||||
*/
|
||||
ParameterBinding getBinding(QName operation, String part, Mode mode);
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
/**
|
||||
* Enumeration that tells a wsdl:part that can be defined either using a type
|
||||
* attribute or an element attribute.
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public enum WSDLDescriptorKind {
|
||||
/**
|
||||
* wsdl:part is defined using element attribute.
|
||||
*
|
||||
* <pre>
|
||||
* for exmaple,
|
||||
* <wsdl:part name="foo" element="ns1:FooElement">
|
||||
* </pre>
|
||||
*/
|
||||
ELEMENT(0),
|
||||
|
||||
/**
|
||||
* wsdl:part is defined using type attribute.
|
||||
*
|
||||
* <pre>
|
||||
* for exmaple,
|
||||
* <wsdl:part name="foo" element="ns1:FooType">
|
||||
* </pre>
|
||||
*/
|
||||
TYPE(1);
|
||||
|
||||
WSDLDescriptorKind(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
private final int value;
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import org.xml.sax.Locator;
|
||||
|
||||
/**
|
||||
* Interface that represents WSDL concepts that
|
||||
* can have extensions.
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
* @author Kohsuke Kawaguchi
|
||||
*/
|
||||
public interface WSDLExtensible extends WSDLObject {
|
||||
/**
|
||||
* Gets all the {@link WSDLExtension}s
|
||||
* added through {@link #addExtension(WSDLExtension)}.
|
||||
*
|
||||
* @return
|
||||
* never null.
|
||||
*/
|
||||
Iterable<WSDLExtension> getExtensions();
|
||||
|
||||
/**
|
||||
* Gets all the extensions that is assignable to the given type.
|
||||
*
|
||||
* <p>
|
||||
* This allows clients to find specific extensions in a type-safe
|
||||
* and convenient way.
|
||||
*
|
||||
* @param type
|
||||
* The type of the extension to obtain. Must not be null.
|
||||
*
|
||||
* @return
|
||||
* Can be an empty fromjava.collection but never null.
|
||||
*/
|
||||
<T extends WSDLExtension> Iterable<T> getExtensions(Class<T> type);
|
||||
|
||||
/**
|
||||
* Gets the extension that is assignable to the given type.
|
||||
*
|
||||
* <p>
|
||||
* This is just a convenient version that does
|
||||
*
|
||||
* <pre>
|
||||
* Iterator itr = getExtensions(type);
|
||||
* if(itr.hasNext()) return itr.next();
|
||||
* else return null;
|
||||
* </pre>
|
||||
*
|
||||
* @return
|
||||
* null if the extension was not found.
|
||||
*/
|
||||
<T extends WSDLExtension> T getExtension(Class<T> type);
|
||||
|
||||
/**
|
||||
* Adds a new {@link WSDLExtension}
|
||||
* to this object.
|
||||
*
|
||||
* @param extension
|
||||
* must not be null.
|
||||
*/
|
||||
void addExtension(WSDLExtension extension);
|
||||
|
||||
/**
|
||||
* True if all required WSDL extensions on Port and Binding are understood
|
||||
* @return true if all wsdl required extensions on Port and Binding are understood
|
||||
*/
|
||||
public boolean areRequiredExtensionsUnderstood();
|
||||
|
||||
/**
|
||||
* Marks extension as not understood
|
||||
* @param extnEl QName of extension
|
||||
* @param locator Locator
|
||||
*/
|
||||
public void addNotUnderstoodExtension(QName extnEl, Locator locator);
|
||||
|
||||
/**
|
||||
* Lists extensions marked as not understood
|
||||
* @return List of not understood extensions
|
||||
*/
|
||||
public List<? extends WSDLExtension> getNotUnderstoodExtensions();
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* Represents a WSDL extensibility element or attribute.
|
||||
*
|
||||
* <p>
|
||||
* This interface can be implemented by the programs that build
|
||||
* on top of the JAX-WS RI, to hook additional information into
|
||||
* {@link WSDLModel}.
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public interface WSDLExtension {
|
||||
/**
|
||||
* Gets the qualified name of the WSDL extensibility element or attribute.
|
||||
*
|
||||
* @return
|
||||
* must not be null.
|
||||
*/
|
||||
public QName getName();
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* Abstracts wsdl:portType/wsdl:operation/wsdl:fault
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public interface WSDLFault extends WSDLObject, WSDLExtensible {
|
||||
/**
|
||||
* Gives wsdl:fault@name value
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Gives the WSDLMessage corresponding to wsdl:fault@message
|
||||
* This method should not be called before the entire WSDLModel is built. Basically after the WSDLModel is built
|
||||
* all the references are resolve in a post processing phase. IOW, the WSDL extensions should
|
||||
* not call this method.
|
||||
*
|
||||
* @return Always returns null when called from inside WSDL extensions.
|
||||
*/
|
||||
WSDLMessage getMessage();
|
||||
|
||||
/**
|
||||
* Gives the owning {@link WSDLOperation}
|
||||
*/
|
||||
@NotNull
|
||||
WSDLOperation getOperation();
|
||||
|
||||
/**
|
||||
* Gives qualified name of the wsdl:fault 'name' attribute value.
|
||||
* <p/>
|
||||
*
|
||||
* The namespace uri is determined from the enclosing wsdl:operation.
|
||||
*/
|
||||
@NotNull
|
||||
QName getQName();
|
||||
|
||||
/**
|
||||
* Gives the Action Message Addressing Property value for
|
||||
* {@link WSDLFault} message.
|
||||
* <p/>
|
||||
* This method provides the correct value irrespective of
|
||||
* whether the Action is explicitly specified in the WSDL or
|
||||
* implicitly derived using the rules defined in WS-Addressing.
|
||||
*
|
||||
* @return Action
|
||||
*/
|
||||
String getAction();
|
||||
|
||||
/**
|
||||
* True if this is the default action
|
||||
* @return
|
||||
*/
|
||||
public boolean isDefaultAction();
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
import com.sun.xml.internal.ws.api.WSFeatureList;
|
||||
import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension;
|
||||
|
||||
import javax.xml.ws.Dispatch;
|
||||
import javax.xml.ws.WebServiceFeature;
|
||||
|
||||
/**
|
||||
* {@link WSDLObject} that can have features associated with it.
|
||||
*
|
||||
* <p>
|
||||
* {@link WSDLParserExtension}s can add features to this object,
|
||||
* which will then be incorporated when {@link Dispatch}s and
|
||||
* proxies are created for the port.
|
||||
*
|
||||
* @author Kohsuke Kawaguchi
|
||||
*/
|
||||
public interface WSDLFeaturedObject extends WSDLObject {
|
||||
|
||||
@Nullable
|
||||
<F extends WebServiceFeature> F getFeature(@NotNull Class<F> featureType);
|
||||
|
||||
/**
|
||||
* Gets the feature list associated with this object.
|
||||
*/
|
||||
@NotNull WSFeatureList getFeatures();
|
||||
|
||||
/**
|
||||
* Enables a {@link WebServiceFeature} based upon policy assertions on this port.
|
||||
* This method would be called during WSDL parsing by WS-Policy code.
|
||||
*/
|
||||
void addFeature(@NotNull WebServiceFeature feature);
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* Abstraction of wsdl:portType/wsdl:operation/wsdl:input
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public interface WSDLInput extends WSDLObject, WSDLExtensible {
|
||||
/**
|
||||
* Gives the wsdl:portType/wsdl:operation/wsdl:input@name
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Gives the WSDLMessage corresponding to wsdl:input@message
|
||||
* <p/>
|
||||
* This method should not be called before the entire WSDLModel is built. Basically after the WSDLModel is built
|
||||
* all the references are resolve in a post processing phase. IOW, the WSDL extensions should
|
||||
* not call this method.
|
||||
*
|
||||
* @return Always returns null when called from inside WSDL extensions.
|
||||
*/
|
||||
WSDLMessage getMessage();
|
||||
|
||||
/**
|
||||
* Gives the Action Message Addressing Property value for
|
||||
* {@link WSDLInput} message.
|
||||
* <p/>
|
||||
* This method provides the correct value irrespective of
|
||||
* whether the Action is explicitly specified in the WSDL or
|
||||
* implicitly derived using the rules defined in WS-Addressing.
|
||||
*
|
||||
* @return Action
|
||||
*/
|
||||
String getAction();
|
||||
|
||||
/**
|
||||
* Gives the owning {@link WSDLOperation}
|
||||
*/
|
||||
@NotNull
|
||||
WSDLOperation getOperation();
|
||||
|
||||
/**
|
||||
* Gives qualified name of the wsdl:input 'name' attribute value. If there is no name, then it computes the name from:
|
||||
*
|
||||
* If the wsdl:operation is oneway:
|
||||
*
|
||||
* wsdl:operation@name value, which is local name of {@link WSDLOperation#getName()}
|
||||
* <p/>
|
||||
* otherwise
|
||||
*
|
||||
* wsdl:operation@name+"Request", which is local name of {@link WSDLOperation#getName()} + "Request"
|
||||
* <p/>
|
||||
*
|
||||
* The namespace uri is determined from the enclosing wsdl:operation.
|
||||
*/
|
||||
@NotNull
|
||||
QName getQName();
|
||||
|
||||
/**
|
||||
* Checks if the Action value is implicitly derived using the rules defined in WS-Addressing.
|
||||
*
|
||||
* @return true if the Action value is implicitly derived using the rules defined in WS-Addressing.
|
||||
*/
|
||||
boolean isDefaultAction();
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* Abstraction of wsdl:message.
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public interface WSDLMessage extends WSDLObject, WSDLExtensible {
|
||||
/**
|
||||
* Gives wsdl:message@name value.
|
||||
*/
|
||||
QName getName();
|
||||
|
||||
/**
|
||||
* Gets all the parts.
|
||||
*/
|
||||
Iterable<? extends WSDLPart> parts();
|
||||
}
|
||||
@@ -0,0 +1,196 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.xml.internal.ws.api.server.Container;
|
||||
import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension;
|
||||
import com.sun.xml.internal.ws.api.wsdl.parser.XMLEntityResolver;
|
||||
import com.sun.xml.internal.ws.api.policy.PolicyResolver;
|
||||
import com.sun.xml.internal.ws.api.policy.PolicyResolverFactory;
|
||||
import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser;
|
||||
import com.sun.xml.internal.ws.policy.PolicyMap;
|
||||
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import javax.xml.stream.XMLStreamException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Provides abstraction of wsdl:definitions.
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public interface WSDLModel extends WSDLExtensible {
|
||||
/**
|
||||
* Gets {@link WSDLPortType} that models <code>wsdl:portType</code>
|
||||
*
|
||||
* @param name non-null quaified name of wsdl:message, where the localName is the value of <code>wsdl:portType@name</code> and
|
||||
* the namespaceURI is the value of wsdl:definitions@targetNamespace
|
||||
* @return A {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLPortType} or null if no wsdl:portType found.
|
||||
*/
|
||||
WSDLPortType getPortType(@NotNull QName name);
|
||||
|
||||
/**
|
||||
* Gets {@link WSDLBoundPortType} that models <code>wsdl:binding</code>
|
||||
*
|
||||
* @param name non-null quaified name of wsdl:binding, where the localName is the value of <code>wsdl:binding@name</code> and
|
||||
* the namespaceURI is the value of wsdl:definitions@targetNamespace
|
||||
* @return A {@link WSDLBoundPortType} or null if no wsdl:binding found
|
||||
*/
|
||||
WSDLBoundPortType getBinding(@NotNull QName name);
|
||||
|
||||
/**
|
||||
* Give a {@link WSDLBoundPortType} for the given wsdl:service and wsdl:port names.
|
||||
*
|
||||
* @param serviceName service QName
|
||||
* @param portName port QName
|
||||
* @return A {@link WSDLBoundPortType}. null if the Binding for the given wsd:service and wsdl:port name are not
|
||||
* found.
|
||||
*/
|
||||
WSDLBoundPortType getBinding(@NotNull QName serviceName, @NotNull QName portName);
|
||||
|
||||
/**
|
||||
* Gets {@link WSDLService} that models <code>wsdl:service</code>
|
||||
*
|
||||
* @param name non-null quaified name of wsdl:service, where the localName is the value of <code>wsdl:service@name</code> and
|
||||
* the namespaceURI is the value of wsdl:definitions@targetNamespace
|
||||
* @return A {@link WSDLService} or null if no wsdl:service found
|
||||
*/
|
||||
WSDLService getService(@NotNull QName name);
|
||||
|
||||
/**
|
||||
* Gives a {@link Map} of wsdl:portType {@link QName} and {@link WSDLPortType}
|
||||
*
|
||||
* @return an empty Map if the wsdl document has no wsdl:portType
|
||||
*/
|
||||
@NotNull Map<QName, ? extends WSDLPortType> getPortTypes();
|
||||
|
||||
/**
|
||||
* Gives a {@link Map} of wsdl:binding {@link QName} and {@link WSDLBoundPortType}
|
||||
*
|
||||
* @return an empty Map if the wsdl document has no wsdl:binding
|
||||
*/
|
||||
@NotNull Map<QName, ? extends WSDLBoundPortType> getBindings();
|
||||
|
||||
/**
|
||||
* Gives a {@link Map} of wsdl:service qualified name and {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLService}
|
||||
*
|
||||
* @return an empty Map if the wsdl document has no wsdl:service
|
||||
*/
|
||||
@NotNull Map<QName, ? extends WSDLService> getServices();
|
||||
|
||||
/**
|
||||
* Returns the first service QName from insertion order
|
||||
*/
|
||||
public QName getFirstServiceName();
|
||||
|
||||
/**
|
||||
* Returns the message with the given QName
|
||||
* @param name Message name
|
||||
* @return Message
|
||||
*/
|
||||
public WSDLMessage getMessage(QName name);
|
||||
|
||||
/**
|
||||
* Gives a {@link Map} of wsdl:message qualified name and {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLMesage}
|
||||
*
|
||||
* @return an empty Map if the wsdl document has no wsdl:message
|
||||
*/
|
||||
@NotNull Map<QName, ? extends WSDLMessage> getMessages();
|
||||
|
||||
/**
|
||||
* Gives the PolicyMap associated with the WSDLModel
|
||||
*
|
||||
* @return PolicyMap
|
||||
*
|
||||
* @deprecated
|
||||
* Do not use this method as the PolicyMap API is not final yet and might change in next few months.
|
||||
*/
|
||||
public PolicyMap getPolicyMap();
|
||||
|
||||
/**
|
||||
* Main purpose of this class is to parsing of a WSDL and get the {@link WSDLModel} from it.
|
||||
*/
|
||||
public class WSDLParser{
|
||||
/**
|
||||
* Parses WSDL from the given wsdlLoc and gives a {@link WSDLModel} built from it.
|
||||
*
|
||||
* @param wsdlEntityParser Works like an entityResolver to resolve WSDLs
|
||||
* @param resolver {@link XMLEntityResolver}, works at XML infoset level
|
||||
* @param isClientSide true - its invoked on the client, false means its invoked on the server
|
||||
* @param extensions var args of {@link com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension}s
|
||||
* @return A {@link WSDLModel} built from the given wsdlLocation}
|
||||
* @throws java.io.IOException
|
||||
* @throws javax.xml.stream.XMLStreamException
|
||||
* @throws org.xml.sax.SAXException
|
||||
*/
|
||||
public static @NotNull WSDLModel parse(XMLEntityResolver.Parser wsdlEntityParser, XMLEntityResolver resolver, boolean isClientSide, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
|
||||
return parse(wsdlEntityParser, resolver, isClientSide, Container.NONE, extensions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses WSDL from the given wsdlLoc and gives a {@link WSDLModel} built from it.
|
||||
*
|
||||
* @param wsdlEntityParser Works like an entityResolver to resolve WSDLs
|
||||
* @param resolver {@link XMLEntityResolver}, works at XML infoset level
|
||||
* @param isClientSide true - its invoked on the client, false means its invoked on the server
|
||||
* @param container - container in which the parser is run
|
||||
* @param extensions var args of {@link com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension}s
|
||||
* @return A {@link WSDLModel} built from the given wsdlLocation}
|
||||
* @throws java.io.IOException
|
||||
* @throws javax.xml.stream.XMLStreamException
|
||||
* @throws org.xml.sax.SAXException
|
||||
*/
|
||||
public static @NotNull WSDLModel parse(XMLEntityResolver.Parser wsdlEntityParser, XMLEntityResolver resolver, boolean isClientSide, @NotNull Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
|
||||
return parse(wsdlEntityParser, resolver, isClientSide, container, PolicyResolverFactory.create(),extensions);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Parses WSDL from the given wsdlLoc and gives a {@link WSDLModel} built from it.
|
||||
*
|
||||
* @param wsdlEntityParser Works like an entityResolver to resolve WSDLs
|
||||
* @param resolver {@link XMLEntityResolver}, works at XML infoset level
|
||||
* @param isClientSide true - its invoked on the client, false means its invoked on the server
|
||||
* @param container - container in which the parser is run
|
||||
* @param policyResolver - PolicyResolver for resolving effective Policy
|
||||
* @param extensions var args of {@link com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension}s
|
||||
* @return A {@link WSDLModel} built from the given wsdlLocation}
|
||||
* @throws java.io.IOException
|
||||
* @throws javax.xml.stream.XMLStreamException
|
||||
* @throws org.xml.sax.SAXException
|
||||
*/
|
||||
public static @NotNull WSDLModel parse(XMLEntityResolver.Parser wsdlEntityParser, XMLEntityResolver resolver, boolean isClientSide, @NotNull Container container, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException {
|
||||
return RuntimeWSDLParser.parse(wsdlEntityParser, resolver, isClientSide, container, policyResolver, extensions);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import org.xml.sax.Locator;
|
||||
|
||||
/**
|
||||
* Marker interface serves as base interface for the wsdl model
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public interface WSDLObject {
|
||||
/**
|
||||
* Gets the source location information in the parsed WSDL.
|
||||
*
|
||||
* This is useful when producing error messages.
|
||||
*/
|
||||
@NotNull
|
||||
Locator getLocation();
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLExtensible;
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* Provides abstraction of wsdl:portType/wsdl:operation.
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public interface WSDLOperation extends WSDLObject, WSDLExtensible {
|
||||
/**
|
||||
* Gets the name of the wsdl:portType/wsdl:operation@name attribute value as local name and wsdl:definitions@targetNamespace
|
||||
* as the namespace uri.
|
||||
*/
|
||||
@NotNull QName getName();
|
||||
|
||||
/**
|
||||
* Gets the wsdl:input of this operation
|
||||
*/
|
||||
@NotNull WSDLInput getInput();
|
||||
|
||||
/**
|
||||
* Gets the wsdl:output of this operation.
|
||||
*
|
||||
* @return
|
||||
* null if this is an one-way operation.
|
||||
*/
|
||||
@Nullable WSDLOutput getOutput();
|
||||
|
||||
/**
|
||||
* Returns true if this operation is an one-way operation.
|
||||
*/
|
||||
boolean isOneWay();
|
||||
|
||||
/**
|
||||
* Gets the {@link WSDLFault} corresponding to wsdl:fault of this operation.
|
||||
*/
|
||||
Iterable<? extends WSDLFault> getFaults();
|
||||
|
||||
/**
|
||||
* Gives {@link WSDLFault} for the given soap fault detail value.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* Given a wsdl fault:
|
||||
*
|
||||
* <wsdl:message nae="faultMessage">
|
||||
* <wsdl:part name="fault" element="<b>ns:myException</b>/>
|
||||
* </wsdl:message>
|
||||
*
|
||||
* <wsdl:portType>
|
||||
* <wsdl:operation ...>
|
||||
* <wsdl:fault name="aFault" message="faultMessage"/>
|
||||
* </wsdl:operation>
|
||||
* <wsdl:portType>
|
||||
*
|
||||
*
|
||||
* For example given a soap 11 soap message:
|
||||
*
|
||||
* <soapenv:Fault>
|
||||
* ...
|
||||
* <soapenv:detail>
|
||||
* <<b>ns:myException</b>>
|
||||
* ...
|
||||
* </ns:myException>
|
||||
* </soapenv:detail>
|
||||
*
|
||||
* QName faultQName = new QName(ns, "myException");
|
||||
* WSDLFault wsdlFault = getFault(faultQName);
|
||||
*
|
||||
* The above call will return a WSDLFault that abstracts wsdl:portType/wsdl:operation/wsdl:fault.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @param faultDetailName tag name of the element inside soaenv:Fault/detail/, must be non-null.
|
||||
* @return returns null if a wsdl fault corresponding to the detail entry name not found.
|
||||
*/
|
||||
@Nullable WSDLFault getFault(QName faultDetailName);
|
||||
|
||||
/**
|
||||
* Gives the enclosing wsdl:portType@name attribute value.
|
||||
*/
|
||||
@NotNull QName getPortTypeName();
|
||||
|
||||
/**
|
||||
* Returns parameter order
|
||||
* @return Parameter order
|
||||
*/
|
||||
public String getParameterOrder();
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* Abstraction of wsdl:portType/wsdl:operation/wsdl:output
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public interface WSDLOutput extends WSDLObject, WSDLExtensible {
|
||||
/**
|
||||
* Gives the wsdl:portType/wsdl:operation/wsdl:output@name
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Gives the WSDLMessage corresponding to wsdl:output@message
|
||||
* <p/>
|
||||
* This method should not be called before the entire WSDLModel is built. Basically after the WSDLModel is built
|
||||
* all the references are resolve in a post processing phase. IOW, the WSDL extensions should
|
||||
* not call this method.
|
||||
*
|
||||
* @return Always returns null when called from inside WSDL extensions.
|
||||
*/
|
||||
WSDLMessage getMessage();
|
||||
|
||||
/**
|
||||
* Gives the Action Message Addressing Property value for
|
||||
* {@link WSDLOutput} message.
|
||||
* <p/>
|
||||
* This method provides the correct value irrespective of
|
||||
* whether the Action is explicitly specified in the WSDL or
|
||||
* implicitly derived using the rules defined in WS-Addressing.
|
||||
*
|
||||
* @return Action
|
||||
*/
|
||||
String getAction();
|
||||
|
||||
/**
|
||||
* Gives the owning {@link WSDLOperation}
|
||||
*/
|
||||
@NotNull
|
||||
WSDLOperation getOperation();
|
||||
|
||||
/**
|
||||
* Gives qualified name of the wsdl:output 'name' attribute value. If there is no name, then it computes the name from:
|
||||
*
|
||||
* wsdl:operation@name+"Response", which is local name of {@link WSDLOperation#getName()} + "Response"
|
||||
* <p/>
|
||||
*
|
||||
* The namespace uri is determined from the enclosing wsdl:operation.
|
||||
*/
|
||||
@NotNull
|
||||
QName getQName();
|
||||
|
||||
/**
|
||||
* Checks if the Action value is implicitly derived using the rules defined in WS-Addressing.
|
||||
*
|
||||
* @return true if the Action value is implicitly derived using the rules defined in WS-Addressing.
|
||||
*/
|
||||
public boolean isDefaultAction();
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
import com.sun.xml.internal.ws.api.model.ParameterBinding;
|
||||
|
||||
/**
|
||||
* Abstracts wsdl:part after applying binding information from wsdl:binding.
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public interface WSDLPart extends WSDLObject {
|
||||
/**
|
||||
* Gets wsdl:part@name attribute value.
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Gets the wsdl:part binding as seen thru wsdl:binding
|
||||
*/
|
||||
ParameterBinding getBinding();
|
||||
|
||||
/**
|
||||
* Index value is as the order in which the wsdl:part appears inside the input or output wsdl:message.
|
||||
* @return n where n >= 0
|
||||
*/
|
||||
int getIndex();
|
||||
|
||||
/**
|
||||
* Gives the XML Schema descriptor referenced using either wsdl:part@element or wsdl:part@type.
|
||||
*/
|
||||
public WSDLPartDescriptor getDescriptor();
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* Abstracts wsdl:part descriptor that is defined using element or type attribute.
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public interface WSDLPartDescriptor extends WSDLObject {
|
||||
/**
|
||||
* Gives Qualified name of the XML Schema element or type
|
||||
*/
|
||||
public QName name();
|
||||
|
||||
/**
|
||||
* Gives whether wsdl:part references a schema type or a global element.
|
||||
*/
|
||||
public WSDLDescriptorKind type();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
import com.sun.xml.internal.ws.api.EndpointAddress;
|
||||
import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* Abstracts wsdl:service/wsdl:port
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public interface WSDLPort extends WSDLFeaturedObject, WSDLExtensible {
|
||||
/**
|
||||
* Gets wsdl:port@name attribute value as local name and wsdl:definitions@targetNamespace
|
||||
* as the namespace uri.
|
||||
*/
|
||||
QName getName();
|
||||
|
||||
/**
|
||||
* Gets {@link WSDLBoundPortType} associated with the {@link WSDLPort}.
|
||||
*/
|
||||
@NotNull
|
||||
WSDLBoundPortType getBinding();
|
||||
|
||||
/**
|
||||
* Gets endpoint address of this port.
|
||||
*
|
||||
* @return
|
||||
* always non-null.
|
||||
*/
|
||||
EndpointAddress getAddress();
|
||||
|
||||
/**
|
||||
* Gets the {@link WSDLService} that owns this port.
|
||||
*
|
||||
* @return
|
||||
* always non-null.
|
||||
*/
|
||||
@NotNull
|
||||
WSDLService getOwner();
|
||||
|
||||
/**
|
||||
* Returns endpoint reference
|
||||
* @return Endpoint reference
|
||||
*/
|
||||
public @Nullable WSEndpointReference getEPR();
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLExtensible;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* Abstraction of wsdl:portType.
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public interface WSDLPortType extends WSDLObject, WSDLExtensible {
|
||||
/**
|
||||
* Gets the name of the wsdl:portType@name attribute value as local name and wsdl:definitions@targetNamespace
|
||||
* as the namespace uri.
|
||||
*/
|
||||
public QName getName();
|
||||
|
||||
/**
|
||||
* Gets the {@link WSDLOperation} for a given operation name
|
||||
*
|
||||
* @param operationName non-null operationName
|
||||
* @return null if a {@link WSDLOperation} is not found
|
||||
*/
|
||||
public WSDLOperation get(String operationName);
|
||||
|
||||
/**
|
||||
* Gets {@link Iterable}<{@link WSDLOperation}>
|
||||
*/
|
||||
public Iterable<? extends WSDLOperation> getOperations();
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* Abstracts wsdl:service.
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public interface WSDLService extends WSDLObject, WSDLExtensible {
|
||||
/**
|
||||
* Gets the {@link WSDLModel} that owns this service.
|
||||
*/
|
||||
@NotNull
|
||||
WSDLModel getParent();
|
||||
|
||||
/**
|
||||
* Gets the name of the wsdl:service@name attribute value as local name and wsdl:definitions@targetNamespace
|
||||
* as the namespace uri.
|
||||
*/
|
||||
@NotNull
|
||||
QName getName();
|
||||
|
||||
/**
|
||||
* Gets the {@link WSDLPort} for a given port name
|
||||
*
|
||||
* @param portName non-null operationName
|
||||
* @return null if a {@link WSDLPort} is not found
|
||||
*/
|
||||
WSDLPort get(QName portName);
|
||||
|
||||
/**
|
||||
* Gets the first {@link WSDLPort} if any, or otherwise null.
|
||||
*/
|
||||
WSDLPort getFirstPort();
|
||||
|
||||
/**
|
||||
* Gets the first port in this service which matches the portType
|
||||
*/
|
||||
@Nullable
|
||||
WSDLPort getMatchingPort(QName portTypeName);
|
||||
|
||||
/**
|
||||
* Gives all the {@link WSDLPort} in a wsdl:service {@link WSDLService}
|
||||
*/
|
||||
Iterable<? extends WSDLPort> getPorts();
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundFault;
|
||||
|
||||
public interface EditableWSDLBoundFault extends WSDLBoundFault {
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
EditableWSDLFault getFault();
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
EditableWSDLBoundOperation getBoundOperation();
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
*
|
||||
* @param operation Operation
|
||||
*/
|
||||
void freeze(EditableWSDLBoundOperation operation);
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.jws.WebParam.Mode;
|
||||
import javax.jws.soap.SOAPBinding.Style;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
|
||||
|
||||
public interface EditableWSDLBoundOperation extends WSDLBoundOperation {
|
||||
|
||||
@Override
|
||||
@NotNull EditableWSDLOperation getOperation();
|
||||
|
||||
@Override
|
||||
@NotNull EditableWSDLBoundPortType getBoundPortType();
|
||||
|
||||
@Override
|
||||
@Nullable EditableWSDLPart getPart(@NotNull String partName, @NotNull Mode mode);
|
||||
|
||||
@Override
|
||||
@NotNull Map<String,? extends EditableWSDLPart> getInParts();
|
||||
|
||||
@Override
|
||||
@NotNull Map<String,? extends EditableWSDLPart> getOutParts();
|
||||
|
||||
@Override
|
||||
@NotNull Iterable<? extends EditableWSDLBoundFault> getFaults();
|
||||
|
||||
/**
|
||||
* Add Part
|
||||
* @param part Part
|
||||
* @param mode Mode
|
||||
*/
|
||||
public void addPart(EditableWSDLPart part, Mode mode);
|
||||
|
||||
/**
|
||||
* Add Fault
|
||||
* @param fault Fault
|
||||
*/
|
||||
public void addFault(@NotNull EditableWSDLBoundFault fault);
|
||||
|
||||
/**
|
||||
* Sets the soapbinding:binding/operation/wsaw:Anonymous.
|
||||
*
|
||||
* @param anonymous Anonymous value of the operation
|
||||
*/
|
||||
public void setAnonymous(ANONYMOUS anonymous);
|
||||
|
||||
/**
|
||||
* Sets input explicit body parts
|
||||
* @param b True, if input body part is explicit
|
||||
*/
|
||||
public void setInputExplicitBodyParts(boolean b);
|
||||
|
||||
/**
|
||||
* Sets output explicit body parts
|
||||
* @param b True, if output body part is explicit
|
||||
*/
|
||||
public void setOutputExplicitBodyParts(boolean b);
|
||||
|
||||
/**
|
||||
* Sets fault explicit body parts
|
||||
* @param b True, if fault body part is explicit
|
||||
*/
|
||||
public void setFaultExplicitBodyParts(boolean b);
|
||||
|
||||
/**
|
||||
* Set request namespace
|
||||
* @param ns Namespace
|
||||
*/
|
||||
public void setRequestNamespace(String ns);
|
||||
|
||||
/**
|
||||
* Set response namespace
|
||||
* @param ns Namespace
|
||||
*/
|
||||
public void setResponseNamespace(String ns);
|
||||
|
||||
/**
|
||||
* Set SOAP action
|
||||
* @param soapAction SOAP action
|
||||
*/
|
||||
public void setSoapAction(String soapAction);
|
||||
|
||||
/**
|
||||
* Set parameter style
|
||||
* @param style Style
|
||||
*/
|
||||
public void setStyle(Style style);
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
* @param root WSDL Model
|
||||
*/
|
||||
public void freeze(EditableWSDLModel root);
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import javax.jws.soap.SOAPBinding.Style;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
import com.sun.xml.internal.ws.api.BindingID;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundPortType;
|
||||
|
||||
public interface EditableWSDLBoundPortType extends WSDLBoundPortType {
|
||||
|
||||
@Override
|
||||
@NotNull EditableWSDLModel getOwner();
|
||||
|
||||
@Override
|
||||
public EditableWSDLBoundOperation get(QName operationName);
|
||||
|
||||
@Override
|
||||
EditableWSDLPortType getPortType();
|
||||
|
||||
@Override
|
||||
Iterable<? extends EditableWSDLBoundOperation> getBindingOperations();
|
||||
|
||||
@Override
|
||||
@Nullable EditableWSDLBoundOperation getOperation(String namespaceUri, String localName);
|
||||
|
||||
/**
|
||||
* Populates the Map that holds operation name as key and {@link WSDLBoundOperation} as the value.
|
||||
*
|
||||
* @param opName Must be non-null
|
||||
* @param ptOp Must be non-null
|
||||
* @throws NullPointerException if either opName or ptOp is null
|
||||
*/
|
||||
public void put(QName opName, EditableWSDLBoundOperation ptOp);
|
||||
|
||||
/**
|
||||
* Sets the binding ID
|
||||
* @param bindingId Binding ID
|
||||
*/
|
||||
public void setBindingId(BindingID bindingId);
|
||||
|
||||
/**
|
||||
* sets whether the {@link WSDLBoundPortType} is rpc or lit
|
||||
*/
|
||||
public void setStyle(Style style);
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
*/
|
||||
public void freeze();
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLFault;
|
||||
|
||||
public interface EditableWSDLFault extends WSDLFault {
|
||||
|
||||
@Override
|
||||
EditableWSDLMessage getMessage();
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
EditableWSDLOperation getOperation();
|
||||
|
||||
/**
|
||||
* Sets action
|
||||
*
|
||||
* @param action Action
|
||||
*/
|
||||
public void setAction(String action);
|
||||
|
||||
/**
|
||||
* Set to true if this is the default action
|
||||
*
|
||||
* @param defaultAction True, if default action
|
||||
*/
|
||||
public void setDefaultAction(boolean defaultAction);
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
*
|
||||
* @param root WSDL Model
|
||||
*/
|
||||
public void freeze(EditableWSDLModel root);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLInput;
|
||||
|
||||
public interface EditableWSDLInput extends WSDLInput {
|
||||
|
||||
@Override
|
||||
EditableWSDLMessage getMessage();
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
EditableWSDLOperation getOperation();
|
||||
|
||||
/**
|
||||
* Sets action
|
||||
*
|
||||
* @param action Action
|
||||
*/
|
||||
public void setAction(String action);
|
||||
|
||||
/**
|
||||
* Set to true if this is the default action
|
||||
*
|
||||
* @param defaultAction True, if default action
|
||||
*/
|
||||
public void setDefaultAction(boolean defaultAction);
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
*
|
||||
* @param root WSDL Model
|
||||
*/
|
||||
public void freeze(EditableWSDLModel root);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLMessage;
|
||||
|
||||
public interface EditableWSDLMessage extends WSDLMessage {
|
||||
|
||||
@Override
|
||||
Iterable<? extends EditableWSDLPart> parts();
|
||||
|
||||
/**
|
||||
* Add part
|
||||
*
|
||||
* @param part Part
|
||||
*/
|
||||
public void add(EditableWSDLPart part);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel;
|
||||
import com.sun.xml.internal.ws.policy.PolicyMap;
|
||||
|
||||
public interface EditableWSDLModel extends WSDLModel {
|
||||
|
||||
@Override
|
||||
EditableWSDLPortType getPortType(@NotNull QName name);
|
||||
|
||||
/**
|
||||
* Add Binding
|
||||
*
|
||||
* @param portType Bound port type
|
||||
*/
|
||||
void addBinding(EditableWSDLBoundPortType portType);
|
||||
|
||||
@Override
|
||||
EditableWSDLBoundPortType getBinding(@NotNull QName name);
|
||||
|
||||
@Override
|
||||
EditableWSDLBoundPortType getBinding(@NotNull QName serviceName, @NotNull QName portName);
|
||||
|
||||
@Override
|
||||
EditableWSDLService getService(@NotNull QName name);
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
Map<QName, ? extends EditableWSDLMessage> getMessages();
|
||||
|
||||
/**
|
||||
* Add message
|
||||
*
|
||||
* @param msg Message
|
||||
*/
|
||||
public void addMessage(EditableWSDLMessage msg);
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
Map<QName, ? extends EditableWSDLPortType> getPortTypes();
|
||||
|
||||
/**
|
||||
* Add port type
|
||||
*
|
||||
* @param pt Port type
|
||||
*/
|
||||
public void addPortType(EditableWSDLPortType pt);
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
Map<QName, ? extends EditableWSDLBoundPortType> getBindings();
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
Map<QName, ? extends EditableWSDLService> getServices();
|
||||
|
||||
/**
|
||||
* Add service
|
||||
*
|
||||
* @param svc Service
|
||||
*/
|
||||
public void addService(EditableWSDLService svc);
|
||||
|
||||
@Override
|
||||
public EditableWSDLMessage getMessage(QName name);
|
||||
|
||||
/**
|
||||
* @param policyMap
|
||||
* @deprecated
|
||||
*/
|
||||
public void setPolicyMap(PolicyMap policyMap);
|
||||
|
||||
/**
|
||||
* Finalize rpc-lit binding
|
||||
*
|
||||
* @param portType Binding
|
||||
*/
|
||||
public void finalizeRpcLitBinding(EditableWSDLBoundPortType portType);
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
*/
|
||||
public void freeze();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation;
|
||||
|
||||
public interface EditableWSDLOperation extends WSDLOperation {
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
EditableWSDLInput getInput();
|
||||
|
||||
/**
|
||||
* Set input
|
||||
*
|
||||
* @param input Input
|
||||
*/
|
||||
public void setInput(EditableWSDLInput input);
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
EditableWSDLOutput getOutput();
|
||||
|
||||
/**
|
||||
* Set output
|
||||
*
|
||||
* @param output Output
|
||||
*/
|
||||
public void setOutput(EditableWSDLOutput output);
|
||||
|
||||
@Override
|
||||
Iterable<? extends EditableWSDLFault> getFaults();
|
||||
|
||||
/**
|
||||
* Add fault
|
||||
*
|
||||
* @param fault Fault
|
||||
*/
|
||||
public void addFault(EditableWSDLFault fault);
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
EditableWSDLFault getFault(QName faultDetailName);
|
||||
|
||||
/**
|
||||
* Set parameter order
|
||||
*
|
||||
* @param parameterOrder Parameter order
|
||||
*/
|
||||
public void setParameterOrder(String parameterOrder);
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
*
|
||||
* @param root WSDL Model
|
||||
*/
|
||||
public void freeze(EditableWSDLModel root);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;
|
||||
|
||||
public interface EditableWSDLOutput extends WSDLOutput {
|
||||
|
||||
@Override
|
||||
EditableWSDLMessage getMessage();
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
EditableWSDLOperation getOperation();
|
||||
|
||||
/**
|
||||
* Sets action
|
||||
*
|
||||
* @param action Action
|
||||
*/
|
||||
public void setAction(String action);
|
||||
|
||||
/**
|
||||
* Set to true if this is the default action
|
||||
*
|
||||
* @param defaultAction True, if default action
|
||||
*/
|
||||
public void setDefaultAction(boolean defaultAction);
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
*
|
||||
* @param root WSDL Model
|
||||
*/
|
||||
public void freeze(EditableWSDLModel root);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import com.sun.xml.internal.ws.api.model.ParameterBinding;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPart;
|
||||
|
||||
public interface EditableWSDLPart extends WSDLPart {
|
||||
|
||||
/**
|
||||
* Sets binding
|
||||
*
|
||||
* @param binding Binding
|
||||
*/
|
||||
public void setBinding(ParameterBinding binding);
|
||||
|
||||
/**
|
||||
* Sets index
|
||||
*
|
||||
* @param index Index
|
||||
*/
|
||||
public void setIndex(int index);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.xml.internal.ws.api.EndpointAddress;
|
||||
import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
|
||||
|
||||
public interface EditableWSDLPort extends WSDLPort {
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
EditableWSDLBoundPortType getBinding();
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
EditableWSDLService getOwner();
|
||||
|
||||
/**
|
||||
* Sets endpoint address
|
||||
*
|
||||
* @param address Endpoint address
|
||||
*/
|
||||
public void setAddress(EndpointAddress address);
|
||||
|
||||
/**
|
||||
* Sets endpoint reference
|
||||
*
|
||||
* @param epr Endpoint reference
|
||||
*/
|
||||
public void setEPR(@NotNull WSEndpointReference epr);
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
*
|
||||
* @param root WSDL Model
|
||||
*/
|
||||
void freeze(EditableWSDLModel root);
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPortType;
|
||||
|
||||
public interface EditableWSDLPortType extends WSDLPortType {
|
||||
|
||||
@Override
|
||||
public EditableWSDLOperation get(String operationName);
|
||||
|
||||
@Override
|
||||
public Iterable<? extends EditableWSDLOperation> getOperations();
|
||||
|
||||
/**
|
||||
* Associate WSDL operation with operation name
|
||||
*
|
||||
* @param opName Operation name
|
||||
* @param ptOp Operation
|
||||
*/
|
||||
public void put(String opName, EditableWSDLOperation ptOp);
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
*/
|
||||
public void freeze();
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLService;
|
||||
|
||||
public interface EditableWSDLService extends WSDLService {
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
EditableWSDLModel getParent();
|
||||
|
||||
@Override
|
||||
EditableWSDLPort get(QName portName);
|
||||
|
||||
@Override
|
||||
EditableWSDLPort getFirstPort();
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
EditableWSDLPort getMatchingPort(QName portTypeName);
|
||||
|
||||
@Override
|
||||
Iterable<? extends EditableWSDLPort> getPorts();
|
||||
|
||||
/**
|
||||
* Associate WSDL port with port QName
|
||||
*
|
||||
* @param portName Port QName
|
||||
* @param port Port
|
||||
*/
|
||||
public void put(QName portName, EditableWSDLPort port);
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
*
|
||||
* @param root WSDL Model
|
||||
*/
|
||||
void freeze(EditableWSDLModel root);
|
||||
}
|
||||
Reference in New Issue
Block a user