Skip to content

Commit

Permalink
Merge pull request #34 from kurtkanaskie/Issue33
Browse files Browse the repository at this point in the history
Issue33 - Cannot import generated proxy into Apigee X or Hybrid
  • Loading branch information
srinandan authored Feb 11, 2021
2 parents a508196 + 5f5093b commit 94efdff
Showing 5 changed files with 11 additions and 571 deletions.
8 changes: 4 additions & 4 deletions src/main/java/com/apigee/proxywriter/GenerateProxy.java
Original file line number Diff line number Diff line change
@@ -127,7 +127,7 @@ public class GenerateProxy {
private static final String SOAPPASSTHRU_APIPROXY_TEMPLATE = "/templates/soappassthru/apiProxyTemplate.xml";
private static final String SOAPPASSTHRU_PROXY_TEMPLATE = "/templates/soappassthru/proxyDefault.xml";
private static final String SOAPPASSTHRU_TARGET_TEMPLATE = "/templates/soappassthru/targetDefault.xml";
private static final String SOAPPASSTHRU_GETWSDL_TEMPLATE = "/templates/soappassthru/return-wsdl.xml";
private static final String SOAPPASSTHRU_GETWSDL_TEMPLATE = "/templates/soappassthru/Return-WSDL.xml";

private static final String OAS_TEMPLATE = "/templates/oas/oastemplate.json";

@@ -1189,8 +1189,8 @@ private void writeStdPolicies() throws Exception {
Paths.get(targetPath + "Invalid-SOAP.xml"), java.nio.file.StandardCopyOption.REPLACE_EXISTING);
/*
* Files.copy(getClass().getResourceAsStream(sourcePath +
* "return-wsdl.xml"), Paths.get(targetPath +
* "return-wsdl.xml"),
* "Return-WSDL.xml"), Paths.get(targetPath +
* "Return-WSDL.xml"),
* java.nio.file.StandardCopyOption.REPLACE_EXISTING);
*/
} else {
@@ -1451,7 +1451,7 @@ private void writeRaiseFault(Document getWsdlTemplate) throws Exception {
payload.setTextContent(addDefaultNamespace(wsdlContent));

xmlUtils.writeXML(getWsdlRaiseFaultPolicy, buildFolder + File.separator + "apiproxy" + File.separator
+ "policies" + File.separator + "return-wsdl.xml");
+ "policies" + File.separator + "Return-WSDL.xml");

LOGGER.exiting(GenerateProxy.class.getName(), new Object() {
}.getClass().getEnclosingMethod().getName());
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ExtractVariables async="false" continueOnError="false" enabled="true" name="Extract-Operation-Name">
<DisplayName>Extract Operation Name</DisplayName>
<DisplayName>Extract-Operation-Name</DisplayName>
<Properties/>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
<Source clearPayload="false">request</Source>
<XMLPayload stopPayloadProcessing="false">
<Variable name="envelope" type="String">
<Variable name="envelope" type="string">
<XPath>local-name(/*)</XPath>
</Variable>
<Variable name="body" type="String">
<Variable name="body" type="string">
<XPath>local-name(/*/*[local-name() = 'Body'])</XPath>
</Variable>
<Variable name="envelopeNamespace" type="String">
<Variable name="envelopeNamespace" type="string">
<XPath>namespace-uri(/*)</XPath>
</Variable>
<Variable name="operation" type="String">
<Variable name="operation" type="string">
<XPath>local-name(//*[local-name() = 'Body']/*[1])</XPath>
</Variable>
</XMLPayload>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<RaiseFault async="false" continueOnError="false" enabled="true" name="Return-WSDL">
<DisplayName>Return WSDL</DisplayName>
<DisplayName>Return-WSDL</DisplayName>
<Properties/>
<FaultResponse>
<Set>
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
<Policies>
<Policy>Extract-Operation-Name</Policy>
<Policy>Invalid-SOAP</Policy>
<Policy>return-wsdl</Policy>
<Policy>Return-WSDL</Policy>
</Policies>
<ProxyEndpoints>
<ProxyEndpoint>default</ProxyEndpoint>
Loading

0 comments on commit 94efdff

Please sign in to comment.