Created
December 6, 2011 15:47
-
-
Save nise-nabe/1438646 to your computer and use it in GitHub Desktop.
IdeoneCoder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Ideone_Service_v1BindingStub.java | |
* | |
* このファイルはWSDLから自動生成されました / [en]-(This file was auto-generated from WSDL) | |
* Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java生成器によって / [en]-(by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.) | |
*/ | |
package com.ideone; | |
public class Ideone_Service_v1BindingStub extends org.apache.axis.client.Stub implements | |
com.ideone.Ideone_Service_v1Port_PortType { | |
private java.util.Vector cachedSerClasses = new java.util.Vector(); | |
private java.util.Vector cachedSerQNames = new java.util.Vector(); | |
private java.util.Vector cachedSerFactories = new java.util.Vector(); | |
private java.util.Vector cachedDeserFactories = new java.util.Vector(); | |
static org.apache.axis.description.OperationDesc[] _operations; | |
static { | |
_operations = new org.apache.axis.description.OperationDesc[5]; | |
_initOperationDesc1(); | |
} | |
private static void _initOperationDesc1() { | |
org.apache.axis.description.OperationDesc oper; | |
org.apache.axis.description.ParameterDesc param; | |
oper = new org.apache.axis.description.OperationDesc(); | |
oper.setName("createSubmission"); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"user"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), | |
java.lang.String.class, false, false); | |
oper.addParameter(param); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"pass"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), | |
java.lang.String.class, false, false); | |
oper.addParameter(param); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"sourceCode"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), | |
java.lang.String.class, false, false); | |
oper.addParameter(param); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"language"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), | |
int.class, false, false); | |
oper.addParameter(param); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"input"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), | |
java.lang.String.class, false, false); | |
oper.addParameter(param); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"run"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"), | |
boolean.class, false, false); | |
oper.addParameter(param); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"private"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"), | |
boolean.class, false, false); | |
oper.addParameter(param); | |
oper.setReturnType(new javax.xml.namespace.QName( | |
"http://schemas.xmlsoap.org/soap/encoding/", "Array")); | |
oper.setReturnClass(java.lang.Object[].class); | |
oper.setReturnQName(new javax.xml.namespace.QName("", "return")); | |
oper.setStyle(org.apache.axis.constants.Style.RPC); | |
oper.setUse(org.apache.axis.constants.Use.ENCODED); | |
_operations[0] = oper; | |
oper = new org.apache.axis.description.OperationDesc(); | |
oper.setName("getSubmissionStatus"); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"user"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), | |
java.lang.String.class, false, false); | |
oper.addParameter(param); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"pass"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), | |
java.lang.String.class, false, false); | |
oper.addParameter(param); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"link"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), | |
java.lang.String.class, false, false); | |
oper.addParameter(param); | |
oper.setReturnType(new javax.xml.namespace.QName( | |
"http://schemas.xmlsoap.org/soap/encoding/", "Array")); | |
oper.setReturnClass(java.lang.Object[].class); | |
oper.setReturnQName(new javax.xml.namespace.QName("", "return")); | |
oper.setStyle(org.apache.axis.constants.Style.RPC); | |
oper.setUse(org.apache.axis.constants.Use.ENCODED); | |
_operations[1] = oper; | |
oper = new org.apache.axis.description.OperationDesc(); | |
oper.setName("getSubmissionDetails"); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"user"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), | |
java.lang.String.class, false, false); | |
oper.addParameter(param); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"pass"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), | |
java.lang.String.class, false, false); | |
oper.addParameter(param); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"link"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), | |
java.lang.String.class, false, false); | |
oper.addParameter(param); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"withSource"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"), | |
boolean.class, false, false); | |
oper.addParameter(param); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"withInput"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"), | |
boolean.class, false, false); | |
oper.addParameter(param); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"withOutput"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"), | |
boolean.class, false, false); | |
oper.addParameter(param); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"withStderr"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"), | |
boolean.class, false, false); | |
oper.addParameter(param); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"withCmpinfo"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"), | |
boolean.class, false, false); | |
oper.addParameter(param); | |
oper.setReturnType(new javax.xml.namespace.QName( | |
"http://schemas.xmlsoap.org/soap/encoding/", "Array")); | |
oper.setReturnClass(java.lang.Object[].class); | |
oper.setReturnQName(new javax.xml.namespace.QName("", "return")); | |
oper.setStyle(org.apache.axis.constants.Style.RPC); | |
oper.setUse(org.apache.axis.constants.Use.ENCODED); | |
_operations[2] = oper; | |
oper = new org.apache.axis.description.OperationDesc(); | |
oper.setName("getLanguages"); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"user"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), | |
java.lang.String.class, false, false); | |
oper.addParameter(param); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"pass"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), | |
java.lang.String.class, false, false); | |
oper.addParameter(param); | |
oper.setReturnType(new javax.xml.namespace.QName( | |
"http://schemas.xmlsoap.org/soap/encoding/", "Array")); | |
oper.setReturnClass(java.lang.Object[].class); | |
oper.setReturnQName(new javax.xml.namespace.QName("", "return")); | |
oper.setStyle(org.apache.axis.constants.Style.RPC); | |
oper.setUse(org.apache.axis.constants.Use.ENCODED); | |
_operations[3] = oper; | |
oper = new org.apache.axis.description.OperationDesc(); | |
oper.setName("testFunction"); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"user"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), | |
java.lang.String.class, false, false); | |
oper.addParameter(param); | |
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", | |
"pass"), org.apache.axis.description.ParameterDesc.IN, | |
new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), | |
java.lang.String.class, false, false); | |
oper.addParameter(param); | |
oper.setReturnType(new javax.xml.namespace.QName( | |
"http://schemas.xmlsoap.org/soap/encoding/", "Array")); | |
oper.setReturnClass(java.lang.Object[].class); | |
oper.setReturnQName(new javax.xml.namespace.QName("", "return")); | |
oper.setStyle(org.apache.axis.constants.Style.RPC); | |
oper.setUse(org.apache.axis.constants.Use.ENCODED); | |
_operations[4] = oper; | |
} | |
public Ideone_Service_v1BindingStub() throws org.apache.axis.AxisFault { | |
this(null); | |
} | |
public Ideone_Service_v1BindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) | |
throws org.apache.axis.AxisFault { | |
this(service); | |
super.cachedEndpoint = endpointURL; | |
} | |
public Ideone_Service_v1BindingStub(javax.xml.rpc.Service service) | |
throws org.apache.axis.AxisFault { | |
if (service == null) { | |
super.service = new org.apache.axis.client.Service(); | |
} else { | |
super.service = service; | |
} | |
((org.apache.axis.client.Service) super.service).setTypeMappingVersion("1.2"); | |
} | |
protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException { | |
try { | |
org.apache.axis.client.Call _call = super._createCall(); | |
if (super.maintainSessionSet) { | |
_call.setMaintainSession(super.maintainSession); | |
} | |
if (super.cachedUsername != null) { | |
_call.setUsername(super.cachedUsername); | |
} | |
if (super.cachedPassword != null) { | |
_call.setPassword(super.cachedPassword); | |
} | |
if (super.cachedEndpoint != null) { | |
_call.setTargetEndpointAddress(super.cachedEndpoint); | |
} | |
if (super.cachedTimeout != null) { | |
_call.setTimeout(super.cachedTimeout); | |
} | |
if (super.cachedPortName != null) { | |
_call.setPortName(super.cachedPortName); | |
} | |
java.util.Enumeration keys = super.cachedProperties.keys(); | |
while (keys.hasMoreElements()) { | |
java.lang.String key = (java.lang.String) keys.nextElement(); | |
_call.setProperty(key, super.cachedProperties.get(key)); | |
} | |
return _call; | |
} catch (java.lang.Throwable _t) { | |
throw new org.apache.axis.AxisFault( | |
"Callオブジェクトの取得失敗 / [en]-(Failure trying to get the Call object)", _t); | |
} | |
} | |
public java.lang.Object[] createSubmission(java.lang.String user, java.lang.String pass, | |
java.lang.String sourceCode, int language, java.lang.String input, boolean run, | |
boolean _private) throws java.rmi.RemoteException { | |
if (super.cachedEndpoint == null) { | |
throw new org.apache.axis.NoEndPointException(); | |
} | |
org.apache.axis.client.Call _call = createCall(); | |
_call.setOperation(_operations[0]); | |
_call.setUseSOAPAction(true); | |
_call.setSOAPActionURI("http://ideone.com/api/1/service#createSubmission"); | |
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); | |
_call.setOperationName(new javax.xml.namespace.QName("http://ideone.com/api/1/service", | |
"createSubmission")); | |
setRequestHeaders(_call); | |
setAttachments(_call); | |
try { | |
java.lang.Object _resp = _call.invoke(new java.lang.Object[] { user, pass, sourceCode, | |
new java.lang.Integer(language), input, new java.lang.Boolean(run), | |
new java.lang.Boolean(_private) }); | |
if (_resp instanceof java.rmi.RemoteException) { | |
throw (java.rmi.RemoteException) _resp; | |
} else { | |
extractAttachments(_call); | |
try { | |
return (java.lang.Object[]) _resp; | |
} catch (java.lang.Exception _exception) { | |
return (java.lang.Object[]) org.apache.axis.utils.JavaUtils.convert(_resp, | |
java.lang.Object[].class); | |
} | |
} | |
} catch (org.apache.axis.AxisFault axisFaultException) { | |
throw axisFaultException; | |
} | |
} | |
public java.lang.Object[] getSubmissionStatus(java.lang.String user, java.lang.String pass, | |
java.lang.String link) throws java.rmi.RemoteException { | |
if (super.cachedEndpoint == null) { | |
throw new org.apache.axis.NoEndPointException(); | |
} | |
org.apache.axis.client.Call _call = createCall(); | |
_call.setOperation(_operations[1]); | |
_call.setUseSOAPAction(true); | |
_call.setSOAPActionURI("http://ideone.com/api/1/service#getSubmissionStatus"); | |
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); | |
_call.setOperationName(new javax.xml.namespace.QName("http://ideone.com/api/1/service", | |
"getSubmissionStatus")); | |
setRequestHeaders(_call); | |
setAttachments(_call); | |
try { | |
java.lang.Object _resp = _call.invoke(new java.lang.Object[] { user, pass, link }); | |
if (_resp instanceof java.rmi.RemoteException) { | |
throw (java.rmi.RemoteException) _resp; | |
} else { | |
extractAttachments(_call); | |
try { | |
return (java.lang.Object[]) _resp; | |
} catch (java.lang.Exception _exception) { | |
return (java.lang.Object[]) org.apache.axis.utils.JavaUtils.convert(_resp, | |
java.lang.Object[].class); | |
} | |
} | |
} catch (org.apache.axis.AxisFault axisFaultException) { | |
throw axisFaultException; | |
} | |
} | |
public java.lang.Object[] getSubmissionDetails(java.lang.String user, java.lang.String pass, | |
java.lang.String link, boolean withSource, boolean withInput, boolean withOutput, | |
boolean withStderr, boolean withCmpinfo) throws java.rmi.RemoteException { | |
if (super.cachedEndpoint == null) { | |
throw new org.apache.axis.NoEndPointException(); | |
} | |
org.apache.axis.client.Call _call = createCall(); | |
_call.setOperation(_operations[2]); | |
_call.setUseSOAPAction(true); | |
_call.setSOAPActionURI("http://ideone.com/api/1/service#getSubmissionDetails"); | |
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); | |
_call.setOperationName(new javax.xml.namespace.QName("http://ideone.com/api/1/service", | |
"getSubmissionDetails")); | |
setRequestHeaders(_call); | |
setAttachments(_call); | |
try { | |
java.lang.Object _resp = _call.invoke(new java.lang.Object[] { user, pass, link, | |
new java.lang.Boolean(withSource), new java.lang.Boolean(withInput), | |
new java.lang.Boolean(withOutput), new java.lang.Boolean(withStderr), | |
new java.lang.Boolean(withCmpinfo) }); | |
if (_resp instanceof java.rmi.RemoteException) { | |
throw (java.rmi.RemoteException) _resp; | |
} else { | |
extractAttachments(_call); | |
try { | |
return (java.lang.Object[]) _resp; | |
} catch (java.lang.Exception _exception) { | |
return (java.lang.Object[]) org.apache.axis.utils.JavaUtils.convert(_resp, | |
java.lang.Object[].class); | |
} | |
} | |
} catch (org.apache.axis.AxisFault axisFaultException) { | |
throw axisFaultException; | |
} | |
} | |
public java.lang.Object[] getLanguages(java.lang.String user, java.lang.String pass) | |
throws java.rmi.RemoteException { | |
if (super.cachedEndpoint == null) { | |
throw new org.apache.axis.NoEndPointException(); | |
} | |
org.apache.axis.client.Call _call = createCall(); | |
_call.setOperation(_operations[3]); | |
_call.setUseSOAPAction(true); | |
_call.setSOAPActionURI("http://ideone.com/api/1/service#getLanguages"); | |
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); | |
_call.setOperationName(new javax.xml.namespace.QName("http://ideone.com/api/1/service", | |
"getLanguages")); | |
setRequestHeaders(_call); | |
setAttachments(_call); | |
try { | |
java.lang.Object _resp = _call.invoke(new java.lang.Object[] { user, pass }); | |
if (_resp instanceof java.rmi.RemoteException) { | |
throw (java.rmi.RemoteException) _resp; | |
} else { | |
extractAttachments(_call); | |
try { | |
return (java.lang.Object[]) _resp; | |
} catch (java.lang.Exception _exception) { | |
return (java.lang.Object[]) org.apache.axis.utils.JavaUtils.convert(_resp, | |
java.lang.Object[].class); | |
} | |
} | |
} catch (org.apache.axis.AxisFault axisFaultException) { | |
throw axisFaultException; | |
} | |
} | |
public java.lang.Object[] testFunction(java.lang.String user, java.lang.String pass) | |
throws java.rmi.RemoteException { | |
if (super.cachedEndpoint == null) { | |
throw new org.apache.axis.NoEndPointException(); | |
} | |
org.apache.axis.client.Call _call = createCall(); | |
_call.setOperation(_operations[4]); | |
_call.setUseSOAPAction(true); | |
_call.setSOAPActionURI("http://ideone.com/api/1/service#testFunction"); | |
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); | |
_call.setOperationName(new javax.xml.namespace.QName("http://ideone.com/api/1/service", | |
"testFunction")); | |
setRequestHeaders(_call); | |
setAttachments(_call); | |
try { | |
java.lang.Object _resp = _call.invoke(new java.lang.Object[] { user, pass }); | |
if (_resp instanceof java.rmi.RemoteException) { | |
throw (java.rmi.RemoteException) _resp; | |
} else { | |
extractAttachments(_call); | |
try { | |
return (java.lang.Object[]) _resp; | |
} catch (java.lang.Exception _exception) { | |
return (java.lang.Object[]) org.apache.axis.utils.JavaUtils.convert(_resp, | |
java.lang.Object[].class); | |
} | |
} | |
} catch (org.apache.axis.AxisFault axisFaultException) { | |
throw axisFaultException; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Ideone_Service_v1Port_PortType.java | |
* | |
* このファイルはWSDLから自動生成されました / [en]-(This file was auto-generated from WSDL) | |
* Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java生成器によって / [en]-(by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.) | |
*/ | |
package com.ideone; | |
public interface Ideone_Service_v1Port_PortType extends java.rmi.Remote { | |
/** | |
* Creates a new submission. | |
*/ | |
public java.lang.Object[] createSubmission(java.lang.String user, java.lang.String pass, | |
java.lang.String sourceCode, int language, java.lang.String input, boolean run, | |
boolean _private) throws java.rmi.RemoteException; | |
/** | |
* Returns status and result of a submission in an associative array. | |
*/ | |
public java.lang.Object[] getSubmissionStatus(java.lang.String user, java.lang.String pass, | |
java.lang.String link) throws java.rmi.RemoteException; | |
/** | |
* Returns information about the submission in an associative array. | |
*/ | |
public java.lang.Object[] getSubmissionDetails(java.lang.String user, java.lang.String pass, | |
java.lang.String link, boolean withSource, boolean withInput, boolean withOutput, | |
boolean withStderr, boolean withCmpinfo) throws java.rmi.RemoteException; | |
/** | |
* Returns list of supported languages. | |
*/ | |
public java.lang.Object[] getLanguages(java.lang.String user, java.lang.String pass) | |
throws java.rmi.RemoteException; | |
/** | |
* This is a test function. If you can call it successfully, then you will | |
* also be able to call the other functions. | |
*/ | |
public java.lang.Object[] testFunction(java.lang.String user, java.lang.String pass) | |
throws java.rmi.RemoteException; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Ideone_Service_v1Service.java | |
* | |
* このファイルはWSDLから自動生成されました / [en]-(This file was auto-generated from WSDL) | |
* Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java生成器によって / [en]-(by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.) | |
*/ | |
package com.ideone; | |
public interface Ideone_Service_v1Service extends javax.xml.rpc.Service { | |
public java.lang.String getIdeone_Service_v1PortAddress(); | |
public com.ideone.Ideone_Service_v1Port_PortType getIdeone_Service_v1Port() | |
throws javax.xml.rpc.ServiceException; | |
public com.ideone.Ideone_Service_v1Port_PortType getIdeone_Service_v1Port( | |
java.net.URL portAddress) throws javax.xml.rpc.ServiceException; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Ideone_Service_v1ServiceLocator.java | |
* | |
* このファイルはWSDLから自動生成されました / [en]-(This file was auto-generated from WSDL) | |
* Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java生成器によって / [en]-(by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.) | |
*/ | |
package com.ideone; | |
public class Ideone_Service_v1ServiceLocator extends org.apache.axis.client.Service implements | |
com.ideone.Ideone_Service_v1Service { | |
public Ideone_Service_v1ServiceLocator() { | |
} | |
public Ideone_Service_v1ServiceLocator(org.apache.axis.EngineConfiguration config) { | |
super(config); | |
} | |
public Ideone_Service_v1ServiceLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) | |
throws javax.xml.rpc.ServiceException { | |
super(wsdlLoc, sName); | |
} | |
// Ideone_Service_v1Portのプロキシクラスの取得に使用します / [en]-(Use to get a proxy class | |
// for Ideone_Service_v1Port) | |
private java.lang.String Ideone_Service_v1Port_address = "http://ideone.com/api/1/service"; | |
public java.lang.String getIdeone_Service_v1PortAddress() { | |
return Ideone_Service_v1Port_address; | |
} | |
// WSDDサービス名のデフォルトはポート名です / [en]-(The WSDD service name defaults to the port | |
// name.) | |
private java.lang.String Ideone_Service_v1PortWSDDServiceName = "Ideone_Service_v1Port"; | |
public java.lang.String getIdeone_Service_v1PortWSDDServiceName() { | |
return Ideone_Service_v1PortWSDDServiceName; | |
} | |
public void setIdeone_Service_v1PortWSDDServiceName(java.lang.String name) { | |
Ideone_Service_v1PortWSDDServiceName = name; | |
} | |
public com.ideone.Ideone_Service_v1Port_PortType getIdeone_Service_v1Port() | |
throws javax.xml.rpc.ServiceException { | |
java.net.URL endpoint; | |
try { | |
endpoint = new java.net.URL(Ideone_Service_v1Port_address); | |
} catch (java.net.MalformedURLException e) { | |
throw new javax.xml.rpc.ServiceException(e); | |
} | |
return getIdeone_Service_v1Port(endpoint); | |
} | |
public com.ideone.Ideone_Service_v1Port_PortType getIdeone_Service_v1Port( | |
java.net.URL portAddress) throws javax.xml.rpc.ServiceException { | |
try { | |
com.ideone.Ideone_Service_v1BindingStub _stub = new com.ideone.Ideone_Service_v1BindingStub( | |
portAddress, this); | |
_stub.setPortName(getIdeone_Service_v1PortWSDDServiceName()); | |
return _stub; | |
} catch (org.apache.axis.AxisFault e) { | |
return null; | |
} | |
} | |
public void setIdeone_Service_v1PortEndpointAddress(java.lang.String address) { | |
Ideone_Service_v1Port_address = address; | |
} | |
/** | |
* 与えられたインターフェースに対して、スタブの実装を取得します。 / [en]-(For the given interface, get the | |
* stub implementation.) このサービスが与えられたインターフェースに対してポートを持たない場合、 / [en]-(If this | |
* service has no port for the given interface,) ServiceExceptionが投げられます。 / | |
* [en]-(then ServiceException is thrown.) | |
*/ | |
public java.rmi.Remote getPort(Class serviceEndpointInterface) | |
throws javax.xml.rpc.ServiceException { | |
try { | |
if (com.ideone.Ideone_Service_v1Port_PortType.class | |
.isAssignableFrom(serviceEndpointInterface)) { | |
com.ideone.Ideone_Service_v1BindingStub _stub = new com.ideone.Ideone_Service_v1BindingStub( | |
new java.net.URL(Ideone_Service_v1Port_address), this); | |
_stub.setPortName(getIdeone_Service_v1PortWSDDServiceName()); | |
return _stub; | |
} | |
} catch (java.lang.Throwable t) { | |
throw new javax.xml.rpc.ServiceException(t); | |
} | |
throw new javax.xml.rpc.ServiceException( | |
"インターフェースに対するスタブの実装がありません: / [en]-(There is no stub implementation for the interface:) " | |
+ (serviceEndpointInterface == null ? "null" : serviceEndpointInterface | |
.getName())); | |
} | |
/** | |
* 与えられたインターフェースに対して、スタブの実装を取得します。 / [en]-(For the given interface, get the | |
* stub implementation.) このサービスが与えられたインターフェースに対してポートを持たない場合、 / [en]-(If this | |
* service has no port for the given interface,) ServiceExceptionが投げられます。 / | |
* [en]-(then ServiceException is thrown.) | |
*/ | |
public java.rmi.Remote getPort(javax.xml.namespace.QName portName, | |
Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { | |
if (portName == null) { | |
return getPort(serviceEndpointInterface); | |
} | |
java.lang.String inputPortName = portName.getLocalPart(); | |
if ("Ideone_Service_v1Port".equals(inputPortName)) { | |
return getIdeone_Service_v1Port(); | |
} else { | |
java.rmi.Remote _stub = getPort(serviceEndpointInterface); | |
((org.apache.axis.client.Stub) _stub).setPortName(portName); | |
return _stub; | |
} | |
} | |
public javax.xml.namespace.QName getServiceName() { | |
return new javax.xml.namespace.QName("http://ideone.com/api/1/service", | |
"Ideone_Service_v1Service"); | |
} | |
private java.util.HashSet ports = null; | |
public java.util.Iterator getPorts() { | |
if (ports == null) { | |
ports = new java.util.HashSet(); | |
ports.add(new javax.xml.namespace.QName("http://ideone.com/api/1/service", | |
"Ideone_Service_v1Port")); | |
} | |
return ports.iterator(); | |
} | |
/** | |
* 指定したポート名に対するエンドポイントのアドレスをセットします / [en]-(Set the endpoint address for the | |
* specified port name.) | |
*/ | |
public void setEndpointAddress(java.lang.String portName, java.lang.String address) | |
throws javax.xml.rpc.ServiceException { | |
if ("Ideone_Service_v1Port".equals(portName)) { | |
setIdeone_Service_v1PortEndpointAddress(address); | |
} else { // Unknown Port Name | |
throw new javax.xml.rpc.ServiceException( | |
" 未知のポートに対してはエンドポイントのアドレスをセットできません / [en]-(Cannot set Endpoint Address for Unknown Port)" | |
+ portName); | |
} | |
} | |
/** | |
* 指定したポート名に対するエンドポイントのアドレスをセットします / [en]-(Set the endpoint address for the | |
* specified port name.) | |
*/ | |
public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) | |
throws javax.xml.rpc.ServiceException { | |
setEndpointAddress(portName.getLocalPart(), address); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.BorderLayout; | |
import java.awt.Color; | |
import java.awt.Component; | |
import java.rmi.RemoteException; | |
import java.util.HashMap; | |
import javax.swing.JPanel; | |
import javax.swing.JScrollPane; | |
import javax.swing.JTextField; | |
import javax.swing.JViewport; | |
import javax.xml.rpc.ServiceException; | |
import com.ideone.Ideone_Service_v1Port_PortType; | |
import com.ideone.Ideone_Service_v1ServiceLocator; | |
import com.topcoder.client.contestApplet.editors.Standard.EntryPoint; | |
import com.topcoder.client.contestApplet.editors.Standard.StandardEditor; | |
import com.topcoder.client.contestApplet.editors.Standard.StandardEditorPanel; | |
import com.topcoder.client.contestant.ProblemComponentModel; | |
import com.topcoder.shared.language.Language; | |
import com.topcoder.shared.problem.Renderer; | |
public class IdeoneCoder extends EntryPoint{ | |
private Ideone_Service_v1Port_PortType port; | |
private final String user = "nisenabe"; | |
private final String pass = "ideone_password"; | |
private int langId; | |
private JTextField linkField; | |
public IdeoneCoder() { | |
try { | |
port = new Ideone_Service_v1ServiceLocator().getIdeone_Service_v1Port(); | |
} catch (ServiceException e) { | |
// TODO Auto-generated catch block | |
e.printStackTrace(); | |
} | |
} | |
@Override | |
public JPanel getEditorPanel() { | |
StandardEditorPanel panel = (StandardEditorPanel) super.getEditorPanel(); | |
JScrollPane scroll = (JScrollPane) panel.getComponent(0); | |
JViewport viewport = (JViewport) scroll.getComponent(0); | |
JPanel vpanel = (JPanel) viewport.getComponent(0); | |
vpanel.setLayout(new BorderLayout()); | |
for(Component comp : vpanel.getComponents()){ | |
if (comp instanceof StandardEditor){ | |
StandardEditor editor = (StandardEditor) comp; | |
vpanel.add(editor, BorderLayout.CENTER); | |
break; | |
} | |
} | |
linkField = new JTextField(); | |
linkField.setBackground(Color.black); | |
linkField.setForeground(Color.white); | |
vpanel.add(linkField, BorderLayout.SOUTH); | |
return panel; | |
} | |
@Override | |
public String getSource() { | |
String src = super.getSource(); | |
try { | |
Object[] objs = port.createSubmission(user, pass, src, langId, "", false, true); | |
HashMap<String, String> map = (HashMap<String, String>) objs[0]; | |
if(!map.get("error").equals("OK")){ | |
linkField.setText("error"); | |
return src; | |
} | |
String link = map.get("link"); | |
linkField.setText("http://ideone.com/" + link); | |
} catch (RemoteException e) { | |
e.printStackTrace(); | |
} | |
return src; | |
} | |
public void setProblemComponent(ProblemComponentModel component, Language language, Renderer renderer){ | |
switch(language.getId()){ | |
case 1: // java | |
langId = 10; | |
break; | |
case 3: // c++ | |
langId = 1; | |
break; | |
case 4: // c# | |
langId = 27; | |
break; | |
case 5: // vb | |
langId = 101; | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment