Skip to content

Commit

Permalink
Fixed compatibility with latest metro-wsit snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
dmatej committed Mar 30, 2022
1 parent 16bd36e commit 745417d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 67 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2022 Contributors to the Eclipse Foundation
* Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -198,12 +199,6 @@ public ServiceDefinition getServiceDefinition() {
}


@Override
public Set getComponentRegistry() {
throw new UnsupportedOperationException("Not supported yet.");
}


@Override
public SEIModel getSEIModel() {
throw new UnsupportedOperationException("Not supported yet.");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2022 Contributors to the Eclipse Foundation
* Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand All @@ -16,20 +17,9 @@

package org.glassfish.webservices.transport.tcp;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.security.Principal;
import java.util.Collection;
import java.util.Enumeration;
import java.util.Locale;
import java.util.Map;

import com.sun.xml.ws.api.DistributedPropertySet;
import com.oracle.webservices.api.message.BaseDistributedPropertySet;

import jakarta.servlet.AsyncContext;
import jakarta.servlet.AsyncListener;
import jakarta.servlet.DispatcherType;
import jakarta.servlet.RequestDispatcher;
import jakarta.servlet.ServletConnection;
Expand All @@ -44,14 +34,22 @@
import jakarta.servlet.http.HttpSession;
import jakarta.servlet.http.HttpUpgradeHandler;
import jakarta.servlet.http.Part;
import jakarta.xml.soap.SOAPException;
import jakarta.xml.soap.SOAPMessage;
import jakarta.xml.ws.handler.MessageContext;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.security.Principal;
import java.util.Collection;
import java.util.Enumeration;
import java.util.Locale;
import java.util.Map;

/**
* @author Alexey Stashok
*/
public final class ServletFakeArtifactSet extends DistributedPropertySet {
public final class ServletFakeArtifactSet extends BaseDistributedPropertySet {

private static final PropertyMap model;

Expand All @@ -63,7 +61,7 @@ public final class ServletFakeArtifactSet extends DistributedPropertySet {
}

@Override
public DistributedPropertySet.PropertyMap getPropertyMap() {
public BaseDistributedPropertySet.PropertyMap getPropertyMap() {
return model;
}

Expand All @@ -72,12 +70,12 @@ public ServletFakeArtifactSet(final String requestURL, final String servletPath)
response = createResponse();
}

@com.sun.xml.ws.api.PropertySet.Property(MessageContext.SERVLET_RESPONSE)
@Property(MessageContext.SERVLET_RESPONSE)
public HttpServletResponse getResponse() {
return response;
}

@com.sun.xml.ws.api.PropertySet.Property(MessageContext.SERVLET_REQUEST)
@Property(MessageContext.SERVLET_REQUEST)
public HttpServletRequest getRequest() {
return request;
}
Expand Down Expand Up @@ -226,10 +224,6 @@ public boolean isRequestedSessionIdFromURL() {
return true;
}

public boolean isRequestedSessionIdFromUrl() {
return true;
}

@Override
public Object getAttribute(final String string) {
return null;
Expand Down Expand Up @@ -285,7 +279,7 @@ public String[] getParameterValues(final String string) {
}

@Override
public Map getParameterMap() {
public Map<String, String[]> getParameterMap() {
return null;
}

Expand Down Expand Up @@ -352,10 +346,6 @@ public RequestDispatcher getRequestDispatcher(final String string) {
return null;
}

public String getRealPath(final String string) {
return null;
}

@Override
public int getRemotePort() {
return 0;
Expand Down Expand Up @@ -409,19 +399,6 @@ public DispatcherType getDispatcherType() {
return null;
}

public long getAsyncTimeout() {
return Long.MAX_VALUE;
}

public void setAsyncTimeout(long timeout) {
}

public void addAsyncListener(AsyncListener listener) {
}

public void addAsyncListener(AsyncListener listener, ServletRequest request, ServletResponse response) {
}

@Override
public jakarta.servlet.AsyncContext getAsyncContext() {
return null;
Expand Down Expand Up @@ -488,14 +465,6 @@ public String encodeRedirectURL(final String string) {
return null;
}

public String encodeUrl(final String string) {
return null;
}

public String encodeRedirectUrl(final String string) {
return null;
}

@Override
public void sendError(final int i, final String string) throws IOException {
}
Expand Down Expand Up @@ -536,9 +505,6 @@ public void addIntHeader(final String string, final int i) {
public void setStatus(final int i) {
}

public void setStatus(final int i, final String string) {
}

@Override
public String getCharacterEncoding() {
return null;
Expand Down Expand Up @@ -630,14 +596,4 @@ public int getStatus() {
return 200;
}
}

// TODO - remove when these are added to DistributedPropertySet
public SOAPMessage getSOAPMessage() throws SOAPException {
throw new UnsupportedOperationException();
}

public void setSOAPMessage(SOAPMessage soap) {
throw new UnsupportedOperationException();
}

}

0 comments on commit 745417d

Please sign in to comment.