Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue33 - Cannot import generated proxy into Apigee X or Hybrid #34

Merged
merged 2 commits into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/main/java/com/apigee/proxywriter/GenerateProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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());
Expand Down
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>
Expand Down
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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Loading