Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KEYCLOAK-1501 Fix osgi packaging and fuse demo. Improve example
- Loading branch information
Showing
15 changed files
with
201 additions
and
221 deletions.
There are no files selected for viewing
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
27 changes: 0 additions & 27 deletions
27
examples/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/Person.java
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
examples/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/PersonImpl.java
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
examples/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/Product.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.keycloak.example.ws; | ||
|
||
import javax.jws.WebMethod; | ||
import javax.jws.WebParam; | ||
import javax.jws.WebService; | ||
import javax.xml.bind.annotation.XmlSeeAlso; | ||
import javax.xml.ws.RequestWrapper; | ||
import javax.xml.ws.ResponseWrapper; | ||
|
||
import org.keycloak.example.ws.types.ObjectFactory; | ||
|
||
@WebService | ||
@XmlSeeAlso({ObjectFactory.class}) | ||
public interface Product { | ||
|
||
@RequestWrapper(localName = "GetProduct", className = "GetProduct") | ||
@ResponseWrapper(localName = "GetProductResponse", className = "GetProductResponse") | ||
@WebMethod(operationName = "GetProduct") | ||
public void getProduct( | ||
@WebParam(mode = WebParam.Mode.INOUT, name = "productId") | ||
javax.xml.ws.Holder<String> productId, | ||
@WebParam(mode = WebParam.Mode.OUT, name = "name") | ||
javax.xml.ws.Holder<String> name | ||
) throws UnknownProductFault; | ||
} |
27 changes: 27 additions & 0 deletions
27
examples/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/ProductImpl.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.keycloak.example.ws; | ||
|
||
import javax.jws.WebService; | ||
import javax.xml.ws.Holder; | ||
|
||
@WebService(serviceName = "ProductService", endpointInterface = "org.keycloak.example.ws.Product") | ||
public class ProductImpl implements Product { | ||
|
||
public void getProduct(Holder<String> productId, Holder<String> name) | ||
throws UnknownProductFault | ||
{ | ||
if (productId.value == null || productId.value.length() == 0) { | ||
org.keycloak.example.ws.types.UnknownProductFault fault = new org.keycloak.example.ws.types.UnknownProductFault(); | ||
fault.setProductId(productId.value); | ||
throw new UnknownProductFault(null,fault); | ||
} else if (productId.value.trim().equals("1")) { | ||
name.value = "IPad"; | ||
} else if (productId.value.trim().equals("2")) { | ||
name.value = "IPhone"; | ||
} else { | ||
org.keycloak.example.ws.types.UnknownProductFault fault = new org.keycloak.example.ws.types.UnknownProductFault(); | ||
fault.setProductId(productId.value); | ||
throw new UnknownProductFault(null,fault); | ||
} | ||
} | ||
|
||
} |
36 changes: 0 additions & 36 deletions
36
examples/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/UnknownPersonFault.java
This file was deleted.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
examples/fuse/cxf-jaxws/src/main/java/org/keycloak/example/ws/UnknownProductFault.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package org.keycloak.example.ws; | ||
|
||
import javax.xml.ws.WebFault; | ||
|
||
@WebFault(name = "UnknownProductFault") | ||
public class UnknownProductFault extends Exception { | ||
public static final long serialVersionUID = 20081110144906L; | ||
|
||
private org.keycloak.example.ws.types.UnknownProductFault unknownProductFault; | ||
|
||
public UnknownProductFault() { | ||
super(); | ||
} | ||
|
||
public UnknownProductFault(String message) { | ||
super(message); | ||
} | ||
|
||
public UnknownProductFault(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
public UnknownProductFault(String message, org.keycloak.example.ws.types.UnknownProductFault unknownProductFault) { | ||
super(message); | ||
this.unknownProductFault = unknownProductFault; | ||
} | ||
|
||
public UnknownProductFault(String message, org.keycloak.example.ws.types.UnknownProductFault unknownProductFault, Throwable cause) { | ||
super(message, cause); | ||
this.unknownProductFault = unknownProductFault; | ||
} | ||
|
||
public org.keycloak.example.ws.types.UnknownProductFault getFaultInfo() { | ||
return this.unknownProductFault; | ||
} | ||
} |
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
Oops, something went wrong.